Wireless Sensor Network due to their Adhoc nature have emerged as a popular technology driving the growth of Internet of Things and Cyber Physical Systems. Wireless Sensor Networks due to their self-configuring nature are more vulnerable to attacks at all layers of the OSI model. Malicious attacks include packet drops, change in the data structure and mimicking other devices to destabilize the network. This work proposed an Intelligent Control Mechanism to secure WSN based on the principles of Distributed Automaton. Simulations carried out show the effectiveness of the proposed technique in not only improving the network performance but also reduction in time space complexities. The proposed techniques performs well even in heterogenous network by using the clustered behavior.