| Wireless sensor networks are a novel type of obtaining and processing information. Howevre, due to the distribution and resource-restriction of wireless sensor networks, there exist many security problems in this field. Therefore, the security in wireless sensor networks is a hot issue.Wormhole attack is a very severe threat to wireless sensor networks, which makes distant sensor nodes close to neighbors. Because of this, it can absorb communication, which can steal the information and selectively forward messages. Most existing countermeasures for detecting and locating wormhole links either require extra hardware or are too complex for the inherently capability-constrained sensor nodes. These methods are not suitable for wireless sensor networks.This thesis introduces the related background in wireless sensor networks, classes the wormhole attacks, and anylasises the advantages and disadvantages of the existing countermeasures. Moreover, this thesis proposes the different detection measures to the closed and half-open wormhole attacks.For detecting closed wormhole attacks, this thesis uses statistical analysis. First, the SMR routing protocol is used to find the routing from the source node and the destination node. After that, the protocol sends messages. Sencondly, the system gets the useage time of each link and obtains suspect link set by using hypothesis testing. Finally, the system utilizes the time restrition to find the wormhole-attacted links in the network topology. For half-open wormhole attacks, the thesis uses hop-analysis. The wormhole attack changes the original topology of the networks. According to this, the thesis suggests a new wormhole attack detection method. This thesis also proposes the mapping amoung the node density, the node’s communication radiu and the maximum hop in the same neighbor set. According to the relation of the neighbors, the system knows whether the topology changes or not. These detection methods do not need extra hardware, time synchronization or computing-complexity.The thesis describes detailedly the process of the two algorithms, and tests these algorithms’ accurity and commucation volumn by simulating. |