Aim of project is to develop a novel probability model to analyze best redundancy level In terms of path redundancy, source redundancy and best IDs. The contribution of project is to decide “how many paths to use and which path to use” in order to tolerate residual compromised node that survive our IDs to increase the life time of diverse wireless sensor networks. This is especially a critical issue in military or mission-critical WSN applications. Sensor nodes (SNs) close to the base station (BS) are more critical in gathering and routing sensing data. In the literature, various schemes have been designed for preserving critical SNs from energy exhaustion so as to prolong the system lifetime maximization; however, how to counter selective capture. We propose and analyze an adaptive network management algorithm with 3 countermeasures to counter selective capture: (1) optimal communication range and mode adjustment; (2) intra-clustering scheduling and inter-cluster multihop routing scheme; and (3) voting based intrusion detection. We develop a probability model to reveal the tradeoff between energy consumption vs. reliability and security gain with the goal to maximize the lifetime of a query-based WSN.