{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,31]],"date-time":"2026-03-31T04:08:53Z","timestamp":1774930133755,"version":"3.50.1"},"reference-count":43,"publisher":"MDPI AG","issue":"6","license":[{"start":{"date-parts":[[2024,6,5]],"date-time":"2024-06-05T00:00:00Z","timestamp":1717545600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Department of Cyber Security and Networks, School of Computing, Engineering and Built Environment, Glasgow Caledonian University, UK"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Future Internet"],"abstract":"<jats:p>Smart home devices, also known as IoT devices, provide significant convenience; however, they also present opportunities for attackers to jeopardize homeowners\u2019 security and privacy. Securing these IoT devices is a formidable challenge because of their limited computational resources. Machine learning-based intrusion detection systems (IDSs) have been implemented on the edge and the cloud; however, IDSs have not been embedded in IoT devices. To address this, we propose a novel machine learning-based two-layered IDS for smart home IoT devices, enhancing accuracy and computational efficiency. The first layer of the proposed IDS is deployed on a microcontroller-based smart thermostat, which uploads the data to a website hosted on a cloud server. The second layer of the IDS is deployed on the cloud side for classification of attacks. The proposed IDS can detect the threats with an accuracy of 99.50% at cloud level (multiclassification). For real-time testing, we implemented the Raspberry Pi 4-based adversary to generate a dataset for man-in-the-middle (MITM) and denial of service (DoS) attacks on smart thermostats. The results show that the XGBoost-based IDS detects MITM and DoS attacks in 3.51 ms on a smart thermostat with an accuracy of 97.59%.<\/jats:p>","DOI":"10.3390\/fi16060200","type":"journal-article","created":{"date-parts":[[2024,6,5]],"date-time":"2024-06-05T03:49:28Z","timestamp":1717559368000},"page":"200","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":29,"title":["Implementation of Lightweight Machine Learning-Based Intrusion Detection System on IoT Devices of Smart Homes"],"prefix":"10.3390","volume":"16","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-9243-4364","authenticated-orcid":false,"given":"Abbas","family":"Javed","sequence":"first","affiliation":[{"name":"Department of Electrical and Computer Engineering, COMSATS University Islamabad, Lahore Campus, Punjab 54000, Pakistan"}]},{"given":"Amna","family":"Ehtsham","sequence":"additional","affiliation":[{"name":"Department of Electrical and Computer Engineering, COMSATS University Islamabad, Lahore Campus, Punjab 54000, Pakistan"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3730-2128","authenticated-orcid":false,"given":"Muhammad","family":"Jawad","sequence":"additional","affiliation":[{"name":"Department of Electrical and Computer Engineering, COMSATS University Islamabad, Lahore Campus, Punjab 54000, Pakistan"},{"name":"Hitachi Energy Research, Pawia 7, 31-154 Krak\u00f3w, Poland"}]},{"given":"Muhammad Naeem","family":"Awais","sequence":"additional","affiliation":[{"name":"Department of Electrical and Computer Engineering, COMSATS University Islamabad, Lahore Campus, Punjab 54000, Pakistan"}]},{"given":"Ayyaz-ul-Haq","family":"Qureshi","sequence":"additional","affiliation":[{"name":"Department of Cyber Security and Networks, School of Computing, Engineering and Built Environment, Glasgow Caledonian University, Glasgow G4 0BA, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6826-207X","authenticated-orcid":false,"given":"Hadi","family":"Larijani","sequence":"additional","affiliation":[{"name":"SMART Technology Research Centre, Department of Cyber Security and Networks, School of Computing, Engineering and Built Environment, Glasgow Caledonian University, Glasgow G4 0BA, UK"}]}],"member":"1968","published-online":{"date-parts":[[2024,6,5]]},"reference":[{"key":"ref_1","unstructured":"(2024, January 24). IoT.Business.News. Number of Connected IOT Devices Growing 9% to 12.3 Billion Globally, Cellular IOT Now Surpassing 2 Billion. Available online: https:\/\/iotbusinessnews.com\/2021\/09\/23\/13465-number-of-connected-iot-devices-growing-9-to-12-3-billion-globally-cellular-iot-now-surpassing-2-billion\/."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"82721","DOI":"10.1109\/ACCESS.2019.2924045","article-title":"A survey on IoT security: Application areas, security threats, and solution architectures","volume":"7","author":"Hassija","year":"2019","journal-title":"IEEE Access"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"1550147719844159","DOI":"10.1177\/1550147719844159","article-title":"SH-BlockCC: A secure and efficient Internet of things smart home architecture based on cloud computing and blockchain technology","volume":"15","author":"Singh","year":"2019","journal-title":"Int. J. Distrib. Sens. Netw."},{"key":"ref_4","first-page":"200152","article-title":"Multi-tiered Artificial Neural Networks model for intrusion detection in smart homes","volume":"16","author":"Sohail","year":"2022","journal-title":"Intell. Syst. Appl."},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Ferrag, M.A., Maglaras, L., Ahmim, A., Derdour, M., and Janicke, H. (2020). Rdtids: Rules and decision tree-based intrusion detection system for internet-of-things networks. Future Internet, 12.","DOI":"10.3390\/fi12030044"},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"387","DOI":"10.1007\/s10207-020-00508-5","article-title":"A novel scalable intrusion detection system based on deep learning","volume":"20","author":"Mighan","year":"2021","journal-title":"Int. J. Inf. Secur."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Ahmed, S., Khan, Z.A., Mohsin, S.M., Latif, S., Aslam, S., Mujlid, H., Adil, M., and Najam, Z. (2023). Effective and efficient DDoS attack detection using deep learning algorithm, multi-layer perceptron. Future Internet, 15.","DOI":"10.3390\/fi15020076"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Zhong, M., Zhou, Y., and Chen, G. (2021). Sequential model based intrusion detection system for IoT servers using deep learning methods. Sensors, 21.","DOI":"10.3390\/s21041113"},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"142206","DOI":"10.1109\/ACCESS.2021.3120626","article-title":"Intrusion detection system using machine learning for vehicular ad hoc networks based on ToN-IoT dataset","volume":"9","author":"Gad","year":"2021","journal-title":"IEEE Access"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"8514","DOI":"10.1109\/JIOT.2022.3194813","article-title":"CADeSH: Collaborative anomaly detection for smart homes","volume":"10","author":"Meidan","year":"2022","journal-title":"IEEE Internet Things J."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"107536","DOI":"10.1016\/j.compeleceng.2021.107536","article-title":"Three-layer hybrid intrusion detection model for smart home malicious attacks","volume":"96","author":"Shi","year":"2021","journal-title":"Comput. Electr. Eng."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"107044","DOI":"10.1016\/j.compeleceng.2021.107044","article-title":"Intrusion detection in cyber-physical systems using a generic and domain specific deep autoencoder model","volume":"91","author":"Thakur","year":"2021","journal-title":"Comput. Electr. Eng."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"102324","DOI":"10.1016\/j.scs.2020.102324","article-title":"Scalable machine learning-based intrusion detection system for IoT-enabled smart cities","volume":"61","author":"Rahman","year":"2020","journal-title":"Sustain. Cities Soc."},{"key":"ref_14","first-page":"102866","article-title":"Exact greedy algorithm based split finding approach for intrusion detection in fog-enabled IoT environment","volume":"60","author":"Reddy","year":"2021","journal-title":"J. Inf. Secur. Appl."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"231","DOI":"10.1007\/s11277-022-09548-7","article-title":"Fog computing-based intrusion detection architecture to protect iot networks","volume":"125","author":"Labiod","year":"2022","journal-title":"Wirel. Pers. Commun."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"137","DOI":"10.3103\/S0146411621020085","article-title":"Design of anomaly-based intrusion detection system using fog computing for IoT network","volume":"55","author":"Kumar","year":"2021","journal-title":"Autom. Control Comput. Sci."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"73907","DOI":"10.1109\/ACCESS.2020.2988055","article-title":"Artificial neural networks-based intrusion detection system for internet of things fog nodes","volume":"8","author":"Pacheco","year":"2020","journal-title":"IEEE Access"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"45","DOI":"10.1109\/TNSM.2020.2966951","article-title":"IoT-KEEPER: Detecting malicious IoT network activity using online traffic analysis at the edge","volume":"17","author":"Hafeez","year":"2020","journal-title":"IEEE Trans. Netw. Serv. Manag."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"6882","DOI":"10.1109\/JIOT.2020.2970501","article-title":"Passban IDS: An Intelligent Anomaly-Based Intrusion Detection System for IoT Edge Devices","volume":"7","author":"Eskandari","year":"2020","journal-title":"IEEE Internet Things J."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"104712","DOI":"10.1016\/j.jpdc.2023.05.001","article-title":"Exploring edge TPU for network intrusion detection in IoT","volume":"179","author":"Hosseininoorbin","year":"2023","journal-title":"J. Parallel Distrib. Comput."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"107901","DOI":"10.1016\/j.compeleceng.2022.107901","article-title":"Lightweight intrusion detection for edge computing networks using deep forest and bio-inspired algorithms","volume":"100","author":"Bangui","year":"2022","journal-title":"Comput. Electr. Eng."},{"key":"ref_22","unstructured":"Javed, A. (2024, January 24). Intrusion Detection in Smart Homes (IDSH) Dataset. Available online: https:\/\/www.kaggle.com\/datasets\/bc7c97914edab17a5821f5b27f465904bad79132f07cfcefc83e9669daeb3f98."},{"key":"ref_23","unstructured":"(2024, March 30). TensorFlow Lite TinyML for ESP32. Available online: https:\/\/eloquentarduino.com\/posts\/tensorflow-lite-tinyml-esp32."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Suresh, P., Daniel, J.V., Parthasarathy, V., and Aswathy, R. (2014, January 27\u201329). A state of the art review on the Internet of Things (IoT) history, technology and fields of deployment. Proceedings of the 2014 International Conference on Science Engineering and Management Research (ICSEMR), Chennai, India.","DOI":"10.1109\/ICSEMR.2014.7043637"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"100670","DOI":"10.1016\/j.iot.2022.100670","article-title":"Energy consumption of on-device machine learning models for IoT intrusion detection","volume":"21","author":"Tekin","year":"2023","journal-title":"Internet Things"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Koirala, A., Bista, R., and Ferreira, J.C. (2023). Enhancing IoT device security through network attack data analysis using machine learning algorithms. Future Internet, 15.","DOI":"10.3390\/fi15060210"},{"key":"ref_27","unstructured":"(2024, April 30). The TON_IoT Datasets: UNSW Research. Available online: https:\/\/research.unsw.edu.au\/projects\/toniot-datasets."},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"13241","DOI":"10.1007\/s11227-023-05197-0","article-title":"EIDM: Deep learning model for IoT intrusion detection systems","volume":"79","author":"Elnakib","year":"2023","journal-title":"J. Supercomput."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Qureshi, A.U.H., Larijani, H., Mtetwa, N., Javed, A., and Ahmad, J. (2019). RNN-ABC: A new swarm optimization based technique for anomaly detection. Computers, 8.","DOI":"10.3390\/computers8030059"},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"146","DOI":"10.1016\/j.comcom.2021.05.024","article-title":"Internet of Things attack detection using hybrid Deep Learning Model","volume":"176","author":"Sahu","year":"2021","journal-title":"Comput. Commun."},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"8828591","DOI":"10.1155\/2020\/8828591","article-title":"A stacked deep learning approach for IoT cyberattack detection","volume":"2020","author":"Alotaibi","year":"2020","journal-title":"J. Sens."},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Tomer, V., and Sharma, S. (2022). Detecting iot attacks using an ensemble machine learning model. Future Internet, 14.","DOI":"10.3390\/fi14040102"},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"107417","DOI":"10.1016\/j.comnet.2020.107417","article-title":"Hybrid approach to intrusion detection in fog-based IoT environments","volume":"180","author":"Westphall","year":"2020","journal-title":"Comput. Netw."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"9555","DOI":"10.1007\/s12652-020-02696-3","article-title":"A distributed ensemble design based intrusion detection system using fog computing to protect the internet of things networks","volume":"12","author":"Kumar","year":"2021","journal-title":"J. Ambient. Intell. Humaniz. Comput."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"55","DOI":"10.1016\/j.jpdc.2022.01.030","article-title":"A distributed intrusion detection system to detect DDoS attacks in blockchain-enabled IoT network","volume":"164","author":"Kumar","year":"2022","journal-title":"J. Parallel Distrib. Comput."},{"key":"ref_36","doi-asserted-by":"crossref","first-page":"8852","DOI":"10.1007\/s11227-021-04250-0","article-title":"Feature engineering and deep learning-based intrusion detection framework for securing edge IoT","volume":"78","author":"Nasir","year":"2022","journal-title":"J. Supercomput."},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"259","DOI":"10.1016\/j.jpdc.2019.12.008","article-title":"Intrusion detection in Edge-of-Things computing","volume":"137","author":"Almogren","year":"2020","journal-title":"J. Parallel Distrib. Comput."},{"key":"ref_38","unstructured":"Hindy, H., Bayne, E., Bures, M., Atkinson, R., Tachtatzis, C., and Bellekens, X. (2021). Selected Papers from the 12th International Networking Conference: INC 2020, Springer."},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"779","DOI":"10.1016\/j.future.2019.05.041","article-title":"Towards the development of realistic botnet dataset in the internet of things for network forensic analytics: Bot-iot dataset","volume":"100","author":"Koroniotis","year":"2019","journal-title":"Future Gener. Comput. Syst."},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"157","DOI":"10.1080\/14786440009463897","article-title":"On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling","volume":"50","author":"Pearson","year":"1900","journal-title":"London Edinburgh Dublin Philos. Mag. J. Sci."},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"417","DOI":"10.1037\/h0071325","article-title":"Analysis of a complex of statistical variables into principal components","volume":"24","author":"Hotelling","year":"1933","journal-title":"J. Educ. Psychol."},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"36","DOI":"10.1186\/s40537-024-00892-y","article-title":"Optimizing IoT intrusion detection system: Feature selection versus feature extraction in machine learning","volume":"11","author":"Li","year":"2024","journal-title":"J. Big Data"},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"2365","DOI":"10.1007\/s10586-023-04089-5","article-title":"Machine learning-based intrusion detection: Feature selection versus feature extraction","volume":"27","author":"Ngo","year":"2023","journal-title":"Clust. Comput."}],"container-title":["Future Internet"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-5903\/16\/6\/200\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T14:53:52Z","timestamp":1760108032000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-5903\/16\/6\/200"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,6,5]]},"references-count":43,"journal-issue":{"issue":"6","published-online":{"date-parts":[[2024,6]]}},"alternative-id":["fi16060200"],"URL":"https:\/\/doi.org\/10.3390\/fi16060200","relation":{},"ISSN":["1999-5903"],"issn-type":[{"value":"1999-5903","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,6,5]]}}}