This study presents a comprehensive comparative analysis of machine learning models for real-time detection of Mirai botnet attacks in IoT networks. With the proliferation of IoT devices expected to reach 75 billion by 2025, the need for robust security solutions is critical, especially given the estimated $100 billion in annual global damages from IoT security breaches. We evaluated four machine learning models—Logistic Regression, Random Forest, Gradient Boosting, and Support Vector Machine—using the BoTNeTIoT-L01 dataset, which contains network traffic from nine IoT devices. The study implemented a sophisticated feature engineering approach, extracting twenty-three statistically engineered features from network traffic patterns over 10-second time windows. All models demonstrated exceptional performance, with Random Forest achieving the highest accuracy of 0.999995 and a perfect ROC-AUC score of 1.000000. Gradient Boosting followed closely with 0.999992 accuracy, while SVM and Logistic Regression achieved 0.999910 and 0.999846 accuracy, respectively. These results significantly surpass previous studies’ benchmarks, where the best reported accuracy was 99.1%. The findings suggest that properly engineered features combined with ensemble learning methods can provide highly effective real-time detection of Mirai botnet attacks in IoT environments, offering a promising solution for securing resource-constrained IoT networks.
Cite this paper
Kontagora, M. M. , Adeshina, S. A. and Musa, H. (2025). A Comparative Analysis of Machine Learning Models for Real-Time IoT Threat Detection with Focus on Mirai Botnet. Open Access Library Journal, 12, e2855. doi: http://dx.doi.org/10.4236/oalib.1112855.
Malik, A.S., Boyko, O., Aktar, N. and Young, W.F. (2001) A Comparative Study of MR Imaging Profile of Titanium Pedicle Screws. Acta Radiologica, 42, 291-293. https://doi.org/10.1080/028418501127346846
Zhou, Z., Chen, X., Li, E., Zeng, L., Luo, K. and Zhang, J. (2019) Edge Intelligence: Paving the Last Mile of Artificial Intelligence with Edge Computing. Proceedings of the IEEE, 107, 1738-1762. https://doi.org/10.1109/jproc.2019.2918951
Soldatos, J., Kefalakis, N., Hauswirth, M., Serrano, M., Calbimonte, J., Riahi, M., et al. (2015) OpenIoT: Open Source Internet-Of-Things in the Cloud. In: Podnar Žarko, I., Pripužić, K. and Serra-no, M., Eds., Interoperability and Open-Source Solutions for the Internet of Things, Springer, 13-25. https://doi.org/10.1007/978-3-319-16546-2_3
Antonakakis, M., et al. (2017) Understanding the Mirai Botnet. USENIX Security Symposium, 1093-1110.https://elie.net/static/files/understanding-the-mirai-botnet/understanding-the-mirai-botnet-paper.pdf
Kolias, C., Kambourakis, G., Stavrou, A. and Voas, J. (2017) DDOS in the IoT: Mirai and Other Botnets. Computer, 50, 80-84. https://doi.org/10.1109/mc.2017.201
Al-Fuqaha, A., Guizani, M., Mohammadi, M., Aledhari, M. and Ayyash, M. (2015) Internet of Things: A Survey on Enabling Technologies, Protocols, and Applications. IEEE Communications Surveys & Tutorials, 17, 2347-2376. https://doi.org/10.1109/comst.2015.2444095
Abdulghani, H.A., Nijdam, N.A., Collen, A. and Konstantas, D. (2019) A Study on Security and Privacy Guidelines, Countermeasures, Threats: IoT Data at Rest Perspective. Symmetry, 11, Article 774. https://doi.org/10.3390/sym11060774
Al-Garadi, M.A., Mohamed, A., Al-Ali, A.K., Du, X., Ali, I. and Guizani, M. (2020) A Survey of Machine and Deep Learning Methods for Internet of Things (IoT) Security. IEEE Communications Sur-veys & Tutorials, 22, 1646-1685. https://doi.org/10.1109/comst.2020.2988293
Hussain, F., Hussain, R., Hassan, S.A. and Hossain, E. (2020) Machine Learning in Iot Security: Current Solutions and Future Challenges. IEEE Communica-tions Surveys & Tutorials, 22, 1686-1721. https://doi.org/10.1109/comst.2020.2986444
Panda, M., Mousa, A.A.A. and Hassanien, A.E. (2021) Developing an Efficient Feature Engineering and Machine Learning Model for Detecting IoT-Botnet Cyber Attacks. IEEE Access, 9, 91038-91052. https://doi.org/10.1109/access.2021.3092054
Alissa, K., Alyas, T., Zafar, K., Abbas, Q., Tabassum, N. and Sakib, S. (2022) Botnet Attack Detection in IoT Using Machine Learning. Computa-tional Intelligence and Neuroscience, 2022, Article ID: 4515642. https://doi.org/10.1155/2022/4515642
Al-Sarem, M., Saeed, F., Alkhammash, E.H. and Alghamdi, N.S. (2021) An Aggregated Mutual Information Based Feature Selection with Machine Learning Methods for Enhancing IoT Botnet Attack Detection. Sensors, 22, Article 185. https://doi.org/10.3390/s22010185
Alothman, Z., Alkasassbeh, M. and Al-Haj Baddar, S. (2020) An Efficient Ap-proach to Detect IoT Botnet Attacks Using Machine Learning. Journal of High Speed Networks, 26, 241-254. https://doi.org/10.3233/jhs-200641
Warner, K.S.R. and Wäger, M. (2019) Building Dynamic Capabilities for Digital Transformation: An Ongoing Process of Strategic Renewal. Long Range Planning, 52, 326-349. https://doi.org/10.1016/j.lrp.2018.12.001
Gupta, M., Abdelsalam, M., Khorsandroo, S. and Mittal, S. (2020) Security and Privacy in Smart Farming: Challenges and Opportunities. IEEE Access, 8, 34564-34584. https://doi.org/10.1109/access.2020.2975142
Chiara, P.G. (2022) The Iot and the New EU Cybersecurity Regulato-ry Landscape. International Review of Law, Computers & Technology, 36, 118-137. https://doi.org/10.1080/13600869.2022.2060468
Ioulianou, P., Vasilakis, V., Moscholios, I. and Logothetis, M. (2018) A Signature-Based Intrusion Detection System for the Internet of Things. Information and Communication Technol-ogy Form. https://shorturl.at/nfGpE
Pawlicki, M., Pawlicka, A., Kozik, R. and Choraś, M. (2023) The Survey and Me-ta-Analysis of the Attacks, Transgressions, Countermeasures and Security Aspects Common to the Cloud, Edge and IoT. Neurocomputing, 551, Article ID: 126533. https://doi.org/10.1016/j.neucom.2023.126533
Alhowaide, A., Alsmadi, I. and Tang, J. (2021) Towards the Design of Real-Time Autonomous IoT NIDS. Cluster Computing, 26, 2489-2502. https://doi.org/10.1007/s10586-021-03231-5