Malicious Network Traffic Detection Based on Deep Neural Networks and Association Analysis
<p>The process of our anomaly detection system, which mainly consists of preprocessing the dataset, deep neural network (DNN) training, classification, and association analysis.</p> "> Figure 2
<p>Training process of DNN: binary classification.</p> ">
Abstract
:1. Introduction
1.1. NIDS Based on Traditional Machine Learning
1.2. NIDS Based on Deep Learning Technology
2. Proposed Malicious Network Traffic Detection System
2.1. Data Preprocessing
2.1.1. Data Preprocessing Corresponding to DNN Models
2.1.2. Data Preprocessing Corresponding to Apriori Association Algorithm
2.2. DNN Training and Classification
2.3. Association Analysis
- Build a list of candidate sets of k variables.
- Examine the data to determine whether each item set is a frequent item set (the support of the item set is greater than the set minimum support of 0.5).
- If the item set is frequent, keep the item set and build a list of candidate sets consisting of k + 1 items.
3. Experimental Results and Analysis
3.1. NSL-KDD Dataset Preprocessing
3.1.1. Data Preprocessing Corresponding to the DNN Model
3.1.2. Data Preprocessing Corresponding to Apriori Algorithm
3.2. Training and Prediction of DNN
3.2.1. Evaluation Metrics
3.2.2. Comparison of Different Neural Networks
3.3. Mining Association Rules
3.4. Evaluation Results of Elimination
3.4.1. Binary Classification
3.4.2. Multi-class Classification
4. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Mukherjee, B.; Heberlein, L.T.; Levitt, K.N. Network intrusion detection. IEEE Netw. 1994, 8, 26–41. [Google Scholar] [CrossRef]
- Garcia-Teodoro, P.; Diaz-Verdejo, J.; Macia-Fernandez, G.; Kim, I. Anomaly-based network intrusion detection: Techniques, systems and challenges. Comput. Secur. 2009, 28, 18–28. [Google Scholar] [CrossRef]
- Ashfaq, R.A.R.; Wang, X.Z.; Huang, J.Z.; Abbas, H.; He, Y.L. Fuzziness based semi-supervised learning approach for intrusion detection system. Inf. Sci. 2017, 378, 484–497. [Google Scholar] [CrossRef]
- Sabeti, E.; Host-Madsen, A. Data Discovery and Anomaly Detection Using Atypicality for Real-Valued Data. Entropy 2019, 21, 219. [Google Scholar] [CrossRef] [Green Version]
- Aloqaily, M.; Otoum, S.; Ridhawi, A.I.; Jararweh, Y. An intrusion detection system for connected vehicles in smart cities. Ad Hoc Netw. 2019, 90. [Google Scholar] [CrossRef]
- Lu, H.M.; Li, Y.J.; Mu, S.L.; Wang, D.; Kim, H.; Serikawa, S. Motor Anomaly Detection for Unmanned Aerial Vehicles Using Reinforcement Learning. IEEE Internet Things J. 2018, 5, 2315–42322. [Google Scholar] [CrossRef]
- Podgorelec, B.; Turkanovic, M.; Karakatic, S. A Machine Learning-Based Method for Automated Blockchain Transaction Signing Including Personalized Anomaly Detection. Sensors 2020, 20, 147. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Wang, J.; Yang, Q.; Ren, D. An intrusion detection algorithm based on decision tree technology. In Proceedings of the 2009 Asia-Pacific Conference on Information Processing, Shenzhen, China, 18–19 July 2009. [Google Scholar]
- Farid, D.M.; Harbi, N.; Rahman, M.Z. Combining Nave Bayes and Decision Tree for Adaptive Intrusion Detection. Available online: https://arxiv.org/abs/1005.4496 (accessed on 15 January 2020).
- Hu, W.; Hu, W.; Maybank, S. Adaboost-based algorithm for network intrusion detection. IEEE Trans. Syst. Man Cybern. Part B (Cybern) 2008, 38, 577–583. [Google Scholar] [PubMed]
- Ektefa, M.; Memar, S.; Sidi, F.; Affendey, L.S. Intrusion detection using data mining techniques. In Proceedings of the 2010 International Conference on Information Retrieval & Knowledge Management (CAMP), Shah Alam, Selangor, Malaysia, 17–18 March 2010. [Google Scholar]
- Panda, M.; Abraham, A.; Patra, M.R. Discriminative multinomial naive bayes for network intrusion detection. In Proceedings of the 2010 Sixth International Conference on Information Assurance and Security, Atlanta, GA, USA, 23–25 August 2010. [Google Scholar]
- Panda, M.; Abraham, A.; Patra, M.R. A hybrid intelligent approach for network intrusion detection. Procedia Eng. 2012, 30, 1–9. [Google Scholar] [CrossRef] [Green Version]
- Brunetti, A.; Buongiorno, D.; Trotta, G.F.; Bevilacqua, V. Computer vision and deep learning techniques for pedestrian detection and tracking: A survey. Neurocomputing 2018, 300, 17–33. [Google Scholar] [CrossRef]
- Xing, F.Y.; Xie, Y.P.; Su, H.; Liu, F.J.; Yang, L. Deep Learning in Microscopy Image Analysis: A Survey. IEEE Trans. Neural Netw. Learn. Syst. 2018, 29, 4550–4568. [Google Scholar] [CrossRef] [PubMed]
- Long, J.; Shelhamer, E.; Darrell, T. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015. [Google Scholar]
- Le, T.T.H.; Kim, Y.; Kim, H. Network Intrusion Detection Based on Novel Feature Selection Model and Various Recurrent Neural Networks. Appl. Sci. 2019, 9, 1392. [Google Scholar] [CrossRef] [Green Version]
- Vinayakumar, R.; Soman, K.P.; Poornachandran, P. Applying convolutional neural network for network intrusion detection. In Proceedings of the 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Udupi, India, 13–16 September 2017; pp. 1222–1228. [Google Scholar]
- Vinayakumar, R.; Soman, K.P.; Poornachandran, P. Evaluating effectiveness of shallow and deep networks to intrusion detection system. In Proceedings of the 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Udupi, India, 13–16 September 2017; pp. 1282–1289. [Google Scholar]
- Yu, Y.; Long, J.; Cai, Z.P. Network Intrusion Detection through Stacking Dilated Convolutional Autoencoders. Secur. Commun. Netw. 2017, 2017, 4184196. [Google Scholar] [CrossRef]
- Abusitta, A.; Bellaiche, M.; Dagenais, M.; Halabi, T. A deep learning approach for proactive multi-cloud cooperative intrusion detection system. Future Gener. Comput. Syst. 2019, 98, 308–318. [Google Scholar] [CrossRef]
- Tavallaee, M.; Bagheri, E.; Lu, W.; Ghorbani, A. A Detailed Analysis of the KDD CUP 99 Data Set. In Proceedings of the 2009 IEEE Symposium on Computational Intelligence for Security and Defense Applications (CISDA), Ottawa, ON, Canada, 8–10 July 2009. [Google Scholar]
- Sharafaldin, I.; Lashkari, A.H.; Ghorbani, A.A. Toward Generating a New Intrusion Detection Dataset and Intrusion Traffic Characterization. Available online: https://www.scitepress.org/Papers/2018/66398/66398.pdf (accessed on 31 January 2020).
Land | Logged_in | Protocol_type | Service | … | Label |
---|---|---|---|---|---|
land | logged_in | UDP | aol | … | Attack |
no_land | no_logged_in | TCP | auth | … | Normal |
Layers | Type | Output Shape | Number of Units | Activation Function |
---|---|---|---|---|
Input | (None, 122) | 122 | ||
0–1 | Fully connected | (None, 256) | 256 | ReLU |
1–2 | Dropout (0.01) | |||
2–3 | Fully connected | (None, 256) | 256 | ReLU |
3–4 | Dropout (0.01) | |||
4–5 | Fully connected | (None, 256) | 256 | ReLU |
5–6 | Dropout (0.01) | |||
6–7 | Fully connected | (None, 256) | 256 | ReLU |
7–8 | Dropout (0.01) | |||
Output | (None, 1 or 5) |
No | Characteristic |
---|---|
1 | Basic characteristics of TCP connection (9 types, 1–9) |
2 | TCP connection content characteristics (13 types, 10–22) |
3 | Statistical characteristics of time-based network traffic (9 types in total, 23–31) |
4 | Statistical characteristics of host-based network traffic (10 in total, 32–41) |
Land | Logged_in | Root_shell | Su_attempted | Is_host_login | Is_guest_login | Protocol_type | Service | Flag | Label |
---|---|---|---|---|---|---|---|---|---|
no_land | no_logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | ftp_data | SF | normal |
no_land | no_logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | udp | other | SF | normal |
no_land | no_logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | private | S0 | attack |
no_land | logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | http | SF | normal |
no_land | logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | http | SF | normal |
no_land | no_logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | private | REJ | attack |
no_land | no_logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | private | S0 | attack |
no_land | no_logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | private | S0 | attack |
no_land | no_logged_in | no_root_shell | no_su_attempted | no_is_host_login | no_is_guest_login | tcp | remote_job | S0 | attack |
Model | Accuracy | Precision | Recall | F-score |
---|---|---|---|---|
DNN-3 | 79.76% | 0.91 | 0.72 | 0.80 |
DNN-4 | 82.74% | 0.88 | 0.81 | 0.84 |
DNN-5 | 81.33% | 0.92 | 0.74 | 0.82 |
DNN-6 | 80.56% | 0.90 | 0.74 | 0.81 |
RNN | 77% | 0.95 | 0.63 | 0.76 |
CNN4 | 80% | 0.96 | 0.67 | 0.79 |
RF | 77% | 0.95 | 0.63 | 0.76 |
SVM | 78% | 0.91 | 0.68 | 0.77 |
Model | DNN-3 | DNN-4 | DNN-5 | DNN-6 | RNN | CNN4 | RF | SVM | |
---|---|---|---|---|---|---|---|---|---|
Accuracy | 76.84% | 77.03% | 76.22% | 75.99% | 71.34% | 73.58% | 46.73% | 72.13% | |
Normal | Precision | 0.71 | 0.72 | 0.70 | 0.70 | 0.66 | 0.66 | 0.63 | 0.67 |
Recall | 0.94 | 0.94 | 0.94 | 0.94 | 0.84 | 0.95 | 0.97 | 0.86 | |
F1-score | 0.81 | 0.81 | 0.80 | 0.80 | 0.74 | 0.78 | 0.77 | 0.75 | |
Dos | Precision | 0.91 | 0.88 | 0.91 | 0.91 | 0.80 | 0.96 | 0.00 | 0.81 |
Recall | 0.85 | 0.86 | 0.83 | 0.82 | 0.84 | 0.76 | 0.00 | 0.84 | |
F1-score | 0.88 | 0.87 | 0.87 | 0.86 | 0.82 | 0.85 | 0.00 | 0.83 | |
Probe | Precision | 0.71 | 0.72 | 0.70 | 0.69 | 0.71 | 0.61 | 0.25 | 0.72 |
Recall | 0.75 | 0.75 | 0.74 | 0.76 | 0.67 | 0.65 | 0.48 | 0.65 | |
F1-score | 0.73 | 0.73 | 0.72 | 0.72 | 0.69 | 0.63 | 0.33 | 0.69 | |
R2L | Precision | 0.00 | 0.27 | 0.31 | 0.42 | 0.19 | 0.95 | 0.00 | 0.07 |
Recall | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.06 | 0.00 | 0.00 | |
F1-score | 0.00 | 0.00 | 0.01 | 0.01 | 0.00 | 0.11 | 0.00 | 0.00 | |
U2R | Precision | 0.50 | 0.62 | 0.67 | 0.80 | 0.28 | 0.00 | 0.00 | 0.21 |
Recall | 0.10 | 0.07 | 0.09 | 0.12 | 0.07 | 0.00 | 0.00 | 0.15 | |
F1-score | 0.17 | 0.13 | 0.16 | 0.21 | 0.12 | 0.00 | 0.00 | 0.17 |
Model | DNN-3 | DNN-4 | DNN-5 | DNN-6 | RNN | CNN4 | RF | |
---|---|---|---|---|---|---|---|---|
SSH | Accuracy | 99.17% | 99.03% | 98.61% | 97.72% | 97.36% | 96.89% | 99.98% |
Precision | 0.93 | 0.81 | 0.72 | 0.50 | 0.00 | 0.00 | 1.00 | |
Recall | 0.50 | 0.85 | 0.98 | 0.24 | 0.00 | 0.00 | 1.00 | |
F1-score | 0.65 | 0.83 | 0.83 | 0.32 | 0.00 | 0.00 | 1.00 | |
FTP | Accuracy | 99.17% | 99.03% | 98.61% | 97.72% | 97.36% | 96.89% | 99.98% |
Precision | 0.94 | 0.80 | 0.73 | 0.94 | 0.88 | 0.00 | 1.00 | |
Recall | 1.00 | 0.98 | 0.79 | 0.50 | 0.31 | 0.00 | 1.00 | |
F1-score | 0.97 | 0.88 | 0.76 | 0.65 | 0.46 | 0.00 | 1.00 | |
Web | Accuracy | 98.22% | 98.68% | 97.34% | 89.01% | 98.64% | 98.69% | 99.96% |
Precision | 0.16 | 0.00 | 0.32 | 0.09 | 0.49 | 0.00 | 1.00 | |
Recall | 0.08 | 0.00 | 0.91 | 0.84 | 0.83 | 0.00 | 0.97 | |
F1-score | 0.01 | 0.00 | 0.47 | 0.17 | 0.62 | 0.00 | 0.99 | |
Bot | Accuracy | 96.94% | 99.33% | 99.01% | 99.01% | 99.01% | 99.01% | 99.91% |
Precision | 0.11 | 0.68 | 0.00 | 0.00 | 0.00 | 1.00 | 0.99 | |
Recall | 0.28 | 0.61 | 0.00 | 0.00 | 0.00 | 0.01 | 0.94 | |
F1-score | 0.15 | 0.65 | 0.00 | 0.00 | 0.00 | 0.02 | 0.97 | |
DDOS | Accuracy | 98.44% | 98.72% | 98.08% | 98.56% | 95.18% | 75.23% | 99.98% |
Precision | 0.98 | 0.98 | 0.97 | 0.98 | 0.93 | 0.70 | 1.00 | |
Recall | 1.00 | 1.00 | 1.00 | 1.00 | 0.99 | 1.00 | 1.00 | |
F1-score | 0.99 | 0.99 | 0.98 | 0.98 | 0.96 | 0.82 | 1.00 | |
PortScan | Accuracy | 97.43% | 95.25% | 98.77% | 98.43% | 87.64% | 64.29% | 99.99% |
Precision | 0.96 | 0.92 | 0.96 | 0.97 | 0.82 | 0.61 | 1.00 | |
Recall | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | |
F1-score | 0.98 | 0.96 | 0.98 | 0.99 | 0.90 | 0.76 | 1.00 |
No | Item-set |
---|---|
1 | {“normal”, “no_land”} |
2 | {“no_root_shell”, “normal”} |
3 | {“normal”, “no_su_attempted”} |
4 | {“normal”, “SF”} |
5 | {“no_is_host_login”, “normal”} |
6 | {“no_is_guest_login”, “normal”} |
No | Association Rules |
---|---|
1 | {“SF”} => {“normal”} conf: 0.845 |
2 | {“no_land”, “no_su_attempted”, “SF”} => {“normal”} conf: 0.845 |
3 | {“no_land”, “no_root_shell”, “no_su_attempted”, “SF”} => {“normal”} conf: 0.845 |
4 | {“SF”, “no_is_host_login”, “no_su_attempted”, “no_root_shell”, “no_land”} => {“normal”} conf: 0.845 |
Method | Precision | Recall | F-score | Number of Alarm Raised |
---|---|---|---|---|
(Before filtering) DNN-3 | 0.91 | 0.72 | 0.80 | 10,141 |
(After filtering) DNN-3 | 0.99 | 0.55 | 0.71 | 7165 |
(Before filtering) DNN-4 | 0.88 | 0.70 | 0.80 | 11,753 |
(After filtering) DNN-4 | 0.99 | 0.54 | 0.70 | 7500 |
(Before filtering) DNN-5 | 0.92 | 0.74 | 0.82 | 10,342 |
(After filtering) DNN-5 | 0.99 | 0.56 | 0.72 | 7300 |
(Before filtering) DNN-6 | 0.90 | 0.74 | 0.81 | 10,523 |
(After filtering) DNN-6 | 0.99 | 0.56 | 0.72 | 7301 |
Label | Precision | Recall | F-score | Number of Alarm Raised | |
---|---|---|---|---|---|
Before filtering | Normal | 0.72 | 0.94 | 0.81 | 9863 |
Dos | 0.88 | 0.86 | 0.87 | ||
Probe | 0.72 | 0.75 | 0.73 | ||
R2L | 0.27 | 0.00 | 0.00 | ||
U2R | 0.62 | 0.07 | 0.13 | ||
After filtering | Normal | 0.63 | 0.99 | 0.77 | 7336 |
Dos | 0.91 | 0.73 | 0.81 | ||
Probe | 0.89 | 0.49 | 0.63 | ||
R2L | 0.30 | 0.00 | 0.00 | ||
U2R | 0.62 | 0.07 | 0.13 |
Protocol_type | Service | Flag | Urgent | Hot | Count | Prediction |
---|---|---|---|---|---|---|
tcp | private | REJ | 0 | 0 | 255 | Dos |
tcp | private | REJ | 0 | 0 | 255 | Dos |
tcp | private | REJ | 0 | 0 | 255 | Dos |
tcp | telnet | S0 | 0 | 0 | 235 | Dos |
tcp | private | REJ | 0 | 0 | 255 | Dos |
tcp | ldap | REJ | 0 | 0 | 255 | R2L |
tcp | pop_3 | S0 | 0 | 0 | 255 | Dos |
tcp | courier | REJ | 0 | 0 | 255 | Dos |
tcp | discard | RSTO | 0 | 0 | 255 | Dos |
tcp | http | RSTR | 0 | 0 | 241 | Dos |
tcp | private | REJ | 0 | 0 | 255 | Probe |
tcp | private | S0 | 0 | 0 | 255 | Dos |
tcp | mtp | REJ | 0 | 0 | 255 | Dos |
tcp | telnet | S0 | 0 | 0 | 91 | Dos |
tcp | iso_tsap | REJ | 0 | 0 | 255 | Dos |
tcp | private | REJ | 0 | 0 | 255 | Dos |
tcp | other | REJ | 0 | 0 | 255 | Probe |
tcp | telnet | REJ | 0 | 0 | 106 | Probe |
tcp | private | REJ | 0 | 0 | 255 | Dos |
tcp | smtp | S0 | 0 | 0 | 255 | Dos |
© 2020 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 (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gao, M.; Ma, L.; Liu, H.; Zhang, Z.; Ning, Z.; Xu, J. Malicious Network Traffic Detection Based on Deep Neural Networks and Association Analysis. Sensors 2020, 20, 1452. https://doi.org/10.3390/s20051452
Gao M, Ma L, Liu H, Zhang Z, Ning Z, Xu J. Malicious Network Traffic Detection Based on Deep Neural Networks and Association Analysis. Sensors. 2020; 20(5):1452. https://doi.org/10.3390/s20051452
Chicago/Turabian StyleGao, Minghui, Li Ma, Heng Liu, Zhijun Zhang, Zhiyan Ning, and Jian Xu. 2020. "Malicious Network Traffic Detection Based on Deep Neural Networks and Association Analysis" Sensors 20, no. 5: 1452. https://doi.org/10.3390/s20051452