Defending against wormhole attacks in wireless sensor networks