Abstract
In the current digital environment, cyberattacks continue to pose a serious risk and difficulty. Internet of Things (IoT) devices are becoming more and more vulnerable due to security problems like ransomware, malware, poor encryption, and IoT botnets. These flaws may result in ransom demands, data tampering, illegal access, and system risks. Creating strong cybersecurity procedures for contemporary smart environments is essential to resolving these problems. This strategy uses proactive network traffic monitoring to spot any dangers in the Internet of Things ecosystem. Our approach is to improve Smart Environments' security and awareness of potential threats. Two IoT gateways were used to examine the effectiveness and performance of a deep neural network (DNN) model. The results were promising: the model caused an average increase of less than 30 kb/s in network bandwidth and a mere 2% rise in CPU usage. Additionally, memory and power consumption were minimal, with 0.42 GB and 0.2 GB of memory usage for NVIDIA Jetson and Raspberry Pi devices, respectively, and an average 13.5% increase in power consumption per device. The machine learning models achieved nearly 93% detection accuracy and a 92% F1 score on the datasets used. Our framework demonstrates an effective and efficient method for detecting malware and attacks in Smart Environments.