In this paper, an anomalous intrusion detection system is developed to detect malicious nodes in sensor networks. The proposed system has more reliability in comparison of its analogues and consumes the resources more efficiently. Here the base-station was known to be a trusted source and this helps the system can moderate the network more efficiently. In addition a node doesnpsilat block a compromised node when detects it and only send an alert to the base-station. Then the base-station will check transmission buffer of that node and if the base-station concludes that the node is compromised, the rest of the network will be informed, and the appropriate actions will be taken. This mechanism reduces the false positive rate.