The Internet of Things (IoT) is an advancing important technology offers multiple perks, such as webcams, baby monitors, room temperature controllers, smart security cameras and intelligent home automations resulting in the creation of intelligent settings that greatly simplify daily living. However, there are cybersecurity dangers associated with IoT devices due to their lack of protection. For example, Internet of Things botnets have become a major risk. IoT has been a boon for attackers to perform malicious attacks like information theft, DDoS, sending junk data to disrupt networks. IoT devices face serious security issues, from having default weak and common passwords, and a lack of security, rarely and poorly monitored, to having open access to management systems, always connected to the internet. In this paper, we used the N-BaIoT dataset which includes datasets of 9 IoT devices infected with 2 Bot viruses Mirai and Bashlite, where each botnet has 5 sub-attacks and the benign datasets of 9 devices. An analysis with the N-BaIoT dataset which initially had 115 features were reduced to 35 features by using manual reduction and further reduced to single feature in 5-time instances equivalent to 5 features using heat map. We then classified the sub-attacks of 2 botnets and benign of 9 IoT devices by using 7 Machine Learning based classifiers in the Weka tool and Python and compared our results with the manually reduced 35 Features and Heat map based 5 features. Performance metrics like correctly classified, incorrectly classified instances and time taken to build the model were evaluated to verify the proposed work. We found out that over 3 ensemble machine learning classifiers performed extremely well with 99 % accuracies for all devices. In order to verify the logic of our work we tried implementing our proposed model in a different dataset with 3 ensemble classifiers and were able to achieve high detection rates.


Internet of Things, BotNet Attacks, Ensemble Machine Learning, Heat Map, Reduced Feature Space,


