An Intelligent Machine Learning based Intrusion Detection System (IDS) for Smart cities networks




IoT, IDS, Machine learning


INTRODUCTION: Internet of Things (IoT) along with Cloud based systems are opening a new domain of development. They have several applications from smart homes, Smart farming, Smart cities, smart grid etc. Due to IoT sensors operating in such close proximity to humans and critical infrastructure, there arises privacy and security issues. Securing an IoT network is very essential and is a hot research topic. Different types of Intrusion Detection Systems (IDS) have been developed to detect and prevent an unauthorized intrusion into the network.

OBJECTIVES: The paper presents a Machine Learning based light, fast and reliable Intrusion Detection System (IDS).

METHODS: Multiple Supervised machine learning algorithms are applied and their results are compared. Algorithms applied include Linear Discriminant analysis, Quadratic Discriminant Analysis, XG Boost, KNN and Decision Tree.

RESULTS: Simulation results showed that KNN Algorithm gives us the highest accuracy, followed by XG Boost and Decision Tree which are not far behind.

CONCLUSION: A fast, secure and intelligent IDS is developed using machine learning algorithms. The resulting IDS can be used in various types of networks especially in IoT based networks.


Download data is not yet available.


Sairam KV, Kumar AP. A Review on Internet of Things based SWSN.

Kadhim KT, Alsahlany AM, Wadi SM, Kadhum HT. An overview of patient’s health status monitoring system based on Internet of Things (IoT). Wireless Personal Communications. 2020 Oct;114(3):2235-62. DOI:

Stolojescu-Crisan C, Crisan C, Butunoi BP. An IoT-based smart home automation system. Sensors. 2021 Jan;21(11):3784. DOI:

Khanboubi F, Boulmakoul A, Tabaa M. Impact of digital trends using IoT on banking processes. Procedia Computer Science. 2019 Jan 1;151:77-84. DOI:

Jeong JI. A study on the IoT based smart door lock system. InInformation Science and Applications (ICISA) 2016 2016 (pp. 1307-1318). Springer, Singapore. DOI:

Olasupo TO. Wireless communication modeling for the deployment of tiny IoT devices in rocky and mountainous environments. IEEE Sensors Letters. 2019 May 22;3(7):1-4. DOI:

Ahsaan SU, Mourya AK. Prognostic modelling for smart cities using smart agents and IoT: A proposed solution for sustainable development. EAI Endorsed Transactions on Smart Cities. 2021 May 13;5(16):e3-.

Shukla P. ML-IDS: A machine learning approach to detect wormhole attacks in Internet of Things. In2017 Intelligent Systems Conference (IntelliSys) 2017 Sep 7 (pp. 234-240). IEEE. DOI:

Pooja G, Sundar R, Harshini R, Arjuna S. Recent Trends and Challenges in Smart Cities. EAI Endorsed Transactions on Smart Cities. 2022 Sep 21;6(3). DOI:

Nawir M, Amir A, Yaakob N, Lynn OB. Internet of Things (IoT): Taxonomy of security attacks. In2016 3rd international conference on electronic design (ICED) 2016 Aug 11 (pp. 321-326). IEEE. DOI:

Chehida S, Baouya A, Bozga M, Bensalem S. Exploration of impactful countermeasures on IoT attacks. In2020 9th Mediterranean Conference on Embedded Computing (MECO) 2020 Jun 8 (pp. 1-4). IEEE. DOI:

Tsiknas K, Taketzis D, Demertzis K, Skianis C. Cyber threats to industrial IoT: a survey on attacks and countermeasures. IoT. 2021 Mar;2(1):163-86. DOI:

Bagaa M, Taleb T, Bernabe JB, Skarmeta A. A machine learning security framework for iot systems. IEEE Access. 2020 May 21;8:114066-77. DOI:

Khan IU, Qureshi IM, Aziz MA, Cheema TA, Shah SB. Smart IoT control-based nature inspired energy efficient routing protocol for flying ad hoc network (FANET). IEEE Access. 2020 Mar 18;8:56371-8. DOI:

Khan IU, Nain Zukhraf SZ, Abdollahi A, Imran SA, Qureshi IM, Aziz MA, Hussian Shah SB. Reinforce based optimization in wireless communication technologies and routing techniques using internet of flying vehicles. InThe 4th international conference on future networks and distributed systems (ICFNDS) 2020 Nov 26 (pp. 1-6). DOI:

Khan IU, Abdollahi A, Jamil A, Baig B, Aziz MA, Subhan F. A Novel Design of FANET Routing Protocol Aided 5G Communication Using IoT. Journal of Mobile Multimedia. 2022 Apr 4:1333-54. DOI:

