Enhancing The Security of Wireless Sensor Networks Through Lightweight Ids and Secure Mqtt Communication
Wireless Sensor Networks (WSNs) are increasingly deployed in environments where security, reliability, and efficient communication are essential. However, lightweight communication protocols such as MQTT expose these networks to various attacks, including identity-based intrusions and message-flooding scenarios. This paper proposes a secure architecture that integrates hierarchical clustering, intrusion detection, and cryptographic mechanisms to strengthen WSN resilience. A practical simulation environment was developed to replicate MQTT-based communication between sensor nodes, an MQTT broker, and a data aggregator, enabling controlled experimentation with Denial-of-Service (DoS) and Sybil attacks. The Intrusion Detection System (IDS) designed for this work operates through a four-layer pipeline—data collection, preprocessing, detection, and response—and incorporates signature-based, anomaly-based, and machine-learning-assisted techniques. Experimental results demonstrate that the IDS achieves high detection accuracy with low false-positive rates, maintains real-time responsiveness, and preserves low computational overhead. These findings confirm the feasibility of integrating lightweight IDS mechanisms into resource-constrained WSN environments whilst providing a foundation for future extensions involving blockchain-based data integrity and advanced key management.
