Enhancing IoT Security: A Comparative Analysis of Machine Learning Algorithms for Attack Detection
Muskan Garg, Síma · 2025
The applications of the Internet of things(IoT) have grown at an exponential rate in recent years. However, it also brings up security-related concerns. While the common response techniques like firewalls, antivirus software, spyware, and authentication mechanisms offer security in many domains, viruses and intrusion attacks continue to pose a threat. To solve this issue, our research performs a thorough comparison of the different machine learning techniques, evaluating how well they can detect and predict attacks associated with the Internet of Things. This article uses Machine learning (ML) algorithms to thoroughly investigate early identification strategies for IoT attacks. We do this by using the UNSW-NB15 Dataset collected from Kaggle. Three machine learning algorithms—Logistic regression (LR), k-nearest neighbors (k-NN), and Gradient boosting (GB) analyzed with the UNSW-NB15 dataset in this research. In order to evaluate how effectively algorithms identify attacks, many performance metrics are used. These metrics include accuracy, recall, F1 score, ROC curve, and confusion matrix. This analysis helps choose the best machine learning methods for a given IoT security scenario. This comparative analysis provides crucial insights to researchers, practitioners, and industry professionals striving to secure IoT ecosystems against expanding cyber threats, laying the foundation for the growth of IoT attack detection approaches.