Khan IU, Alturki R, Alyamani HJ, Ikram MA, Aziz MA, Hoang VT, Cheema TA. RSSI-controlled long-range communication in secured IoT-enabled unmanned aerial vehicles. Mobile information systems. 2021 Mar 1;2021. DOI:

Khan IU, Abdollahi A, Alturki R, Alshehri MD, Ikram MA, Alyamani HJ, Khan S. Intelligent Detection System Enabled Attack Probability Using Markov Chain in Aerial Networks. Wireless Communications and Mobile Computing. 2021 Sep 9;2021. DOI:

Abdollahi A, Fathi M. An intrusion detection system on ping of death attacks in IoT networks. Wireless Personal Communications. 2020 Jun;112(4):2057-70.

Sherasiya T, Upadhyay H. Intrusion detection system for internet of things. Int. J. Adv. Res. Innov. Ideas Educ.(IJARIIE). 2016;2(3).

Hodo E, Bellekens X, Hamilton A, Dubouilh PL, Iorkyase E, Tachtatzis C, Atkinson R. Threat analysis of IoT networks using artificial neural network intrusion detection system. In2016 International Symposium on Networks, Computers and Communications (ISNCC) 2016 May 11 (pp. 1-6). IEEE. DOI:

Roopak M, Tian GY, Chambers J. An intrusion detection system against ddos attacks in iot networks. In2020 10th annual computing and communication workshop and conference (CCWC) 2020 Jan 6 (pp. 0562-0567). IEEE. DOI:

Jan SU, Ahmed S, Shakhov V, Koo I. Toward a lightweight intrusion detection system for the internet of things. IEEE Access. 2019 Mar 28;7:42450-71. DOI:

Ramadan RA, Yadav K. A novel hybrid intrusion detection system (IDS) for the detection of internet of things (IoT) network attacks. Annals of Emerging Technologies in Computing (AETiC), Print ISSN. 2020 Dec 20:2516-0281.

Ramadan RA, Yadav K. A novel hybrid intrusion detection system (IDS) for the detection of internet of things (IoT) network attacks. Annals of Emerging Technologies in Computing (AETiC), Print ISSN. 2020 Dec 20:2516-0281. DOI:

Abdollahi A, Fathi M. An intrusion detection system on ping of death attacks in IoT networks. Wireless Personal Communications. 2020 Jun;112(4):2057-70. DOI:

Khraisat A, Gondal I, Vamplew P, Kamruzzaman J, Alazab A. A novel ensemble of hybrid intrusion detection system for detecting internet of things attacks. Electronics. 2019 Oct 23;8(11):1210. DOI:

Attia TM. Challenges and opportunities in the future applications of IoT technology.

Rizwan, P., Suresh, K. and Babu, M.R., 2016, October. Real-time smart traffic management system for smart cities by using Internet of Things and big data. In 2016 international conference on emerging technological trends (ICETT) (pp. 1-7). IEEE. DOI:

Fiore, S., Elia, D., Pires, C.E., Mestre, D.G., Cappiello, C., Vitali, M., Andrade, N., Braz, T., Lezzi, D., Moraes, R. and Basso, T., 2019. An integrated big and fast data analytics platform for smart urban transportation management. IEEE Access, 7, pp.117652-117677. DOI:

Mohammad, N., Muhammad, S., Bashar, A. and Khan, M.A., 2019. Formal analysis of human-assisted smart city emergency services. Ieee Access, 7, pp.60376-60388. DOI:

Shah, S.A., Seker, D.Z., Rathore, M.M., Hameed, S., Yahia, S.B. and Draheim, D., 2019. Towards disaster resilient smart cities: Can internet of things and big data analytics be the game changers?. IEEE Access, 7, pp.91885-91903. DOI:

Pradhan B, Bhattacharyya S, Pal K. IoT-based applications in healthcare devices. Journal of healthcare engineering. 2021 Mar 19;2021. DOI:

Asadullah M, Raza A. An overview of home automation systems. In2016 2nd international conference on robotics and artificial intelligence (ICRAI) 2016 Nov 1 (pp. 27-31). IEEE. DOI:

Ou Q, Zhen Y, Li X, Zhang Y, Zeng L. Application of internet of things in smart grid power transmission. In2012 third FTRA international conference on mobile, ubiquitous, and intelligent computing 2012 Jun 26 (pp. 96-100). IEEE. DOI:

Kim WS, Lee WS, Kim YJ. A review of the applications of the internet of things (IoT) for agricultural automation. Journal of Biosystems Engineering. 2020 Dec;45(4):385-400. DOI:

Gaur A, Scotney B, Parr G, McClean S. Smart city architecture and its applications based on IoT. Procedia computer science. 2015 Jan 1;52:1089-94. DOI:

