Abstract
Wireless sensor networks (WSNs) are crucial in domains such as environmental monitoring, smart farming, and healthcare. These sensor node networks, which are dispersed over large regions, collect and transmit data to enable real-time decision-making. Contrarily, WSNs face significant security challenges, particularly from hostile nodes that can compromise data, obstruct communication, or steal confidential information. Malicious nodes significantly impact the reliability and efficiency of wireless sensor networks (WSNs). Addressing this challenge requires developing a method that accurately identifies trusted and vulnerable nodes. In this study, a new machine learning-based method is proposed to classify nodes within sensor networks by analyzing their characteristics such as energy consumption, communication behavior, and others. Machine learning algorithms can effectively detect malicious nodes. Metrics, including precision, recall, and F1 score, are used to evaluate the performance of models. Three prominent algorithms Random Forest (RF), K-Nearest Neighbors (KNN), and Support Vector Machine (SVM) are compared. Experimental results indicate that the RF algorithm achieves superior results due to its robustness and reliability in detecting malicious node behavior, while also enhancing the security and energy efficiency of WSNs.

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Copyright (c) 2025 Iraqi Journal of Intelligent Computing and Informatics (IJICI)