Cross-Attack Evaluation of Decision Tree and Naïve Bayes for DDoS Detection on the CIC-DDoS2019 Dataset
DOI:
https://doi.org/10.65205/jcct.2026.e4540Keywords:
DDoS Detection, Cross-Attack Evaluation, Machine Learning, Class ImbalanceAbstract
This study aimed to 1) compare the performance of Decision Tree (DT) and Naïve Bayes (NB) algorithms in detecting DDoS attacks and 2) evaluate models trained on NTP data and tested on DNS attacks that were not included in training. Data from CIC-DDoS2019 were used to train the models on NTP traffic and test them on DNS traffic under balanced and natural-prevalence conditions. Model performance was assessed using confusion matrices and statistical metrics. In internal testing on NTP data, DT achieved an accuracy of 99.91%, compared with 99.69% for NB. In cross-attack testing on the balanced DNS dataset, DT achieved an accuracy of 99.63%, while NB achieved 96.27%. McNemar’s test showed a statistically significant difference in classification accuracy between the two models (exact p = 3.39 × 10-52), with DT making more correct predictions. On the natural-prevalence DNS dataset, DT achieved an accuracy of 99.50%, compared with 99.28% for NB. These findings indicate that DT performed better overall than NB in both internal NTP testing and cross-attack testing from NTP to DNS. However, both attack types came from CIC-DDoS2019 and may share common characteristics. The results therefore do not establish how well the models would perform in real-world network environments.
Downloads
References
Abiramasundari, S., & Ramaswamy, V. (2025). Distributed Denial-of-Service (DDOS) Attack Detection Using Supervised Machine Learning Algorithms. Scientific Reports, 15(1), 13098. https://doi.org/10.1038/s41598-024-84879-y
Aktar, S., & Yasin Nur, A. (2023). Towards DDoS Attack Detection Using Deep Learning Approach. Computers & Security, 129, 103251. https://doi.org/10.1016/j.cose.2023.103251
Alfathe, M., Mustapha, A., Mohamed, H. L., Mostafa, S. A., Yousif, Y. K., & Al-Shakarchi, A. H. (2024). Detecting DDoS Attacks in Network Traffic Based on Supervised Machine Learning. Al-Noor Journal for Information Technology and Cyber Security, 1(0), 23-48. https://doi.org/10.69513/jncs.v1.i0.a2
Arp, D., Quiring, E., Pendlebury, F., Warnecke, A., Pierazzi, F., Wressnegger, C., Cavallaro, L., & Rieck, K. (2022, August 10-12). Dos and Don'ts of Machine Learning in Computer Security. 31st USENIX Security Symposium, 3971-3988. USENIX Association. https://www.usenix.org/conference/usenixsecurity22/presentation/arp
Becerra-Suarez, F. L., Fernández-Roman, I., & Forero, M. G. (2024). Improvement of Distributed Denial of Service Attack Detection Through Machine Learning and Data Processing. Mathematics, 12(9), 1294. https://doi.org/10.3390/math12091294
Brodersen, K. H., Ong, C. S., Stephan, K. E., & Buhmann, J. M. (2010, August 23-26). The balanced accuracy and its posterior distribution. 20th International Conference on Pattern Recognition, 3121–3124. Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/icpr.2010.764
Buczak, A. L., & Guven, E. (2016). A Survey of Data Mining and Machine Learning Methods for Cyber Security Intrusion Detection. IEEE Communications Surveys & Tutorials, 18(2), 1153-1176. https://doi.org/10.1109/comst.2015.2494502
Cantone, M., Marrocco, C., & Bria, A. (2024). Machine Learning in Network Intrusion Detection: A Cross-Dataset Generalization Study. IEEE Access, 12, 144489-144508. https://doi.org/10.1109/access.2024.3472907
D’hooge, L., Verkerken, M., Wauters, T., De Turck, F., & Volckaert, B. (2023). Investigating Generalized Performance of Data-Constrained Supervised Machine Learning Models on Novel, Related Samples in Intrusion Detection. Sensors, 23(4), 1846. https://doi.org/10.3390/s23041846
Fathian, M., & Seifousadati, A. (2026). A Real-Time Machine-Learning Model for Detecting and Mitigating DDoS Attacks. Cybersecurity, 9(1), 30. https://doi.org/10.1186/s42400-025-00497-9
Fawcett, T. (2006). An Introduction to ROC Analysis. Pattern Recognition Letters, 27(8), 861-874. https://doi.org/10.1016/j.patrec.2005.10.010
Geirhos, R., Jacobsen, J.-H., Michaelis, C., Zemel, R., Brendel, W., Bethge, M., & Wichmann, F. A. (2020). Shortcut Learning in Deep Neural Networks. Nature Machine Intelligence, 2(11), 665-673. https://doi.org/10.1038/s42256-020-00257-z
Han, J., Kamber, M., & Pei, J. (2012). Data Mining: Concepts and Techniques (3rd ed.). Morgan Kaufmann. https://doi.org/10.1016/c2009-0-61819-5
Khraisat, A., Gondal, I., Vamplew, P., & Kamruzzaman, J. (2019). Survey of Intrusion Detection Systems: Techniques, Datasets and Challenges. Cybersecurity, 2(1), 20. https://doi.org/10.1186/s42400-019-0038-7
Murphy, K. P. (2022). Probabilistic Machine Learning: An Introduction. MIT Press.
Powers, D. M. W. (2011). Evaluation: from Precision, Recall and F-Measure to ROC, Informedness, Markedness & Correlation. Journal of Machine Learning Technologies, 2(1), 37–63.
Sharafaldin, I., Lashkari, A. H., Hakak, S., & Ghorbani, A. A. (2019, October 1-3). Developing Realistic Distributed Denial of Service (DDoS) Attack Dataset and Taxonomy. 2019 International Carnahan Conference on Security Technology, 1–8. Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/ccst.2019.8888419
Shreffler, J., & Huecker, M. R. (2023). Diagnostic Testing Accuracy: Sensitivity, Specificity, Predictive Values and Likelihood Ratios. https://www.ncbi.nlm.nih.gov/books/nbk557491
Downloads
Published
How to Cite
Issue
Section
Categories
License
Copyright (c) 2026 Journal of Computer and Creative Technology

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.





















