Abstract
Deployment of sensor network in hostile environment makes it mainly vulnerable to battery drainage attacks because it is impossible to recharge or replace the battery power of sensor nodes. The motivation of a large portion of research efforts has been to maximize the network lifetime, where the lifetime of network is measured from the instant of deployment to the point when one of the nodes has exhausted its limited power source and becomes in-operational commonly referred as first node failure. But there is a class of resource consumption attack called vampire attack which permanently disables the whole network by quickly draining nodes battery. In this novel approach, forwarding as well as discovery phase of the protocol are considered to avoid attack. Here algorithm overhead is reduced and discovery phase is considered to avoid vampire attack.