A Novel Approach for Network Intrusion Detection Using Multistage Deep Learning Image Recognition
Abstract
:1. Introduction
- A packet decoder using a sniffing tool intercepts raw network traffic packets, extracts NTFs to represent the packet length, inter-arrival time, flow size, and other network traffic parameters within a specific time-window and sends them as NTF records to the pre-processing module.
- The pre-processing module accepts a set of NTF records and entails procedures for learning-based NIDS, such as feature reduction, transformation, and normalization.
- The purpose of the classifier module is to create a model based on the pre-processed data that distinguishes normal from malicious behavior.
- The detection and recognition module detects malicious instances, sends an alert for action, and then recognizes various types of attack.
- A novel pre-processing approach for NTFs’ transformation into four-channel (Red, Green, Blue, and Alpha) images for further use in the classifier module to train and test the pre-trained deep learning model;
- The detailed experimental analysis of the proposed pre-processing approach for the deep learning training process using transfer learning for network intrusion detection performed on the classification of various network attack types with UNSW-NB15 and BOUN DDoS datasets;
- Empirical quantification of the attack type recognition and proposed two-stage recognition of NTFs transformed into four-channel ARGB images allows us to achieve an improvement in detection accuracy: 99.8% accuracy in the detection of the generic attack on the UNSW-NB15 dataset, and 99.7% accuracy in the detection of the DDos attack on the BOUN DDos dataset.
2. Related Works
2.1. Publicly Available Network-Based Intrusion Benchmark Datasets
2.2. Methods and Approaches for Network-Based Intrusion Detection
2.3. Methods and Approaches for Network Flow Feature Transformation
2.4. Transfer Learning for Image Classification and Model Creation
3. Materials and Methods
3.1. Dataset for Proposed Approach Implementation
- Fuzzers—used to crash the applications sending invalid data as inputs;
- Analysis—traffic analysis attacks are based on determining the location of key nodes, the routing structure, and even application behavior patterns;
- Backdoors—used to install the malware through unsecured points left behind after applications’ entry;
- DoS—used for flooding or crashing services;
- Exploits—make use of networks, systems, applications, and hardware vulnerabilities;
- Generic—against a cryptography, primitives attempt to decrypt a ciphertext;
- Reconnaissance—knowledge-gathering including port scanning, ping sweeping, packet sniffing, information queries, social engineering, and phishing;
- Shellcode—takes control of a compromised machine using a set of instructions that executes malicious code;
- Worms—malicious software that can spread across devices within a network through rapid replication.
3.2. Network Intrusion Detection Using Multistage Deep Learning Image Recognition
- W42xH1 image dimension: width 42 pixels and height 1 pixel;
- W7xH6 image dimension: width 7 pixels and height 6 pixels.
4. Experimental Results
4.1. Experimental Settings
4.2. Experimental Results Evaluatinon
4.2.1. Attack Detection on UNSW-NB15 Dataset
4.2.2. Attack Detection on UNSW-NB15 Dataset Employing Oversampling Approach
4.2.3. Attack Detection on UNSW-NB15 Dataset Employing Binary Classification Approach
4.2.4. Attack Type Recognition on UNSW-NB15 Dataset after Attack Was Detected
4.2.5. DDos Attack Detection on BOUN DDos Dataset
4.2.6. Comparison of Intrusion Detection Precision
4.2.7. Summary of Visual Studio 2019 ML.NET Training Classification Results
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Folino, G.; Sabatino, P. Ensemble based collaborative and distributed intrusion detection systems: A survey. J. Netw. Comput. Appl. 2016, 66, 1–16. [Google Scholar] [CrossRef]
- Khraisat, A.; Gondal, I.; Vamplew, P.; Kamruzzaman, J. Survey of intrusion detection systems: Techniques, datasets and challenges. Cybersecurity 2019, 2, 1–22. [Google Scholar] [CrossRef]
- Azeez, N.A.; Odufuwa, O.E.; Misra, S.; Oluranti, J.; Damaševičius, R. Windows PE malware detection using ensemble learning. Informatics 2021, 8, 10. [Google Scholar] [CrossRef]
- Damaševičius, R.; Venčkauskas, A.; Toldinas, J.; Grigaliūnas, Š. Ensemble-based classification using neural networks and machine learning models for windows pe malware detection. Electronics 2021, 10, 485. [Google Scholar] [CrossRef]
- Yong, B.; Wei, W.; Li, K.; Shen, J.; Zhou, Q.; Wozniak, M.; Damaševičius, R. Ensemble machine learning approaches for webshell detection in internet of things environments. Trans. Emerg. Telecommun. Technol. 2020, e4085. [Google Scholar] [CrossRef]
- Huang, K.; Wu, S.; Li, F.; Yang, C.; Gui, W. Fault Diagnosis of Hydraulic Systems Based on Deep Learning Model With Multirate Data Samples. IEEE Trans. Neural Netw. Learn. Syst. 2021, 1–13. [Google Scholar] [CrossRef]
- Alharbi, A.; Alosaimi, W.; Alyami, H.; Rauf, H.T.; Damaševičius, R. Botnet attack detection using local global best bat algorithm for industrial internet of things. Electronics 2021, 10, 1341. [Google Scholar] [CrossRef]
- Wozniak, M.; Silka, J.; Wieczorek, M.; Alrashoud, M. Recurrent neural network model for IoT and networking malware threat detection. IEEE Trans. Ind. Inform. 2021, 17, 5583–5594. [Google Scholar] [CrossRef]
- Hemalatha, J.; Roseline, S.A.; Geetha, S.; Kadry, S.; Damaševičius, R. An efficient densenet-based deep learning model for malware detection. Entropy 2021, 23, 344. [Google Scholar] [CrossRef] [PubMed]
- Bagui, S.; Li, K. Resampling imbalanced data for network intrusion detection datasets. J. Big Data 2021, 8, 1–41. [Google Scholar] [CrossRef]
- Rabbani, M.; Wang, Y.; Khoshkangini, R.; Jelodar, H.; Zhao, R.; Bagheri Baba Ahmadi, S.; Ayobi, S. A Review on Machine Learning Approaches for Network Malicious Behavior Detection in Emerging Technologies. Entropy 2021, 23, 529. [Google Scholar] [CrossRef]
- Kolias, C.; Kambourakis, G.; Stavrou, A.; Gritzalis, S. Intrusion Detection in 802.11 Networks: Empirical Evaluation of Threats and a Public Dataset. IEEE Commun. Surv. & Tutor. 2016, 18, 184–208. [Google Scholar] [CrossRef]
- Damasevicius, R.; Venckauskas, A.; Grigaliunas, S.; Toldinas, J.; Morkevicius, N.; Aleliunas, T.; Smuikys, P. Litnet-2020: An annotated real-world network flow dataset for network intrusion detection. Electronics 2020, 9, 800. [Google Scholar] [CrossRef]
- Vinayakumar, R.; Alazab, M.; Soman, K.P.; Poornachandran, P.; Al-Nemrat, A.; Venkatraman, S. Deep Learning Approach for Intelligent Intrusion Detection System. IEEE Access 2019, 7, 41525–41550. [Google Scholar] [CrossRef]
- Al-Hadhrami, Y.; Hussain, F.K. Real time dataset generation framework for intrusion detection systems in IoT. Future Gener. Comput. Syst. 2020, 108, 414–423. [Google Scholar] [CrossRef]
- Ariyaluran Habeeb, R.A.; Nasaruddin, F.; Gani, A.; Targio Hashem, I.A.; Ahmed, E.; Imran, M. Real-time big data processing for anomaly detection: A survey. Int. J. Inf. Manag. 2019, 45, 289–307. [Google Scholar] [CrossRef] [Green Version]
- Azeez, N.A.; Ayemobola, T.J.; Misra, S.; Maskeliūnas, R.; Damaševičius, R. Network intrusion detection with a hashing based apriori algorithm using hadoop MapReduce. Computers 2019, 8, 86. [Google Scholar] [CrossRef] [Green Version]
- Bani Yassein, M.; Aljawarneh, S.; Wahsheh, Y. Hybrid real-time protection system for online social networks. Found. Sci. 2019, 25, 1095–1124. [Google Scholar] [CrossRef]
- Dias, K.L.; Pongelupe, M.A.; Caminhas, W.M.; de Errico, L. An innovative approach for real-time network traffic classification. Comput. Netw. 2019, 158, 143–157. [Google Scholar] [CrossRef]
- Morfino, V.; Rampone, S. Towards near-real-time intrusion detection for IoT devices using supervised learning and apache spark. Electronics 2020, 9, 444. [Google Scholar] [CrossRef] [Green Version]
- Pan, F.; Han, D.; Hu, Y. Design and application of real-time network abnormal traffic detection system based on spark streaming. Int. J. Embed. Syst. 2019, 11, 562–572. [Google Scholar] [CrossRef]
- Ben Fredj, O.; Mihoub, A.; Krichen, M.; Cheikhrouhou, O.; Derhab, A. CyberSecurity Attack Prediction: A Deep Learning Approach. In Proceedings of the 13th International Conference on Security of Information and Networks, Merkez, Turkey, 4–7 November 2020. [Google Scholar] [CrossRef]
- Magán-Carrión, R.; Urda, D.; Díaz-Cano, I.; Dorronsoro, B. Towards a Reliable Comparison and Evaluation of Network Intrusion Detection Systems Based on Machine Learning Approaches. Appl. Sci. 2020, 10, 1775. [Google Scholar] [CrossRef] [Green Version]
- Kim, J.; Kim, J.; Kim, H.; Shim, M.; Choi, E. CNN-Based Network Intrusion Detection against Denial-of-Service Attacks. Electronics 2020, 9, 916. [Google Scholar] [CrossRef]
- Zhang, X.; Chen, J.; Zhou, Y.; Han, L.; Lin, J. A multiple-layer representation learning model for network-based attack detection. IEEE Access 2019, 7, 91992–92008. [Google Scholar] [CrossRef]
- Wang, Z. Deep Learning-Based Intrusion Detection With Adversaries. IEEE Access 2018, 6, 38367–38384. [Google Scholar] [CrossRef]
- Li, Z.; Qin, Z.; Huang, K.; Yang, X.; Ye, S. Intrusion detection using convolutional neural networks for representation learning. In Neural Information Processing (ICONIP 2017), Lecture Notes in Computer Science; Liu, D., Xie, S., Li, Y., Zhao, D., El-Alfy, E.S., Eds.; Springer: Cham, Switzerland, 2017; Volume 10638, pp. 858–866. [Google Scholar] [CrossRef]
- Potluri, S.; Ahmed, S.; Diedrich, C. Convolutional Neural Networks for Multi-class Intrusion Detection System. Min. Intell. Knowl. Explor. 2018, 225–238. [Google Scholar] [CrossRef]
- Bazgir, O.; Zhang, R.; Dhruba, S.R. Representation of features as images with neighborhood dependencies for compatibility with convolutional neural networks. Nat. Commun. 2020, 11, 4391. [Google Scholar] [CrossRef]
- Mohd Shaid, S.Z.; Maarof, M.A. Malware behavior image for malware variant identification. Int. Symp. Biom. Secur. Technol. (ISBAST) 2014, 238–243. [Google Scholar] [CrossRef]
- Catak, F.O.; Ahmed, J.; Sahinbas, K.; Khand, Z.H. Data augmentation based malware detection using convolutional neural networks. Peer J. Comput. Sci. 2021, 7, e346. [Google Scholar] [CrossRef]
- Ni, S.; Qian, Q.; Zhang, R. Malware identification using visualization images and deep learning. Comput. Secur. 2018, 77, 871–885. [Google Scholar] [CrossRef]
- Han, K.; Kang, B.; Im, E.G. Malware analysis using visualized image matrices. Sci. World J. 2014, 2014. [Google Scholar] [CrossRef] [Green Version]
- Cui, Z.; Xue, F.; Cai, X.; Cao, Y.; Wang, G.; Chen, J. Detection of Malicious Code Variants Based on Deep Learning. IEEE Trans. Ind. Inform. 2018, 14, 3187–3196. [Google Scholar] [CrossRef]
- Ren, Z.; Chen, G.; Lu, W. Malware visualization methods based on deep convolution neural networks. Multimed. Tools Appl. 2020, 79, 10975–10993. [Google Scholar] [CrossRef]
- Vu, D.; Nguyen, T.; Nguyen, T.V.; Nguyen, T.N.; Massacci, F.; Phung, P.H. HIT4Mal: Hybrid image transformation for malware classification. Trans. Emerg. Telecommun. Technol. 2019, 31, e3789. [Google Scholar] [CrossRef]
- Sun, G.; Qian, Q. Deep Learning and Visualization for Identifying Malware Families. IEEE Trans. Dependable Secur. Comput. 2021, 18, 283–295. [Google Scholar] [CrossRef]
- Yosinski, J.; Clune, J.; Bengio, Y.; Lipson, H. How transferable are features in deep neural networks? In Proceedings of the 27th International Conference on Neural Information Processing Systems—Volume 2 (NIPS’14), Montreal Canada, 8–13 December 2014; pp. 3320–3328. [Google Scholar] [CrossRef]
- Moustafa, N.; Slay, J. UNSW-NB15: A comprehensive data set for network intrusion detection systems (UNSW-NB15 network data set). In Proceedings of the 2015 Military Communications and Information Systems Conference (MilCIS), Canberra, Australia, 10–12 November 2015. [Google Scholar] [CrossRef]
- Erhan, D.; Anarım, E. Boğaziçi University distributed denial of service dataset. Data Brief. 2020, 32, 106187. [Google Scholar] [CrossRef] [PubMed]
Dataset | Year | No. of Classes | Attack Classes |
---|---|---|---|
KDD Cup’99 | 1998 | 4 | DoS, Probe, R2L, U2R |
Kyoto 2006+ | 2006 | 2 | Known Attacks, Unknown Attacks |
NSL-KDD | 2009 | 4 | DoS, Probe, R2L, U2R |
UNSW-NB15 | 2015 | 9 | Analysis, Backdoor, DoS, Exploits, Fuzzers, Generic, Normal, Reconnaissance, Shellcode, Worms |
AWID | 2016 | 4 | Key cracking, Keystream retrieving, Dos, Man in the middle |
CIC-IDS2017 | 2017 | 7 | Brute Force, HeartBleed, Botnet, DoS, DDoS, Web, Infiltration |
CSE-CIC-IDS2018 | 2018 | 7 | HeartBleed, DoS, Botnet, DDoS, Brute Force, Infiltration, Web |
LITNET-2020 | 2020 | 12 | Smurf, ICMP Flood, UDP Flood, SYN flood, HTTP Flood, LAND, W32.Blaster, Code Red, SPAM, Reaper Worm, Scan Packet Fragmentation |
BOUN DDoS | 2020 | 2 | DDoS by flooding TCP SYN and UDP packets, Normal traffic |
Feature Name | Feature Category | Feature Type | Total |
---|---|---|---|
proto, service, state | Symbolic | string | 3 |
dur, rate, sload, dload, sinpkt, dinpkt, sjit, djit, tcprtt, synack, ackdat | Numeric | float | 11 |
spkts, dpkts, sbytes, dbytes, sttl, dttl, sloss, dloss, swin, stcpb, dtcpb, dwin, smean, dmean, trans_depth, response_body_len, ct_srv_src, ct_state_ttl, ct_dst_ltm, ct_src_dport_ltm, ct_dst_sport_ltm, ct_dst_src_ltm, is_ftp_login, ct_ftp_cmd, ct_flw_http_mthd, ct_src_ltm, ct_srv_dst, is_sm_ips_ports | Numeric | unsigned integer | 28 |
Dataset | Number of Records in UNSW_NB15_training-set.csv | Number of Records in UNSW_NB15_testing-set.csv | |
---|---|---|---|
Attack Class | |||
Analysis | 2000 | 677 | |
Backdoor | 1746 | 583 | |
DoS | 12,264 | 4089 | |
Exploits | 33,393 | 11,132 | |
Fuzzers | 18,184 | 6062 | |
Generic | 40,000 | 18,871 | |
Normal | 56,000 | 37,000 | |
Reconnaissance | 10,491 | 3496 | |
Shellcode | 1133 | 378 | |
Worms | 130 | 44 | |
Total | 175,341 | 82,332 |
Directory Name (Attack Label) | Training Dataset No. of Images | Testing Dataset No. of Images | No. of Classified Images on Testing Dataset | Precision |
---|---|---|---|---|
Analysis | 2000 | 677 | 87 | 0 |
Backdoor | 1746 | 583 | 37 | 0.027 |
DoS | 12,264 | 4089 | 2 | 1 |
Exploits | 33,393 | 11,132 | 20,787 | 0.4634 |
Fuzzers | 18,184 | 6062 | 7640 | 0.2415 |
Generic | 40,000 | 18,871 | 18,311 | 0.9795 |
Normal | 56,000 | 37,000 | 31,445 | 0.8869 |
Reconnaissance | 10,491 | 3496 | 3922 | 0.6285 |
Shellcode | 1133 | 378 | 101 | 0.3267 |
Worms | 130 | 44 | 0 | 0 |
Total | 175,341 | 82,332 | 82,332 |
Directory Name (Attack Label) | Training Dataset No. of Images | Oversampled Training Dataset No. of Images | Testing DatasetNo. of Images | No. of Classified Images on Testing Dataset | Precision |
---|---|---|---|---|---|
Analysis | 2000 | 32,000 | 677 | 2330 | 0.0232 |
Backdoor | 1746 | 31,428 | 583 | 3658 | 0.0626 |
DoS | 12,264 | 36,792 | 4089 | 5430 | 0.323 |
Exploits | 33,393 | 33,393 | 11,132 | 6839 | 0.7216 |
Fuzzers | 18,184 | 36,368 | 6062 | 11,044 | 0.2277 |
Generic | 40,000 | 40,000 | 18,871 | 17,681 | 0.9934 |
Normal | 56,000 | 56,000 | 37,000 | 25,897 | 0.9235 |
Reconnaissance | 10,491 | 31,473 | 3496 | 3235 | 0.656 |
Shellcode | 1133 | 36,256 | 378 | 4644 | 0.062 |
Worms | 130 | 33,280 | 44 | 1574 | 0.0235 |
Total | 175,341 | 366,990 | 82,332 | 82,332 |
Directory Name (Attack Label) | Training Dataset No. of Images | Testing Dataset No. of Images | No. of Classified Images on Testing Dataset | Precision |
---|---|---|---|---|
Normal | 56,000 | 37,000 | 25,978 | 0.9341 |
Attack | 119,341 | 45,232 | 56,354 | 0.774 |
Total | 175,341 | 82,232 | 82,332 |
Directory Name (Attack Label) | Training Dataset No. of Images | Testing Dataset No. of Images | No. of Classified Images on Testing Dataset | Precision |
---|---|---|---|---|
Analysis | 2000 | 677 | 9 | |
Backdoor | 1746 | 583 | 0 | |
DoS | 12,264 | 4089 | 0 | |
Exploits | 33,393 | 11,132 | 10,607 | 0.679 |
Fuzzers | 18,184 | 6062 | 19,129 | 0.284 |
Generic | 40,000 | 18,871 | 13,323 | 0.9977 |
Reconnaissance | 10,491 | 3496 | 2264 | 0.8604 |
Shellcode | 1133 | 378 | 0 | |
Worms | 130 | 44 | 0 | |
Total | 119,341 | 45,332 | 45,332 |
Directory Name (Attack Label) | Training Dataset No. of Images | Testing Dataset No. of Images | No. of Classified Images on Testing Dataset | Precision |
---|---|---|---|---|
DDoS attack | 19,035 | 12,411 | 12,330 | 0.9973 |
Normal trafic | 39,073 | 34,412 | 34,493 | 0.9967 |
Total | 58,108 | 46,823 | 46,823 | - |
Classification | Kim et al. [24] | Proposed Approach | ||||||
---|---|---|---|---|---|---|---|---|
RNN Model in Case of CSE-CIC-IDS 2018 | Precision | RNN Model in Case of KDD | Precision | ML.NET Model in Case of UNSW-NB15 | Precision | ML.NET Model in Case of BOUN DDos | Precision | |
Binary class | bening | 0.8175 | bening | 0.99 | Normal | 0.9341 | Normal | 0.9967 |
attack | 0.6 | attack | 1.00 | Attack | 0.774 | DDos | 0.9973 | |
Multiclass | bening | 0.7275 | bening | 0.77 | Analysis | 0 | ||
DoS-Hulk | 0.37 | Neptune | 0.92 | Backdoor | 0.027 | |||
DoS-SlowHTTPTest | 0.79 | Smurf | 1.00 | DoS | 1 | |||
DoS-GoldenEye | 0.91 | - | - | Exploits | 0.4634 | |||
DoS-Slowloris | 0.84 | Fuzzers | 0.2415 | |||||
DDoS-LOIC-HTTP | 1 | Generic | 0.9795 | |||||
DDoS-HOIC | 0.44 | Normal | 0.8869 | |||||
Reconnaissance | 0.6285 | |||||||
Shellcode | 0.3267 | |||||||
Worms | 0 |
DNN +
ResNet50 | UNSW-NB15
Training Dataset | BOUN DDoS
Training Dataset | ||||||
---|---|---|---|---|---|---|---|---|
W42 × H1 | W7 × H6 | W10 × H1 | ||||||
All Attacks Types and Normal
(10 Classes) | Binary Classification | Only Attacks
(9 Classes) | All Attacks Types
and Normal (10 Classes) | Binary Classification | ||||
NRM | Not NRM | NRM Oversampled | NRM | NRM | NRM | Not NRM | Not NRM | |
Micro-Accuracy | 0.7595 | 0.7563 | 0.6592 | 0.9287 | 0.6623 | 0.7231 | 0.7474 | 0.9961 |
Macro-Accuracy | 0.395 | 0.4469 | 0.6349 | 0.9077 | 0.3459 | 0.4291 | 0.4104 | 0.9949 |
Training Time (sec) | 29,152.3 | 29,998.4 | 64,839.1 | 31,172.5 | 22,611.7 | 30,139.4 | 31,445.9 | 20,511.5 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Toldinas, J.; Venčkauskas, A.; Damaševičius, R.; Grigaliūnas, Š.; Morkevičius, N.; Baranauskas, E. A Novel Approach for Network Intrusion Detection Using Multistage Deep Learning Image Recognition. Electronics 2021, 10, 1854. https://doi.org/10.3390/electronics10151854
Toldinas J, Venčkauskas A, Damaševičius R, Grigaliūnas Š, Morkevičius N, Baranauskas E. A Novel Approach for Network Intrusion Detection Using Multistage Deep Learning Image Recognition. Electronics. 2021; 10(15):1854. https://doi.org/10.3390/electronics10151854
Chicago/Turabian StyleToldinas, Jevgenijus, Algimantas Venčkauskas, Robertas Damaševičius, Šarūnas Grigaliūnas, Nerijus Morkevičius, and Edgaras Baranauskas. 2021. "A Novel Approach for Network Intrusion Detection Using Multistage Deep Learning Image Recognition" Electronics 10, no. 15: 1854. https://doi.org/10.3390/electronics10151854
APA StyleToldinas, J., Venčkauskas, A., Damaševičius, R., Grigaliūnas, Š., Morkevičius, N., & Baranauskas, E. (2021). A Novel Approach for Network Intrusion Detection Using Multistage Deep Learning Image Recognition. Electronics, 10(15), 1854. https://doi.org/10.3390/electronics10151854