A Hybrid Machine Learning-Based Smart Home IoT Security System for Threat Detection, Classification, and Alert Mechanisms
The growing usage of Internet of Things gadgets has facilitated smart environments including automated homes, smart lighting systems, and smart industrial applications. In spite of these advantages, the IoT devices are frequently not well secured because of their poor computing power and compact architecture. This makes them very susceptible to cyberattacks that may cripple the functionality of their devices, interfere with network processes or reveal confidential information. The identification of malicious activity on the IoT networks has thus become a key challenge to cybersecurity. This paper has discussed a machine learning-driven intrusion detection system that aims to detect attacks on IoT devices. An actual IoT system based on ESP32 microcontrollers and a smart bulb was used to create network traffic both in the regular operation environment and in the simulated attack environment. To enhance the efficiency of the model, the data obtained on the traffic was subjected to various preprocessing steps such as data cleaning, feature encoding, normalization and feature selection. Local Outlier Factor (LOF) based anomaly detection method was employed to determine abnormal network behavior with a random forest classifier used to determine the category of attack. The system is constantly watching the IoT traffic and sends automatic email notifications in case of suspicious activity. The outcomes of the experiment suggest that machine learning methods can be successfully used to differentiate between legitimate and malicious network behavior, which can be used as a viable solution to enhance the security and surveillance of IoT-based systems. The proposed system achieved an accuracy of 88.22%, precision of 90.41%, recall of 85.51%, and an F1-score of 87.89%, demonstrating effective detection of malicious IoT network activity.