Unlike the conventional routing techniques in the Internet where routing privileges are given to trustworthy and fully authenticated nodes, Delay Tolerant Networks (DTNs) allow any node to participate in routing due to the lack of consistent infrastructure and central administration. This creates new security challenges as even authorized nodes in DTNs could inject several malicious threats against the network. This paper investigates novel solutions based on the Spray-and-Wait (SnW) routing protocol for mitigating black hole attacks in DTNs. A new knowledge-based routing scheme, called Trust-Based Spray- and-Wait protocol (TB-SnW), is proposed. The routing decisions in TB-SnW protocol are made based on the trust levels that are computed at each node using its historic routing records. Simulation results show that the TB-SnW protocol can achieve better performance in terms of mitigating Byzantine attacks and reducing message delivery delay compared with the Spray-and-Wait protocol.