Wireless Sensor Networks are widely used in various domains like military, habitat monitoring, medical monitoring for humans, environment monitoring in industries. Some applications of WSN are critical in nature and would have adverse effects as a result of intrusion. It is critical to detect and isolate the compromised nodes in order to avoid being misled by the falsified information injected by the adversary through compromised nodes. It is important to avoid malicious damage while information transmits in wireless network. So Wireless Intrusion Detection System (WIDS) becomes one of important topics in wireless sensor networks. In this thesis, we proposed a novel scheme that is based on distributed intrusion detection system. The individual IDS agent is placed in every node. Each IDS agent runs independently. If anomaly is detected in the local data, neighbouring IDS agents can cooperatively participate in global intrusion detection process. Here we have focus on detection of two types of attacks: sequence no. attack and flooding attack in AODV protocol. Simulation results show that our proposed intrusion detection system can effectively detect compromised node.