Al-Nashif Y, Kumar AA, Hariri S, Luo Y, Szidarovsky F, Qu G. Multi-level intrusion detection system (ML-IDS). In2008 International Conference on Autonomic Computing 2008 Jun 2 (pp. 131-140). IEEE. DOI:

Derhab A, Guerroumi M, Gumaei A, Maglaras L, Ferrag MA, Mukherjee M, Khan FA. Blockchain and random subspace learning-based IDS for SDN-enabled industrial IoT security. Sensors. 2019 Jul 15;19(14):3119. DOI:

Ullah S, Khan MA, Ahmad J, Jamal SS, e Huma Z, Hassan MT, Pitropakis N, Buchanan WJ. HDL-IDS: a hybrid deep learning architecture for intrusion detection in the Internet of Vehicles. Sensors. 2022 Feb 10;22(4):1340. DOI:

Hussein AY, Falcarin P, Sadiq AT. Enhancement performance of random forest algorithm via one hot encoding for IoT IDS. Periodicals of Engineering and Natural Sciences (PEN). 2021 Aug 11;9(3):579-91. DOI:

Zolanvari M, Teixeira MA, Gupta L, Khan KM, Jain R. Machine learning-based network vulnerability analysis of industrial Internet of Things. IEEE Internet of Things Journal. 2019 Apr 18;6(4):6822-34. DOI:

Wang G, Hao J, Ma J, Huang L. A new approach to intrusion detection using Artificial Neural Networks and fuzzy clustering. Expert systems with applications. 2010 Sep 1;37(9):6225-32. DOI:

Chahal JK, Gandhi V, Kaushal P, Ramkumar KR, Kaur A, Mittal S. KAS-IDS: A Machine Learning based Intrusion Detection System. In2021 6th International Conference on Signal Processing, Computing and Control (ISPCC) 2021 Oct 7 (pp. 90-95). IEEE. DOI:

Prethi KN, Nithya S, Sangeeth DM, Rani RS, Praveen Kumar S. DNN Based Intelligent IDS for Anomaly Detection. International Journal of Advanced Research in Engineering and Technology. 2020 Oct 17;11(9).

Yoshimura N, Kuzuno H, Shiraishi Y, Morii M. DOC-IDS: A Deep Learning-Based Method for Feature Extraction and Anomaly Detection in Network Traffic. Sensors. 2022 Jun 10;22(12):4405. DOI:

Bedi P, Gupta N, Jindal V. I-SiamIDS: an improved Siam-IDS for handling class imbalance in network-based intrusion detection systems. Applied Intelligence. 2021 Feb;51(2):1133-51. DOI:

Moustafa N, Slay J. UNSW-NB15: a comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set). In2015 military communications and information systems conference (MilCIS) 2015 Nov 10 (pp. 1-6). IEEE. DOI:

Moustafa N, Slay J. The evaluation of Network Anomaly Detection Systems: Statistical analysis of the UNSW-NB15 data set and the comparison with the KDD99 data set. Information Security Journal: A Global Perspective. 2016 Apr 4;25(1-3):18-31. DOI:

Moustafa N, Slay J, Creech G. Novel geometric area analysis technique for anomaly detection using trapezoidal area estimation on large-scale networks. IEEE Transactions on Big Data. 2017 Jun 14;5(4):481-94. DOI:

Moustafa N, Creech G, Slay J. Big data analytics for intrusion detection system: Statistical decision-making using finite dirichlet mixture models. InData analytics and decision support for cybersecurity 2017 (pp. 127-156). Springer, Cham. DOI:

Sarhan M, Layeghy S, Moustafa N, Portmann M. Netflow datasets for machine learning-based network intrusion detection systems. InBig Data Technologies and Applications 2020 Dec 11 (pp. 117-135). Springer, Cham. DOI:

Moustafa N, Turnbull B, Choo KK. An ensemble intrusion detection technique based on proposed statistical flow features for protecting network traffic of internet of things. IEEE Internet of Things Journal. 2018 Sep 24;6(3):4815-30. DOI:

Koroniotis N, Moustafa N, Sitnikova E, Slay J. Towards developing network forensic mechanism for botnet activities in the IoT based on machine learning techniques. InInternational Conference on Mobile Networks and Management 2017 Dec 13 (pp. 30-44). Springer, Cham. DOI:




How to Cite

M. Y. Ayub, U. Haider, A. Haider, M. T. A. Tashfeen, H. Shoukat, and A. Basit, “An Intelligent Machine Learning based Intrusion Detection System (IDS) for Smart cities networks”, EAI Endorsed Trans Smart Cities, vol. 7, no. 1, p. e4, Mar. 2023.

Most read articles by the same author(s)