DDosTC: A Transformer-Based Network Attack Detection Hybrid Mechanism in SDN
Abstract
:1. Introduction
- We propose a transformer-based deep learning framework (DDosTC) that uses the computational efficiency and scalability of a transformer, and the predictive ability of a convolutional neural network, to detect distributed denial-of-service attacks on SDN;
- In experiments, we use the newly released dataset, CICDDoS2019, which contains a variety of DDoS attacks and bridges the gap in the existing current dataset, to evaluate our model;
- We test several state-of-the-art deep learning frameworks in detecting DDoS attacks. We evaluate our proposed model in terms of accuracy, recall rate, F1 score, and AUC. The method we propose has the best performance;
- We further evaluate the performance of the model by randomly dividing the training set and the test set.
2. Related Work
3. Model Description
3.1. Convolutional Neural Network
- A convolutional layer to extract features;
- A pooling layer, used for feature dimensionality reduction;
- A fully connected layer, mainly used for classification.
3.2. Transformer
3.3. The Transformer-Based Network Attack Detection Hybrid Mechanism
3.3.1. Transformer Layer
3.3.2. CNN Layer
3.3.3. Dense Layer
4. Results and Evaluation
4.1. Evaluation Metrics
- (1)
- AUC ≈ 1.0: The most ideal inspection index;
- (2)
- AUC 0.7–0.9: High test accuracy;
- (3)
- AUC 0.5: The test had no diagnostic value.
4.2. Experimental Environment
4.3. Data Preprocessing
- We first removed the features of the source and destination IP, source and destination port, timestamp, and flow identification, because we only needed to train the model through packet characteristics. We also removed infinite data and (NaN) data. The final input feature number was 76, and then the data of the remaining features were formatted;
- We coded the tags, coding all DDoS attack tags to 1 and normal traffic tags to 0.
4.4. Experimental Tests and Results
- (1)
- Training set/test set = 8:2 (randomly selected 80% of the data on the training day and 20% of the data on the test day);
- (2)
- Training set/test set = 7:3 (randomly selected 70% of the data on the training day and 30% of the data on the test day);
- (3)
- Training set/test set = 6:4 (randomly selected 60% of the data on the training day and 40% of the data on the test day).
5. Conclusions and Future Work
6. Patents
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Akyildiz, I.F.; Lee, A.; Wang, P.; Luo, M.; Chou, W. A roadmap for traffic engineering in SDN-OpenFlow networks. Comput. Netw. 2014, 71, 1–30. [Google Scholar] [CrossRef]
- Casado, M.; Garfinkel, T.; Akella, A.; Freedman, M.J.; Boneh, D.; McKeown, N.; Shenker, S. SANE: A Protection Architecture for Enterprise Networks. In Proceedings of the 15-th Usenix Security Symposium, Vancouver, BC, Canada, 31 July–4 August 2006; p. 50. [Google Scholar]
- Benzekki, K.; Fergougui, A.E.; Elalaoui, A.E. Software-defined networking (SDN): A survey. Secur. Commun. Netw. 2016, 9, 5803–5833. [Google Scholar] [CrossRef]
- Kurochkin, I.I.; Volkov, S.S. Using GRU based deep neural network for intrusion detection in software-defined networks. IOP Conf. Ser. Mater. Sci. Eng. 2020, 927, 012035. [Google Scholar] [CrossRef]
- Wang, H.; Lei, X.; Gu, G. FloodGuard: A DoS Attack Prevention Extension in Software-Defined Networks. In Proceedings of the 2015 45th Annual IEEE/IFIP International Conference on Dependable Systems and Networks, Rio de Janeiro, Brazil, 22–25 June 2015. [Google Scholar]
- Hoque, N.; Bhattacharyya, D.; Kalita, J. Botnet in DDoS Attacks: Trends and Challenges. IEEE Commun. Surv. Tutor. 2015, 17, 2242–2270. [Google Scholar] [CrossRef]
- Nazario, J. DDoS attack evolution. Netw. Secur. 2008, 2008, 7–10. [Google Scholar] [CrossRef]
- Mahmoud, R.; Yousuf, T.; Aloul, F.; Zualkernan, I. Internet of things (IoT) security: Current status, challenges and prospective measures. In Proceedings of the 2015 10th International Conference for Internet Technology and Secured Transactions (ICITST), London, UK, 14–16 December 2015. [Google Scholar]
- Bures, M.; Klima, M.; Rechtberger, V.; Ahmed, B.S.; Hindy, H.; Bellekens, X. Review of Specific Features and Challenges in the Current Internet of Things Systems Impacting Their Security and Reliability. In Trends and Applications in Information Systems and Technologies; Rocha, Á., Adeli, H., Dzemyda, G., Moreira, F., Ramalho Correia, A.M., Eds.; WorldCIST 2021, Advances in Intelligent Systems and Computing; Springer: Cham, Switzerland, 2021; Volume 1367. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention is all you need. CoRR. arXiv 2017, arXiv:1706.03762v5. [Google Scholar]
- Devlin, J.; Chang, M.; Lee, K.; Toutanova, K. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the NAACL-HLT 2019, Minneapolis, MN, USA, 2–7 June 2019; pp. 4171–4186. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
- He, H.Y.Z.; Yang, G.; Chen, X.N. PERT: Payload Encoding Representation from Transformer for Encrypted Traffic Classification. In Proceedings of the 2020 ITU Kaleidoscope: Industry-Driven Digital Transformation (ITU K), Ha Noi, Vietnam, 7–11 December 2020. [Google Scholar]
- Bikmukhamedo, R.; Nadeev, A. Generative transformer framework for network traffic generation and classification. T-Comm. 2020, 14, 64–71. [Google Scholar] [CrossRef]
- Mihai-Gabriel, I.; Victor-Valeriu, P. Achieving DDoS resiliency in a software defined network by intelligent risk assessment based on neural networks and danger theory. In Proceedings of the IEEE 15th International Symposium on Computational Intelligence and Informatics (CINTI), Budapest, Hungary, 19–21 November 2014; pp. 319–324. [Google Scholar]
- Kokila, R.T.; Selvi, S.T.; Govindarajan, K. DDoS detection and analysis in SDN based environment using support vector machine classifier. In Proceedings of the IEEE Sixth International Conference on Advanced Computing (ICoAC), Chennai, India, 17–19 December 2014; pp. 205–210. [Google Scholar]
- Phan, T.V.; van Toan, T.; van Tuyen, D.; Huong, T.T.; Thanh, N.H. OpenFlowSIA: An optimized protection scheme for software-defined networks from flooding attacks. In Proceedings of the IEEE Sixth International Conference on Communications and Electronics (ICCE), Ha Long, Vietnam, 27–29 July 2016; pp. 13–18. [Google Scholar]
- Phan, T.V.; Bao, N.K.; Park, M. A Novel Hybrid Flow-based Handler with DDoS Attacks in Software-Defined Networking. In Proceedings of the 2016 Intl IEEE Conferences on Ubiquitous Intelligence & Computing, Advanced and Trusted Computing, Scalable Computing and Communications, Cloud and Big Data Computing, Internet of People, and Smart World Congress, Toulouse, France, 18–21 July 2016; pp. 350–357. [Google Scholar]
- Elsayed, M.S.; Le-Khac, N.; Dev, S.; Jurcut, A.D. DDoSNet: A Deep-Learning Model for Detecting Network Attacks. In Proceedings of the 2020 IEEE 21st International Symposium on “A World of Wireless, Mobile and Multimedia Networks” (WoWMoM), Cork, Ireland, 31 August–3 September 2020. [Google Scholar]
- Haider, S.; Akhunzada, A.; Mustafa, I.; Patel, T.B.; Fernandez, A.; Choo, K.K.R.; Iqbal, J. A Deep CNN Ensemble Framework for Efficient DDoS Attack Detection in Software Defined Networks. IEEE Access 2020, 8, 99. [Google Scholar] [CrossRef]
- Shiravi, A.; Shiravi, H.; Tavallaee, M.; Ghorbani, A.A. Toward developing a systematic approach to generate benchmark datasets for intrusion detection. Comput. Secur. 2012, 31, 357–374. [Google Scholar] [CrossRef]
- Malik, J.; Akhunzada, A.; Bibi, I.; Imran, M.; Musaddiq, A.; Kim, S.W. Hybrid Deep Learning: An Efficient Reconnaissance and Surveillance Detection Mechanism in SDN. IEEE Access 2020, 8, 134695–134706. [Google Scholar] [CrossRef]
- Sharafaldin, I.; Lashkari, A.H.; Ghorbani, A.A. Toward generating a new intrusion detection dataset and intrusion traffic characterization. ICISSP 2018, 1, 108–116. [Google Scholar]
- Niyaz, Q.; Sun, W.; Javaid, A.Y. A Deep Learning Based DDoS Detection System in Software-Defined Networking (SDN). EAI Endorsed Trans. Secur. Saf. 2017, 4, 1–12. [Google Scholar] [CrossRef] [Green Version]
- Datasets. Research. Canadian Institute of Cybersecurity. Available online: https://www.unb.ca/cic/datasets/DDoS-2019.html (accessed on 5 March 2021).
- Tang, T.A.; Mhamdi, L.; McLernon, D.; Zaidi, S.A.R.; Ghogho, M. Deep Recurrent Neural Network for Intrusion Detection in SDN-based Networks. In Proceedings of the 2018 4th IEEE Conference on Network Softwarization and Workshops (NetSoft), Montreal, QC, Canada, 25–29 June 2018; pp. 202–206. [Google Scholar]
- Tavallaee, M.; Bagheri, E.; Lu, W.; Ghorbani, A.A. A detailed analysis of the KDD CUP 99 data set. In Proceedings of the Symposium on Computational Intelligence for Security and Defense Applications, Ottawa, ON, Canada, 8–10 July 2009; pp. 1–6. [Google Scholar]
- Lee, T.H.; Chang, L.H.; Syu, C.W. Deep Learning Enabled Intrusion Detection and Prevention System over SDN Networks. In Proceedings of the 2020 IEEE International Conference on Communications Workshops (ICC Workshops), Dublin, Ireland, 7–11 June 2020. [Google Scholar]
- LeCun, Y.; Boser, B.; Denker, J.; Henderson, D.; Howard, R.; Hubbard, W.; Jackel, L. Backpropa-gation applied to handwritten zip code recognition. Neural Comput. 1989, 1, 541–551. [Google Scholar] [CrossRef]
- Bahdanau, D.; Cho, K.; Bengio, Y. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv 2016, arXiv:1409.0473. [Google Scholar]
- Lin, M.; Chen, Q.; Yan, S. Network in network. In Proceedings of the 2nd International Conference on Learning Representations (ICLR 2014), Banff, AB, Canada, 14–16 April 2014. [Google Scholar]
- Tharwat, A. Classification Assessment Methods. Appl. Comput. Inform. 2021, 17, 168–192. [Google Scholar] [CrossRef]
Hybrid Algorithm | Test Size | Epochs | Learning Rate | Batch Size |
---|---|---|---|---|
DDosTC | 0.2 | 20 | 0.1 | 64 |
0.3 | ||||
0.4 | ||||
Transformer | 0.2 | 20 | 0.1 | 64 |
0.3 | ||||
0.4 | ||||
Transformer + LSTM | 0.2 | 20 | 0.1 | 64 |
0.3 | ||||
0.4 | ||||
Transformer + CNN + LSTM | 0.2 | 20 | 0.1 | 64 |
0.3 | ||||
0.4 |
Data Set Division | Algorithms | Accuracy | Precision | F1 Score | Recall |
---|---|---|---|---|---|
Train/Test = 8:2 | DDosTC | 0.9982 | 0.9988 | 0.9992 | 0.9996 |
GRU | 0.9955 | 0.9970 | 0.9979 | 0.9987 | |
CNN | 0.9775 | 0.9786 | 0.9892 | 0.9912 | |
B-GRU | 0.9876 | 0.9897 | 0.9941 | 0.9984 | |
RNN | 0.9942 | 0.9967 | 0.9972 | 0.9978 | |
LSTM + GRU | 0.9939 | 0.9968 | 0.9971 | 0.9974 | |
LSTM | 0.9949 | 0.9972 | 0.9976 | 0.9981 | |
Train/Test = 7:3 | DDosTC | 0.9978 | 0.9989 | 0.9989 | 0.9989 |
GRU | 0.9945 | 0.9971 | 0.9973 | 0.9975 | |
CNN | 0.9777 | 0.9782 | 0.9890 | 0.9892 | |
B-GRU | 0.9922 | 0.9942 | 0.9962 | 0.9983 | |
RNN | 0.9946 | 0.9965 | 0.9974 | 0.9983 | |
LSTM + GRU | 0.9948 | 0.9968 | 0.9975 | 0.9982 | |
LSTM | 0.9952 | 0.9970 | 0.9976 | 0.9983 | |
Train/Test = 6:4 | DDosTC | 0.9970 | 0.9998 | 0.9984 | 0.9970 |
GRU | 0.9944 | 0.9969 | 0.9972 | 0.9976 | |
CNN | 0.9775 | 0.9781 | 0.9889 | 0.9892 | |
B-GRU | 0.9940 | 0.9959 | 0.9971 | 0.9983 | |
RNN | 0.9935 | 0.9969 | 0.9968 | 0.9966 | |
LSTM + GRU | 0.9948 | 0.9967 | 0.9975 | 0.9983 | |
LSTM | 0.9950 | 0.9969 | 0.9976 | 0.9983 |
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
Wang, H.; Li, W. DDosTC: A Transformer-Based Network Attack Detection Hybrid Mechanism in SDN. Sensors 2021, 21, 5047. https://doi.org/10.3390/s21155047
Wang H, Li W. DDosTC: A Transformer-Based Network Attack Detection Hybrid Mechanism in SDN. Sensors. 2021; 21(15):5047. https://doi.org/10.3390/s21155047
Chicago/Turabian StyleWang, Haomin, and Wei Li. 2021. "DDosTC: A Transformer-Based Network Attack Detection Hybrid Mechanism in SDN" Sensors 21, no. 15: 5047. https://doi.org/10.3390/s21155047
APA StyleWang, H., & Li, W. (2021). DDosTC: A Transformer-Based Network Attack Detection Hybrid Mechanism in SDN. Sensors, 21(15), 5047. https://doi.org/10.3390/s21155047