Secure and energy efficient transmission is a main concern in many wireless sensor network applications. In this paper, two types of denial-of-service attacks that affect the routing layer are analyzed and an energy efficient countermeasure is proposed. The performance of the application solely depends on accuracy and reliability of information updated in a timely fashion. The adaptive nature of network demands a cognitive algorithm, used in detecting and re-routing the information upon link failure due to physical, resource depletion or intrusion by an adversary. The proposed method, does not require any additional hardware, hence the survivability of the sensors is maintained, making the application robust, cost effective and energy efficient.