Smart Detection of Routing Attacks in Wireless Sensor Networks Using Ml: Focus On Black Hole Threats

Authors

  • Rahul Nawkhare School of Electronics and Electrical Engineering, Lovely Professional University, Phagwara, Punjab, India. Author
  • Daljeet Singh School of Electronics and Electrical Engineering, Lovely Professional University, Phagwara, Punjab, India. Author
  • Swati Giadhane Department of Statistics, Wainganga College of Engineering and Management, Nagpur, Maharashtra, India. Author
  • Saurabh Chakole School of Electronics and Electrical Engineering, Lovely Professional University, Phagwara, Punjab, India. Author

DOI:

https://doi.org/10.47392/IRJAEM.2025.0259

Keywords:

Blackhole Attack, Wireless Sensor Networks (WSN), Intrusion Detection System (IDS), Machine Learning, Classification, Decision Tree, Random Forest, Logistic Regression, K-Nearest Neighbors, Confusion Matrix, Network Security, Anomaly Detection, F1 Score, Accuracy

Abstract

As wireless communication networks continue to expand, the need for protection against attacks on the routing of these networks, especially Blackhole attack, has increasingly been recognized as one of the most critical needs of the era. This research involves detecting and classifying Blackhole attacks in wireless sensor networks using different machine learning algorithms. The labeled dataset was then built using normal and Blackhole traffic, and a comparative analysis of four classification models was made: Decision Tree, Random Forest, Logistic Regression and K-Nearest Neighbors. The proposed models exhibit high accuracy, as demonstrated by experimental results, with the Decision Tree classifier outperforming all others with an accuracy of 99.9981% and an F1 score of 0.9997. The F1 scores of 0.9995 and 0.9990 for the Random Forest and Logistic Regression models also indicate excellent performance. In comparison, despite being effective, K-Nearest Neighbors performance was slightly lower at an F1 score of 0.9510. The error rate is also clearly shown in the confusion matrix, which for the very best models includes zero false negatives and only 3 false positives! Overall, decision tree-based approaches have been able to classify Blackhole attacks with a high level of accuracy and robustness while keeping false classifications to a minimum. This paper also facilitates automated and intelligent intrusion detection systems that benefit the security of wireless networks.

Downloads

Download data is not yet available.

Downloads

Published

2025-05-05