Wireless sensor network becomes popular both in civil and military jobs. Security is one of the significant challenges for wireless sensor networks because of their deployment in open and unprotected environment. As cryptographic mechanisms are not enough to protect wireless sensor networks from external attacks, intrusion detection system (IDS) needs to be introduced. In this book a policy based IDS is proposed that fits the current demands and restrictions of wireless ad hoc sensor network.