| Literature DB >> 36236506 |
Ogobuchi Daniel Okey1, Siti Sarah Maidin2, Pablo Adasme3, Renata Lopes Rosa4, Muhammad Saadi5, Dick Carrillo Melgarejo6, Demóstenes Zegarra Rodríguez4.
Abstract
Following the recent advances in wireless communication leading to increased Internet of Things (IoT) systems, many security threats are currently ravaging IoT systems, causing harm to information. Considering the vast application areas of IoT systems, ensuring that cyberattacks are holistically detected to avoid harm is paramount. Machine learning (ML) algorithms have demonstrated high capacity in helping to mitigate attacks on IoT devices and other edge systems with reasonable accuracy. However, the dynamics of operation of intruders in IoT networks require more improved IDS models capable of detecting multiple attacks with a higher detection rate and lower computational resource requirement, which is one of the challenges of IoT systems. Many ensemble methods have been used with different ML classifiers, including decision trees and random forests, to propose IDS models for IoT environments. The boosting method is one of the approaches used to design an ensemble classifier. This paper proposes an efficient method for detecting cyberattacks and network intrusions based on boosted ML classifiers. Our proposed model is named BoostedEnML. First, we train six different ML classifiers (DT, RF, ET, LGBM, AD, and XGB) and obtain an ensemble using the stacking method and another with a majority voting approach. Two different datasets containing high-profile attacks, including distributed denial of service (DDoS), denial of service (DoS), botnets, infiltration, web attacks, heartbleed, portscan, and botnets, were used to train, evaluate, and test the IDS model. To ensure that we obtained a holistic and efficient model, we performed data balancing with synthetic minority oversampling technique (SMOTE) and adaptive synthetic (ADASYN) techniques; after that, we used stratified K-fold to split the data into training, validation, and testing sets. Based on the best two models, we construct our proposed BoostedEnsML model using LightGBM and XGBoost, as the combination of the two classifiers gives a lightweight yet efficient model, which is part of the target of this research. Experimental results show that BoostedEnsML outperformed existing ensemble models in terms of accuracy, precision, recall, F-score, and area under the curve (AUC), reaching 100% in each case on the selected datasets for multiclass classification.Entities:
Keywords: BoostedEnML; Internet of Things; SMOTE; cyberattacks; data imbalance; ensemble algorithms; machine learning IDS
Mesh:
Year: 2022 PMID: 36236506 PMCID: PMC9572777 DOI: 10.3390/s22197409
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.847
Outline of related works that implement machine learning and deep learning in both single and ensemble scenarios for intrusion detection in IoT systems.
| Author | Dataset Used | Classification Domain | Imbalance | Method | Evaluation Metric |
|---|---|---|---|---|---|
| Rashid et al. [ | UNSW-NB15, CICIDS2017 | Binary | Not specified | Acc = 99.9, Recall = 99.9 | Ensemble |
| Verma et al. [ | CSE-CICIDS2018-v2, UNSW-NB15-V2, BoT-IoT-V2 | Binary | x | Acc = 98.27, Recall = 96.40 | Ensemble |
| Churcher et al. [ | BoT-IoT | Binary and multiclass | x | Acc = 99 | - |
| Gaikwad and Thool [ | NSL-KDD | Multiclass | x | Acc = 99.67 | Ensemble |
| Yulianto et al. [ | CICIDS2017 | Multiclass | Implemented | Acc = 81.83, F-score = 90.01 | AdaBoost |
| Waskle et al. [ | KDD Cup’99 | Not specified | x | Acc = 96.78 | Random forest |
| Dhaliwal et al. [ | NSL-KDD | Multiclass | x | Acc = 98.70, Recall = 99.11 | XGBoost |
| Dutta et al. [ | IoT-23, LITNET-2020, NetML-2020 | Multiclass | Implemented | Acc = 99.7, Precision = 100, Recall = 95 | DL Ensemble stacking |
| Kim et al. [ | N-BaIoT | Binary and multiclass | x | Acc = 99.9, Recall = 99.9, Precision = 99.9 | ML Ensemble stacking |
| Das et al. [ | NSL-KDD, UNSW-NB15, CICIDS2017 | Binary | x | Acc NSL-KDD: 88.1, UNSW-NB15: 85.7, CICIDS2017: 99.5 | Ensemble ML |
Figure 1Design architecture of BoostedEnML for IDS in IoT systems.
Distribution of stream records in CICIDS2017 dataset.
| Label Name | Value | Percentage Contribution (%) |
|---|---|---|
| BENIGN | 2,359,289 | 83.3452 |
| DoS Hulk | 231,073 | 8.1630 |
| PortScan | 158,930 | 5.6144 |
| DDoS | 41,835 | 1.4779 |
| DoS GoldenEye | 10,293 | 0.3636 |
| FTP-Patator | 7938 | 0.2804 |
| SSH-Patator | 5897 | 0.2083 |
| DoS slowloris | 5796 | 0.2048 |
| DoS Slowhttptest | 5499 | 0.1943 |
| Bot | 1966 | 0.0695 |
| Web Attack-Brute Force | 1507 | 0.0532 |
| Web Attack-XSS | 652 | 0.0230 |
| Infiltration | 36 | 0.0013 |
| Web Attack-Sql Injection | 21 | 0.0007 |
| Heartbleed | 11 | 0.0004 |
Distribution of stream records in CICIDS2018 dataset.
| Label Name | Value | Percentage Contribution (%) |
|---|---|---|
| Benign | 13,484,708 | 83.07001 |
| DDOS attack-HOIC | 686,012 | 4.22605 |
| DDoS attacks-LOIC-HTTP | 576,191 | 3.54952 |
| DoS attacks-Hulk | 461,912 | 2.84552 |
| Bot | 286,191 | 1.76303 |
| FTP-BruteForce | 193,360 | 1.19116 |
| SSH-Bruteforce | 187,589 | 1.15561 |
| Infiltration | 161,934 | 0.99756 |
| DoS attacks-SlowHTTPTest | 139,890 | 0.86177 |
| DoS attacks-GoldenEye | 41,508 | 0.25570 |
| DoS attacks-Slowloris | 10,990 | 0.06770 |
| DDOS attack-LOIC-UDP | 1730 | 0.01066 |
| Brute Force-Web | 611 | 0.00376 |
| Brute Force-XSS | 230 | 0.00142 |
| SQL Injection | 87 | 0.00054 |
Selected feature for the training of each of the models using random forest feature importance according to the standard deviation of feature values.
| Feature | Importance | Feature | Importance | Feature | Importance | Feature | Importance |
|---|---|---|---|---|---|---|---|
| Timestamp | 0.3227 | Fwd IAT Std | 0.0022 | RST Flag Cnt | 0.0009 | Pkt Len Min | 0.0003 |
| Dst Port | 0.2302 | Pkt Len Mean | 0.0021 | Fwd IAT Tot | 0.0009 | Fwd Pkt Len Min | 0.0003 |
| Fwd Seg Size Min | 0.16 | Tot Bwd Pkts | 0.0019 | Pkt Size Avg | 0.0008 | Bwd Seg Size Avg | 0.0003 |
| Init Fwd Win Byts | 0.0971 | Bwd IAT Min | 0.0019 | Bwd IAT Mean | 0.0008 | TotLen Bwd Pkts | 0.0002 |
| TotLen Fwd Pkts | 0.0354 | Flow IAT Min | 0.0017 | Pkt Len Var | 0.0007 | Idle Min | 0.0002 |
| Fwd Pkt Len Mean | 0.0347 | Init Bwd Win Byts | 0.0015 | Fwd Header Len | 0.0007 | Bwd Pkt Len Std | 0.0002 |
| Pkt Len Max | 0.0334 | Fwd Pkts/s | 0.0015 | Bwd IAT Max | 0.0006 | Active Min | 0.0002 |
| Fwd Pkt Len Std | 0.0215 | Fwd IAT Max | 0.0015 | Subflow Bwd Pkts | 0.0005 | Tot Fwd Pkts | 0.0001 |
| Flow IAT Max | 0.0057 | Flow Pkts/s | 0.0015 | Pkt Len Std | 0.0005 | Subflow Fwd Pkts | 0.0001 |
| Idle Max | 0.0048 | Flow IAT Std | 0.0015 | FIN Flag Cnt | 0.0005 | PSH Flag Cnt | 0.0001 |
| Fwd Pkt Len Max | 0.0045 | Flow Byts/s | 0.0014 | Bwd IAT Tot | 0.0005 | Idle Std | 0.0001 |
| Fwd Seg Size Avg | 0.0035 | Flow IAT Mean | 0.0011 | Bwd IAT Std | 0.0005 | Idle Mean | 0.0001 |
| Bwd Pkt Len Mean | 0.0029 | Fwd Act Data Pkts | 0.001 | Subflow Fwd Byts | 0.0004 | Active Std | 0.0001 |
| Bwd Pkts/s | 0.0027 | Flow Duration | 0.001 | Subflow Bwd Byts | 0.0004 | Active Mean | 0.0001 |
| Bwd Pkt Len Max | 0.0025 | ECE Flag Cnt | 0.001 | Fwd IAT Mean | 0.0004 | Active Max | 0.0001 |
| Fwd IAT Min | 0.0023 | Bwd Header Len | 0.001 | Bwd Pkt Len Min | 0.0004 | ACK Flag Cnt | 0.0001 |
Distribution of data for training, validation, and testing of the models.
| Labels | CIC-IDS2017 | CSE-CICIDS2018 | ||
|---|---|---|---|---|
| Train | Val/Test | Train | Val/Test | |
|
| 606,812 | 67,242 | 606,812 | 67,242 |
|
| 606,812 | 67,242 | 606,812 | 67,242 |
|
| 606,812 | 67,242 | 606,812 | 67,242 |
|
| 606,812 | 67,242 | 606,812 | 67,242 |
|
| 606,812 | 67,242 | 606,812 | 67,242 |
|
| 606,812 | 67,242 | 606,812 | 67,242 |
|
| 606,812 | 67,242 | 606,812 | 67,242 |
|
| 606,812 | 67,242 | – | – |
|
| 606,812 | 67,242 | – | – |
|
| 5,461,308 | 605,178 | 4,247,684 | 470,694 |
Figure 2Feature importance extracted from the CICIDS2017 dataset using RFR.
Performance evaluation of the trained models on CSE-CICIDS2018 dataset, showing the time for prediction and model size.
| Model Metrics | Accuracy | Precision | Recall | F-score | AUC | File Size | Test Time (s) |
|---|---|---|---|---|---|---|---|
| DT | 98.7 | 98.67 | 98.67 | 98.67 | 99.25 | 10 MB | 0.25 |
| RF | 98.4 | 98.43 | 98.43 | 98.43 | 99.93 | 1200 MB | 9.98 |
| ET | 98.3 | 98.35 | 98.35 | 98.35 | 99.85 | 5500 MB | 15.1 |
| AD | 97.8 | 97.74 | 97.65 | 97.8 | 98.8 | 350 MB | 14.2 |
| LGBM | 98.8 | 98.83 | 98.83 | 98.83 | 99.96 |
| 3.4 |
| XGB |
|
|
|
| 99.9 | 1500 MB | 4.25 |
Performance evaluation of the trained models on the CIC-IDS2017 dataset showing the time for prediction and model size.
| Model Metrics | Accuracy | Precision | Recall | F-score | AUC | File Size | Test Time (s) |
|---|---|---|---|---|---|---|---|
| DT | 99.59 | 99.59 | 99.59 | 99.59 | 99.76 | 5.7 MB |
|
| RF | 99.49 | 99.48 | 99.47 | 99.47 | 99.98 | 319 MB | 6.83 |
| ET |
| 99.68 | 99.67 | 99.67 | 99.97 | 1630 MB | 11.09 |
| AD | 69.67 | 66.79 | 66.78 | 66.68 | 67.9 | 400 MB | 12 |
| LGBM | 99.16 | 96.96 | 96.43 | 96.43 | 96.81 |
| 5.49 |
| XGB |
|
|
|
| 99.97 | 3.76 MB | 3.37 |
Figure 3Performance evaluation of ensemble models on the CIC-IDS2017 dataset.
Figure 4Performance evaluation of ensemble models on the CIC-IDS2018 dataset.
Figure 5Confusion matrix for (a) Ens_RF and (b) ENs_LGBM on 2018 dataset.
Figure 6Confusion matrix for EnsHMV.
Figure 7Confusion matix for proposed BoostedEnsML.
Figure 8ROC curve for selected models trained on the CSE-CICIDS2018 dataset.
Performance of the IDS models (EnsHMV and BoostedEnsML) in detecting and classifying each network traffic class in the two datasets.
| EnsHMV | BoostedEnML | ||||||
|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
| Benign | 0.9795 | 0.9945 | 0.9636 | 0.9989 | 0.9995 | 1.0000 |
| Bot | 0.9977 | 0.9992 | 0.9984 | 0.9997 | 0.9999 | 0.9999 | |
| Brute Force | 0.9998 | 0.9999 | 0.9999 | 1.0000 | 1.0000 | 0.9999 | |
| DDoS | 0.9880 | 0.9989 | 0.9889 | 0.9890 | 0.9965 | 0.9980 | |
| DoS | 0.9968 | 0.9890 | 0.9969 | 1.0000 | 1.0000 | 1.0000 | |
| Hearbleed | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | |
| Infiltration | 0.9989 | 0.9967 | 0.9969 | 1.0000 | 1.0000 | 1.0000 | |
| PortScan | 0.9993 | 0.9992 | 0.9995 | 0.9999 | 0.9999 | 0.9999 | |
| Web Attack | 0.9966 | 0.9966 | 0.9988 | 1.0000 | 1.0000 | 1.0000 | |
|
|
|
|
|
|
| ||
|
| Benign | 0.9966 | 0.9990 | 0.9978 | 0.9999 | 0.9999 | 0.9998 |
| Bot | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | |
| Brute Force | 0.9999 | 1.0000 | 1.0000 | 1.0000 | 0.9999 | 0.9999 | |
| DDoS | 0.9999 | 1.0000 | 1.0000 | 1.0000 | 0.9999 | 1.0000 | |
| DoS | 0.9999 | 0.9999 | 0.9999 | 0.9999 | 1.0000 | 0.9999 | |
| Infiltration | 0.9999 | 1.0000 | 0.9999 | 1.0000 | 1.0000 | 1.0000 | |
| Web Attack | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | |
Comparison of our ensemble models with other state-of-the-art ensembles.
| Model Metrics | Accuracy | Precision | Recall | F-score | AUC |
|---|---|---|---|---|---|
| 92 | 92 | 94.4 | 89.8 | 96.9 | |
| 94 | 93.5 | 90.4 | 97.8 | 95.3 | |
| 99.5 | 99.5 | 99.6 | 99.6 | 99.8 | |
| 99.7 | 99.7 | 99.8 | 99.8 | - | |
| 99.8 | 99.8 | 99.9 | 99.9 | - | |
| 99.9 | 99.9 | 99.9 | 99.9 | - | |
| 98.4 | 92 | 89 | 87.6 | - | |
| 99.1 | 100 | 92 | 95 | - | |
| 99.7 | 100 | 95 | 98 | - | |
|
| 97.8 | 97.8 | 97.5 | 98.0 | 98.6 |
|
| 99.7 | 99.6 | 99.8 | 99.9 | 99.5 |
|
| 99.0 | 99.1 | 98.9 | 99.0 | 99.6 |
|
| 99.99 | 100 | 100 | 100 | 99.99 |
|
| 100 | 100 | 100 | 100 | 100 |