iDetect for vulnerability detection in internet of things operating systems using machine learning

Abstract Internet of Things (IoT) 's devices are ubiquitous and operate in a heterogonous environment with potential security breaches. IoT Operating Systems (IoT OSs) are the backbone software for running such devices. If IoT OSs are vulnerable to security breaches, higher-level security measu...

Full description

Bibliographic Details
Main Authors: Abdullah Al-Boghdady, Mohammad El-Ramly, Khaled Wassif
Format: Article
Language:English
Published: Nature Portfolio 2022-10-01
Series:Scientific Reports
Online Access:https://doi.org/10.1038/s41598-022-21325-x
_version_ 1811182361111429120
author Abdullah Al-Boghdady
Mohammad El-Ramly
Khaled Wassif
author_facet Abdullah Al-Boghdady
Mohammad El-Ramly
Khaled Wassif
author_sort Abdullah Al-Boghdady
collection DOAJ
description Abstract Internet of Things (IoT) 's devices are ubiquitous and operate in a heterogonous environment with potential security breaches. IoT Operating Systems (IoT OSs) are the backbone software for running such devices. If IoT OSs are vulnerable to security breaches, higher-level security measures may not help. This paper aims to use Machine Learning (ML) to create a tool called iDetect for detecting vulnerabilities in C/C++ source code of IoT OSs. The source code for 16 releases of IoT OSs (RIOT, Contiki, FreeRTOS, Amazon FreeRTOS) and the Software Assurance Reference Dataset (SARD) were used to create a labeled dataset of vulnerable and benign code with the reference being the Common Weakness Enumeration (CWE) vulnerabilities present in IoT OSs. Studies showed that only a subset of CWEs is present in the C/C++ source code of low-end IoT OSs.The labeled dataset was used to train three ML models for vulnerability detection: Random Forest (RF), Convolutional Neural Network (CNN), and Recurrent Neural Network (RNN). The three models were used independently and RF; compared to CNN and RNN, gave the highest accuracy during the testing phase for binary and multiclass classification. RF was chosen as iDetect's ML classifier. Further evaluation was done on an unseen dataset of 322 code snippets taken from TinyOS. iDetect achieved a macro-averaged F1 score (mF1) of 98.5% and weighted-average F1 score (wF1) of 98% for multiclass classification, F1 score (F1) of 97.8% for binary classification, and superior results compared to all three Static Analysis Tools (SATs) used to collect the training dataset.
first_indexed 2024-04-11T09:30:10Z
format Article
id doaj.art-65ab33e08f754dce997a12dc82524547
institution Directory Open Access Journal
issn 2045-2322
language English
last_indexed 2024-04-11T09:30:10Z
publishDate 2022-10-01
publisher Nature Portfolio
record_format Article
series Scientific Reports
spelling doaj.art-65ab33e08f754dce997a12dc825245472022-12-22T04:31:54ZengNature PortfolioScientific Reports2045-23222022-10-0112111210.1038/s41598-022-21325-xiDetect for vulnerability detection in internet of things operating systems using machine learningAbdullah Al-Boghdady0Mohammad El-Ramly1Khaled Wassif2Department of Computer Sciences, Faculty of Computers and Artificial Intelligence, Cairo UniversityDepartment of Computer Sciences, Faculty of Computers and Artificial Intelligence, Cairo UniversityDepartment of Computer Sciences, Faculty of Computers and Artificial Intelligence, Cairo UniversityAbstract Internet of Things (IoT) 's devices are ubiquitous and operate in a heterogonous environment with potential security breaches. IoT Operating Systems (IoT OSs) are the backbone software for running such devices. If IoT OSs are vulnerable to security breaches, higher-level security measures may not help. This paper aims to use Machine Learning (ML) to create a tool called iDetect for detecting vulnerabilities in C/C++ source code of IoT OSs. The source code for 16 releases of IoT OSs (RIOT, Contiki, FreeRTOS, Amazon FreeRTOS) and the Software Assurance Reference Dataset (SARD) were used to create a labeled dataset of vulnerable and benign code with the reference being the Common Weakness Enumeration (CWE) vulnerabilities present in IoT OSs. Studies showed that only a subset of CWEs is present in the C/C++ source code of low-end IoT OSs.The labeled dataset was used to train three ML models for vulnerability detection: Random Forest (RF), Convolutional Neural Network (CNN), and Recurrent Neural Network (RNN). The three models were used independently and RF; compared to CNN and RNN, gave the highest accuracy during the testing phase for binary and multiclass classification. RF was chosen as iDetect's ML classifier. Further evaluation was done on an unseen dataset of 322 code snippets taken from TinyOS. iDetect achieved a macro-averaged F1 score (mF1) of 98.5% and weighted-average F1 score (wF1) of 98% for multiclass classification, F1 score (F1) of 97.8% for binary classification, and superior results compared to all three Static Analysis Tools (SATs) used to collect the training dataset.https://doi.org/10.1038/s41598-022-21325-x
spellingShingle Abdullah Al-Boghdady
Mohammad El-Ramly
Khaled Wassif
iDetect for vulnerability detection in internet of things operating systems using machine learning
Scientific Reports
title iDetect for vulnerability detection in internet of things operating systems using machine learning
title_full iDetect for vulnerability detection in internet of things operating systems using machine learning
title_fullStr iDetect for vulnerability detection in internet of things operating systems using machine learning
title_full_unstemmed iDetect for vulnerability detection in internet of things operating systems using machine learning
title_short iDetect for vulnerability detection in internet of things operating systems using machine learning
title_sort idetect for vulnerability detection in internet of things operating systems using machine learning
url https://doi.org/10.1038/s41598-022-21325-x
work_keys_str_mv AT abdullahalboghdady idetectforvulnerabilitydetectionininternetofthingsoperatingsystemsusingmachinelearning
AT mohammadelramly idetectforvulnerabilitydetectionininternetofthingsoperatingsystemsusingmachinelearning
AT khaledwassif idetectforvulnerabilitydetectionininternetofthingsoperatingsystemsusingmachinelearning