| Literature DB >> 35271164 |
Yakubu Imrana1, Yanping Xiang1, Liaqat Ali2, Zaharawu Abdul-Rauf3, Yu-Chen Hu4, Seifedine Kadry5, Sangsoon Lim6.
Abstract
In a network architecture, an intrusion detection system (IDS) is one of the most commonly used approaches to secure the integrity and availability of critical assets in protected systems. Many existing network intrusion detection systems (NIDS) utilize stand-alone classifier models to classify network traffic as an attack or as normal. Due to the vast data volume, these stand-alone models struggle to reach higher intrusion detection rates with low false alarm rates( FAR). Additionally, irrelevant features in datasets can also increase the running time required to develop a model. However, data can be reduced effectively to an optimal feature set without information loss by employing a dimensionality reduction method, which a classification model then uses for accurate predictions of the various network intrusions. In this study, we propose a novel feature-driven intrusion detection system, namely χ2-BidLSTM, that integrates a χ2 statistical model and bidirectional long short-term memory (BidLSTM). The NSL-KDD dataset is used to train and evaluate the proposed approach. In the first phase, the χ2-BidLSTM system uses a χ2 model to rank all the features, then searches an optimal subset using a forward best search algorithm. In next phase, the optimal set is fed to the BidLSTM model for classification purposes. The experimental results indicate that our proposed χ2-BidLSTM approach achieves a detection accuracy of 95.62% and an F-score of 95.65%, with a low FAR of 2.11% on NSL-KDDTest+. Furthermore, our model obtains an accuracy of 89.55%, an F-score of 89.77%, and an FAR of 2.71% on NSL-KDDTest-21, indicating the superiority of the proposed approach over the standard LSTM method and other existing feature-selection-based NIDS methods.Entities:
Keywords: bidirectional LSTM; chi-square; deep learning; feature selection; intrusion detection systems
Mesh:
Year: 2022 PMID: 35271164 PMCID: PMC8915053 DOI: 10.3390/s22052018
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Traffic sample breakdown of the NSL-KDD dataset.
| Class | Number of Samples | |||
|---|---|---|---|---|
|
| KDDTrain+ | KDDTest+ | KDDTest−21 | |
| DoS | 45,927 | 7458 | 4342 | |
| Probe | 11,656 | 2421 | 2402 | |
| U2R | 52 | 200 | 200 | |
| R2L | 995 | 2754 | 2754 | |
| Normal | 67,343 | 9711 | 2152 | |
|
| 125,973 | 22,544 | 11,850 | |
List of all 41 features in the NLS-KDD dataset.
| No. | Feature | Code | No. | Feature | Code |
|---|---|---|---|---|---|
| 01 | duration |
| 22 | is_guest_login |
|
| 02 | protocol_type |
| 23 | count |
|
| 03 | service |
| 24 | srv_count |
|
| 04 | flag |
| 25 | serror_rate |
|
| 05 | src_bytes |
| 26 | srv_error_rate |
|
| 06 | dst_bytes |
| 27 | rerror_rate |
|
| 07 | land |
| 28 | srv_rerror_rate |
|
| 08 | wrong_fragment |
| 29 | same_srv_rate |
|
| 09 | urgent |
| 30 | diff_srv_rate |
|
| 10 | hot |
| 31 | srv_diff_host_rate |
|
| 11 | num_failed_logins |
| 32 | dst_host_count |
|
| 12 | logged_in |
| 33 | dst_host_srv_count |
|
| 13 | num_compromised |
| 34 | dst_host_same_srv_rate |
|
| 14 | root_shell |
| 35 | dst_host_diff_srv_rate |
|
| 15 | su_attempted |
| 36 | dst_host_same_src_port_rate |
|
| 16 | num_root |
| 37 | dst_host_srv_diff_host_rate |
|
| 17 | num_file_creations |
| 38 | dst_host_serror_rate |
|
| 18 | num_shells |
| 39 | dst_host_srv_serror_rate |
|
| 19 | num_access_files |
| 40 | dst_host_rerror_rate |
|
| 20 | num_outbound_cmds |
| 41 | dst_host_srv_rerror_rate |
|
| 21 | is_host_login |
|
Categories of the various attack types.
| Class | Types of Attacks | |
|---|---|---|
|
|
| |
| DoS | smurf, neptune, land, back, teardrop, pod | land, pod, apache2, processtable, neptune, smurf, worm, udpstorm, back, mailbomb, teardrop |
| Probe | satan, nmap, portsweep, ipsweep | portsweep, satan, nmap, ipsweep, saint, mscan |
| U2R | perl, loadmodule, buffer-overflow, rootkit | ps, rootkit, sqlattack, buffer-overflow, xterm, loadmodule, perl |
| R2L | imap, warezmaster, fpt-write, warezclient, spy, phf, multihop, guess-passwd | warezmaster, snmpguess, phf, xsnoop, httptunnel, snmpgetattack, sendmail, warezclient, fpt-write, named, xlock, spy, imap, guess-passwd, multihop |
| Normal | normal | normal |
Figure 1The proposed IDS architecture.
Computation of chi-square test scores.
| Normal Class | Attack Class | Total | |
|---|---|---|---|
|
|
| ||
|
|
|
| |
| Total |
|
|
|
Figure 2An unrolling RNN architecture [46].
Figure 3The LSTM memory cell.
Figure 4A bidirectional LSTM architecture.
Confusion matrix for standard LSTM model trained with all 41 features.
| Predicted Label | Predicted Label | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Normal | DoS | Probe | R2L | U2R | Normal | DoS | Probe | R2L | U2R | ||
|
| Normal | 8958 | 4 | 729 | 9 | 11 | 1685 | 11 | 433 | 8 | 15 |
| DoS | 408 | 6441 | 538 | 6 | 65 | 652 | 3064 | 527 | 6 | 93 | |
| Probe | 241 | 26 | 2114 | 18 | 22 | 258 | 23 | 2062 | 25 | 34 | |
| R2L | 184 | 5 | 498 | 2067 | 0 | 439 | 7 | 379 | 1929 | 0 | |
| U2R | 45 | 2 | 61 | 0 | 92 | 51 | 3 | 58 | 1 | 87 | |
|
|
|
| |||||||||
Standard LSTM performance on NSL-KDDTest+ using all 41 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 99.43 | 99.75 | 86.36 | 0.25 | 92.44 |
| Probe | 53.65 | 90.93 | 87.32 | 9.07 | 66.47 |
| R2L | 98.43 | 99.83 | 75.05 | 0.17 | 85.17 |
| U2R | 48.42 | 99.56 | 46.00 | 0.44 | 47.18 |
| Normal | 91.07 | 93.16 | 92.25 | 6.84 | 91.66 |
Standard LSTM performance on NSL-KDDTest−21 using all 41 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 98.58 | 99.41 | 70.57 | 0.59 | 82.26 |
| Probe | 59.61 | 85.21 | 85.85 | 14.79 | 70.36 |
| R2L | 97.97 | 99.56 | 70.04 | 0.44 | 81.69 |
| U2R | 37.99 | 98.78 | 43.50 | 1.22 | 40.56 |
| Normal | 54.62 | 85.56 | 78.30 | 14.44 | 64.35 |
Confusion matrix of BidLSTM model trained with all 41 features.
| Predicted Label | Predicted Label | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Normal | DoS | Probe | R2L | U2R | Normal | DoS | Probe | R2L | U2R | ||
|
| Normal | 9264 | 1 | 435 | 3 | 8 | 1776 | 2 | 364 | 2 | 8 |
| DoS | 321 | 6738 | 343 | 3 | 53 | 426 | 3657 | 221 | 2 | 36 | |
| Probe | 191 | 9 | 2216 | 0 | 5 | 195 | 17 | 2165 | 10 | 15 | |
| R2L | 173 | 0 | 311 | 2270 | 0 | 446 | 0 | 281 | 2027 | 0 | |
| U2R | 39 | 0 | 53 | 0 | 108 | 35 | 0 | 60 | 7 | 98 | |
|
|
|
| |||||||||
BidLSTM performance on NSL-KDDTest+ using all 41 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 99.85 | 99.93 | 90.34 | 0.07 | 94.86 |
| Probe | 65.99 | 94.32 | 91.53 | 5.68 | 76.69 |
| R2L | 99.74 | 99.97 | 82.43 | 0.03 | 90.26 |
| U2R | 62.07 | 99.70 | 54.00 | 0.30 | 57.75 |
| Normal | 92.75 | 94.36 | 95.40 | 5.64 | 94.06 |
BidLSTM performance on NSL-KDDTest−21 using all 41 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 99.48 | 99.75 | 84.22 | 0.25 | 91.22 |
| Probe | 70.04 | 90.20 | 90.13 | 9.80 | 78.83 |
| R2L | 98.97 | 99.77 | 73.60 | 0.23 | 84.42 |
| U2R | 62.42 | 99.49 | 49.00 | 0.51 | 54.90 |
| Normal | 61.71 | 88.64 | 82.53 | 11.36 | 70.62 |
Performance comparison against existing methods in the literature using all 41 features (N/A denotes not available).
| Approach | Performance (%) | |||||
|---|---|---|---|---|---|---|
| NSL-KDDTest+ | NSL-KDDTest−21 | |||||
| Accuracy | F-Score | FAR | Accuracy | F-Score | FAR | |
| SCDNN [ | 72.64 | N/A | 27.36 | 44.55 | N/A | 55.45 |
| NN [ | 83.67 | 83.28 | 23.47 | N/A | N/A | N/A |
| MDPCA-DBN [ | 82.08 | 81.75 | 2.62 | 66.18 | 74.87 | 13.06 |
| RNN [ | 81.29 | 79.25 | 12.42 | 64.67 | N/A | N/A |
| STL [ | 74.38 | N/A | 7.21 | 57.34 | N/A | 15.06 |
| OCNN [ | 88.67 | 89.78 | 11.89 | N/A | N/A | N/A |
| HMLSTM [ | 87.11 | 88.40 | 12.20 | N/A | N/A | N/A |
| OCNN-HMLSTM [ | 90.61 | 91.46 | 8.86 | N/A | N/A | N/A |
| Standard LSTM | 87.26 | 88.03 | 4.03 | 74.49 | 75.76 | 5.96 |
| BidLSTM | 91.36 | 91.67 | 3.06 | 82.05 | 82.77 | 4.20 |
Figure 5Comparison of results against existing methods on NSL-KDDTest+ and NSL-KDDTest−21 using all 41 features. (a) Performance results on NSL-KDDTest+; (b) performance results on NSL-KDDTest−21.
Figure 6Performance results of different subsets of features on NSL-KDDTest+ and NSL-KDDTest−21. (a) Performance of different subsets on NSL-KDDTest+; (b) performance of different subsets on NSL-KDDTest−21.
The selected optimal set of features.
| Method | Feature Code | Number of Features |
|---|---|---|
| Standard LSTM | [ | 21 |
| BidLSTM | [ | 17 |
Confusion matrix of standard LSTM model trained with 21 features.
| Predicted Label | Predicted Label | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Normal | DoS | Probe | R2L | U2R | Normal | DoS | Probe | R2L | U2R | ||
|
| Normal | 9175 | 7 | 505 | 16 | 8 | 1836 | 12 | 269 | 21 | 14 |
| DoS | 375 | 6806 | 215 | 9 | 53 | 405 | 3343 | 493 | 13 | 88 | |
| Probe | 111 | 156 | 2120 | 21 | 13 | 178 | 33 | 2143 | 48 | 0 | |
| R2L | 322 | 0 | 100 | 2325 | 7 | 328 | 9 | 266 | 2128 | 23 | |
| U2R | 68 | 0 | 0 | 6 | 126 | 35 | 0 | 19 | 0 | 146 | |
|
|
|
| |||||||||
Standard LSTM performance results on NSL-KDDTest+ using 21 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 97.66 | 98.92 | 91.26 | 1.08 | 94.35 |
| Probe | 72.11 | 95.93 | 87.57 | 4.07 | 79.09 |
| R2L | 97.81 | 99.74 | 84.42 | 0.26 | 90.63 |
| U2R | 60.87 | 99.64 | 63.00 | 0.36 | 61.92 |
| Normal | 91.28 | 93.17 | 94.48 | 6.83 | 92.85 |
Standard LSTM performance results on NSL-KDDTest−21 using 21 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 98.41 | 99.28 | 76.99 | 0.72 | 86.39 |
| Probe | 67.18 | 88.92 | 89.22 | 11.08 | 76.65 |
| R2L | 96.29 | 99.10 | 77.27 | 0.90 | 85.74 |
| U2R | 53.87 | 98.93 | 73.00 | 1.07 | 62.00 |
| Normal | 66.00 | 90.25 | 85.32 | 9.75 | 74.42 |
Confusion matrix of BidLSTM model trained with 17 features.
| Predicted Label | Predicted Label | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Normal | DoS | Probe | R2L | U2R | Normal | DoS | Probe | R2L | U2R | ||
|
| Normal | 9580 | 0 | 116 | 5 | 10 | 1968 | 25 | 150 | 0 | 9 |
| DoS | 261 | 7018 | 152 | 0 | 27 | 286 | 3912 | 94 | 7 | 43 | |
| Probe | 127 | 1 | 2293 | 0 | 0 | 52 | 84 | 2258 | 8 | 0 | |
| R2L | 142 | 5 | 106 | 2501 | 0 | 276 | 0 | 175 | 2303 | 0 | |
| U2R | 34 | 2 | 0 | 0 | 164 | 13 | 7 | 0 | 9 | 171 | |
|
|
|
| |||||||||
BidLSTM performance results on NSL-KDDTest+ using 17 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 99.89 | 99.95 | 94.10 | 0.05 | 96.91 |
| Probe | 85.98 | 98.14 | 94.71 | 1.86 | 90.13 |
| R2L | 99.80 | 99.97 | 90.81 | 0.03 | 95.10 |
| U2R | 81.59 | 99.83 | 82.00 | 0.17 | 81.80 |
| Normal | 94.44 | 95.61 | 98.65 | 4.39 | 96.50 |
BidLSTM performance results on NSL-KDDTest−21 using 17 features.
| Class Label | Performance Results (%) | ||||
|---|---|---|---|---|---|
| Precision | Specificity | Recall | FAR | F-Score | |
| DoS | 97.12 | 98.45 | 90.10 | 1.55 | 93.48 |
| Probe | 84.35 | 95.57 | 94.00 | 4.43 | 88.92 |
| R2L | 98.97 | 99.74 | 83.62 | 0.26 | 90.65 |
| U2R | 76.68 | 99.55 | 85.50 | 0.44 | 80.85 |
| Normal | 75.84 | 93.53 | 91.45 | 6.47 | 82.92 |
Comparison of results against existing feature-selection-based algorithms on NSL-KDDTest+ and NSL-KDDTest−21.
| Approach | Feature Selection Method | Number of Features | Performance (%) | |||||
|---|---|---|---|---|---|---|---|---|
|
|
| |||||||
|
|
|
|
|
|
| |||
| FSSL-EL [ | PCA | 20 | 84.54 | N/A | 5.31 | 71.29 | N/A | 20.35 |
| TSE-IDS [ | Hybrid | 37 | 85.80 | N/A | 11.70 | 72.52 | N/A | 18.00 |
| CFS-BA [ | CFS | 10 | 87.37 | N/A | 3.19 | 73.57 | N/A | 12.92 |
| FS+GRA-Forest [ | Information Gain | 32 | 85.06 | 85.10 | 12.20 | N/A | N/A | N/A |
| EM-FS [ | Gain Ratio | 35 | 84.25 | N/A | 2.79 | N/A | N/A | N/A |
| MMFSA-CR [ | Hybrid | 19 | 83.98 | N/A | N/A | N/A | N/A | N/A |
| LSSVM [ | Mutual Information | 18 | 76.20 | 76.10 | 3.90 | N/A | N/A | N/A |
| CP-ARM [ | Hybrid | 11 | 79.60 | 79.50 | 3.50 | N/A | N/A | N/A |
| Chi-Square | 21 | 91.16 | 91.32 | 3.77 | 80.98 | 81.68 | 4.51 | |
| Chi-Square | 17 | 95.62 | 95.65 | 2.11 | 89.55 | 89.77 | 2.71 | |
Figure 7Comparison of results against existing feature selection methods on NSL-KDDTest+ and NSL-KDDTest−21. (a) Performance results on NSL-KDDTest+; (b) performance results on NSL-KDDTest−21.
Figure 8Training and testing times of the methods used in the study. (a) Training times of the various methods in seconds; (b) testing times of the various methods in seconds.