Download data is not yet available.


  1. P.L.S. Jayalaxmi, R. Saha, G. Kumar, M. Conti, T.H. Kim, Machine and Deep Learning Solutions for Intrusion Detection and Prevention in IoTs: A Survey. IEEE Access, 10, (2022) 121173-121192. https://doi.org/10.1109/ACCESS.2022.3220622
  2. M. Yair, B. Michael, M. Yael, M. Yisroel, B. Dominik, S. Asaf, E. Yuval, N-BaIoT: Network-based Detection of IoT Botnet Attacks Using Deep Autoencoders. IEEE Pervasive Computing, 13(9), (2018) 12-22. https://doi.org/10.1109/MPRV.2018.03367731
  3. M. Elrawy, A. Awad, H. Hamed, Intrusion detection systems for IoT-based smart environments: a survey. Journal of Cloud Computing, 7(1), (2018) 1-20. https://doi.org/10.1186/s13677-018-0123-6
  4. J. King, A.I. Awad, A distributed security mechanism for resource-constrained IoT devices. Informatica (Slovenia), 40(1), (2016) 133–143.
  5. M. Weber, M. Boban (2016) Security challenges of the internet of things In: 2016 39th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), IEEE, Croatia. https://doi.org/10.1109/MIPRO.2016.7522219
  6. A.A. Gendreau, M. Moorman (2016) Survey of intrusion detection systems towards an end to end secure internet of things. In: 2016 IEEE 4th International Conference on Future Internet of Things and Cloud (FiCloud), IEEE, Austria. https://doi.org/10.1109/FiCloud.2016.20
  7. A. Ahmadian Ramaki, A. Rasoolzadegan, A. Javan Jafari, A systematic review on intrusion detection based on the hidden markov model. Statistical Analysis and Data Mining: The ASA Data Science Journal, 11(3), (2018) 111–134. https://doi.org/10.1002/sam.11377
  8. G. Kumar, K. Kumar, M. Sachdeva, The use of artifcial intelligence based techniques for intrusion detection: a review. Artificial Intelligence Review, 34(4), (2010) 369–387. https://doi.org/10.1007/s10462-010-9179-5
  9. R. McKay, B. Pendleton, J. Britt, B. Nakhavanit Machine learning algorithms on botnet traffc: ensemble and simple algorithms. In: Proceedings of the 2019 3rd International Conference on Compute and Data Analysis. ACM, (2019) 31–35. https://doi.org/10.1145/3314545.3314569
  10. A. Patcha, J.M. Park, An overview of anomaly detection techniques: existing solutions and latest technological trends. Computer Networks, 51(12), (2007) 3448–3470. https://doi.org/10.1016/j.comnet.2007.02.001
  11. M. Sabhnani, G. Serpen, Application of machine learning algorithms to KDD intrusion detection dataset within misuse detection context. In: Proc. of International Conference on Machine Learning: Models, Technologies, and Applications, 1, (2003) 209–215.
  12. A. Jain, R. Duin, J. Mao, Statistical pattern recognition: a review. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(1), (2000) 4–37. https://doi.org/10.1109/34.824819
  13. S. Saraswathi, G.R. Suresh, J. Katiravan, False alarm detection using dynamic threshold in medical wireless sensor networks. Wireless Networks, 27, (2021) 925–937. https://doi.org/10.1007/s11276-019-02197-y
  14. C.M. Nalayini, K. Jeevaa, Detection of DDoS Attack Using Machine Learning Algorithms. SSRN, 9(7), (2022) 4173187.
  15. J. Katiravan, A Two level Detection of Routing layer attacks in Hierarchical Wireless Sensor Networks using learning based energy prediction. KSII Transactions on Internet and Information Systems, 9(11), (2015) 4644-4661. https://doi.org/10.3837/tiis.2015.11.022
  16. N. Dharini, R. Balakrishnan and A. P. Renold, "Distributed detection of flooding and gray hole attacks in Wireless Sensor Network," 2015 International Conference on Smart Technologies and Management for Computing, Communication, Controls, Energy and Materials (ICSTM), Avadi, India, 2015. https://doi.org/10.1109/ICSTM.2015.7225410
  17. Dharini, N., Duraipandian, N. Katiravan, J. ELPC-Trust Framework for Wireless Sensor Networks. Wireless Pers Commun 113, 1709–1742 (2020). https://doi.org/10.1007/s11277-020-07288-0
  18. A. Allhusen, I. Alsmadi, A. Wahbeh, M. Al-Ramahi, A. Al-Omari, (2021) Dark Web Analytics: A Comparative Study of Feature Selection and Prediction Algorithms. SSRN, 3949786.
  19. S. Nomm, B. Hayretdin, (2018) Unsupervised Anomaly Based Botnet Detection in IoT Networks. Proceedings of IEEE International Conference on Machine learning and applications, IEEE, USA. https://doi.org/10.1109/ICMLA.2018.00171
  20. A. Almomani, (2023). Darknet traffic analysis and classification system based on modified stacking ensemble learning algorithms. Information Systems and e-Business Management, 1-32. https://doi.org/10.1007/s10257-023-00626-2
  21. J. Yousra, R. Navid, Multi-Layer Perceptron Artificial Neural Network Based IoT Botnet Traffic Classification. Proceedings of the future technology conferences, 1, (2019) 973-984. https://doi.org/10.1007/978-3-030-32520-6_69
  22. Q. Abu Al-Haija, M. Krichen, W. Abu Elhaija, Machine-learning-based darknet traffic detection system for IoT applications. Electronics, 11(4), (2022) 556. https://doi.org/10.3390/electronics11040556
  23. B. Hayretdin, N. Sven, B. Fabio, (2018) Dimensionality Reduction for Machine Learning Based IoT Botnet Detection. Proceedings of the IEEE International Conference on Control, Automation, Robotics and Vision, IEEE, Singapore. https://doi.org/10.1109/ICARCV.2018.8581205
  24. H. Mohanty, A.H. Roudsari, A.H. Lashkari, Robust stacking ensemble model for darknet traffic classification under adversarial settings. Computers & Security, 120, (2022) 102830. https://doi.org/10.1016/j.cose.2022.102830
  25. T. Hasan, J. Malik, I. Bibi, W.U. Khan, F.N. Al-Wesabi, K. Dev, G. Huang, (2022). Securing industrial internet of things against botnet attacks using hybrid deep learning approach. IEEE Transactions on Network Science and Engineering, 10(5), (2022) 2952-2963. https://doi.org/10.1109/TNSE.2022.3168533
  26. N. Rust-Nguyen, M. Stamp, (2022) Darknet traffic classification and adversarial attacks. arXiv. https://doi.org/10.48550/arXiv.2206.06371
  27. A. Hasan, H. Theyazn, H. Aldhyani. Botnet Attack Detection by Using CNN-LSTM Model for Internet of Things Applications. Security and Communication Networks, 2021, (2021). https://doi.org/10.1155/2021/3806459
  28. S. Bharath, S. Dineshkumar, P. Pankesh, G.B. John, I.A. Muhammad, (2021) Edge2Guard: Botnet Attacks Detecting Offline Models for Resource-Constrained IoT Devices. Proceedings of IEEE International Conference on Pervasive Computing and Communications Workshops and other Affiliated Events, IEEE, Germany. https://doi.org/10.1109/PerComWorkshops51409.2021.9431086
  29. A. Mahi, M. Hassan, M.B.I. Mohamed, IoT Botnet Attack Detection Based on Optimized Extreme Gradient Boosting and Feature Selection. Sensors. 20(21), (2020) 1-21.https://doi.org/10.3390/s20216336
  30. A.O. Prokofiev, Y.S. Smirnova, V.A. Surov, (2018). A method to detect Internet of Things botnets. In 2018 IEEE Conference of Russian Young Researchers in Electrical and Electronic Engineering (EIConRus), IEEE, Russia. https://doi.org/10.1109/EIConRus.2018.8317041
  31. M.Y. Alzahrani, A.M. Bamhdi, Hybrid deep-learning model to detect botnet attacks over internet of things environments. Soft Computing, 26, (2022) 164–175. https://doi.org/10.1007/s00500-022-06750-4
  32. K. Jiyeon, W. Hyerin, S. Minsun, H. Seungah, C. Eunjung Feature Analysis of IoT Botnet Attacks based on RNN and LSTM, International Journal of Engineering Trends and Technology, 68(4), (2020) 43-47. https://doi.org/10.14445/22315381/IJETT-V68I4P208S
  33. D. Cullen, J. Halladay, N. Briner, R. Basnet, J. Bergen, T. Doleck, Evaluation of synthetic data generation techniques in the domain of anonymous traffic classification. IEEE Access, 10, (2022) 129612-129625. https://doi.org/10.1109/ACCESS.2022.3228507
  34. I. Ullah, Q.H. Mahmoud, (2020) A scheme for generating a dataset for anomalous activity detection in iot networks. In Canadian conference on artificial intelligence, Springer International Publishing.
  35. K. Alissa, T. Alyas, K. Zafar, Q. Abbas, N. Tabassum, S. Sakib, Botnet attack detection in iot using machine learning. Computational Intelligence and Neuroscience, 2022, (2022). https://doi.org/10.1155/2022/4515642
  36. M. Almseidin, M. Alkasassbeh, An Accurate Detection Approach for IoT Botnet Attacks Using Interpolation Reasoning Method. Information, 13(6), (2022) 300. https://doi.org/10.3390/info13060300
  37. N. Dharini, S.P. Shakthi, S.S. Shruthi, (2023) Botnet Attack Detection in IoT-Based Security Camera Device Using Principal Component Analysis with Various Machine Learning Algorithms. Proceedings of the 2nd International Conference on Cognitive and Intelligent Computing. ICCIC 2022. Cognitive Science and Technology. Springer, Singapore. https://doi.org/10.1007/978-981-99-2746-3_65