Preprint / Version 1

Detecting Distributed Denial Of Service Attacks (DDoS) Using Machine Learning Models

##article.authors##

  • Isha Singhal

Keywords:

Distributed Denial Of Service, Machine Learning Models

Abstract

The digital landscape of today’s world is vulnerable to the widespread threat of Distributed Denial of Service (DDoS) attacks. These attacks have the potential to seriously damage businesses’ finances and reputations by interfering with the availability of internet services. Traditional methods of DDoS mitigation, such as rule-based approaches, struggle to keep up with the evolving nature of attacks. In this paper, I have trained and tested several supervised machine learning algorithms for the identification of DDoS attacks to determine the most effective one. I explore the depths of DDoS, obtaining and adjusting a dataset-utilizing principal component analysis (PCA) to reduce the number of features in the model from 80 to 20 while preserving 90% variance in our dataset. By reducing unnecessary features, PCA allowed us to have higher model accuracy and training speed. Overall, the Random Forest model trained with PCA had the best results, obtaining 99.9% accuracy, precision, and recall. The proposed approach exhibits encouraging results, demonstrating its potential to improve DDoS attack detection and thus reinforce network security.

References or Bibliography

[All22] Stephen Allwright. Using cross val score in sklearn, simply explained.

https://stephenallwright.com/cross_val_score-sklearn/,

[Bro20] Jason Brownlee. Train-test split for evaluating machine learn-

ing algorithms. https://machinelearningmastery.com/

train-test-split-for-evaluating-machine-learning-algorithms,

[Bro21] Jason Brownlee. Random oversampling and undersampling for

imbalanced classification. https://machinelearningmastery.com/

random-oversampling-and-undersampling-for-imbalanced-classification/,

[Cho23] Jean-Christopher Chouinard. How to use classification re-

port in scikit-learn (python). https://www.jcchouinard.com/

classification-report-in-scikit-learn/, 2023.

[Chu23] Aakarsha Chugh. Label encoding in

python. https://www.geeksforgeeks.org/

ml-label-encoding-of-datasets-in-python/, 2023.

[Clo23a] Saturn Cloud. How to improve your model’s performance

with sklearn roc auc score. https://saturncloud.io/blog/

how-to-improve-your-models-performance-with-sklearn-rocaucscore,

[Clo23b] Cloudflare. What is a distributed denial-of-service (ddos)

attack? https://www.cloudflare.com/learning/ddos/

what-is-a-ddos-attack/, 2023.

[Clo23c] Cloudflare. What is an application layer ddos attack? https://www.

netscout.com/what-is-ddos/application-layer-attacks, 2023.

[Doc23] Hasty.Ai Documentation. Accuracy. https://hasty.ai/docs/

mp-wiki/metrics/accuracy, 2023.

[Goo23a] Google. Classification: Roc curve and auc — machine learn-

ing — google for developers. https://developers.google.

com/machine-learning/crash-course/classification/

roc-and-auc#:~:text=An%20ROC%20curve%20, 2023.

[Goo23b] Google. Classification: Roc curve and auc — machine learning

— google for developers. https://developers.google.com/

machine-learning/crash-course/classification/roc-and-auc,

[Hui23] Purva Huilgol. Precision and recall: Essential metrics for machine

learning (2023 update). https://www.analyticsvidhya.com/blog/

/09/precision-recall-machine-learning, 2023.

[Imp23] Imperva. Ddos attack types & mitigation methods: Imperva. https:

//www.imperva.com/learn/ddos/ddos-attacks, 2023.

[Kha21a] Aman Kharwal. Classification report in machine learning:

Aman kharwal. https://thecleverprogrammer.com/2021/07/07/

classification-report-in-machine-learning, 2021.

[Kha21b] Aman Kharwal. Standardscaler in machine learning: Aman

kharwal. https://thecleverprogrammer.com/2020/09/22/

standardscaler-in-machine-learning, 2021.

[Man20] Sanchita Mangale. Scree plot. https://sanchitamangale12.

medium.com/scree-plot-733ed72c8608, 2020.

[Mik19] Bartosz Mikulski. Pca-how to choose the number of

components? https://www.mikulskibartosz.name/

pca-how-to-choose-the-number-of-components, 2019.

[Naj23] et al Najafimehr, Mohammad. Ddos attacks and machine-learning-

based detection methods: A survey and taxonomy. https://

onlinelibrary.wiley.com/doi/full/10.1002/eng2.12697, 2023.

[Nar21] Sarang Narkhede. Understanding confusion

matrix. https://towardsdatascience.com/

understanding-confusion-matrix-a9ad42dcfd62, 2021.

[Net23] Palo Alto Networks. What is a denial of service at-

tack (dos)? https://www.paloaltonetworks.com/cyberpedia/

what-is-a-denial-of-service-attack-dos, 2023.

[One23] OneLogin. What is a ddos attack: Types, prevention & remediation.

https://www.onelogin.com/learn/ddos-attack, 2023.

[Pan22] Pankaj. Numpy.cumsum() in python. https://www.digitalocean.

com/community/tutorials/numpy-cumsum-in-python, 2022.

[Sch23] Frank Schoonjans. Roc curve analysis. https://www.medcalc.org/

manual/roc-curves.php, 2023.

[SK23a] Paula Villasante Soriano and Cansu Kebabci. Principal com-

ponent analysis (pca) in python: Sklearn example. https://

statisticsglobe.com/principal-component-analysis-python,

[SK23b] Paula Villasante Soriano and Cansu Kebabci. Scree plot for

pca explained: Tutorial, example & how to interpret. https:

//statisticsglobe.com/scree-plot-pca, 2023.

[Ste20] Doug Steen. Precision-recall curves. https://medium.com/

@douglaspsteen/precision-recall-curves-d32e5b290248, 2020.

[Tal23] Md Alamin Talukder. Cic-ddos2019 dataset. https://data.

mendeley.com/datasets/ssnc74xm6r/1, 2023.

[Zen23] Zenarmor. Dos and ddos attacks. what are their differences?

https://www.zenarmor.com/docs/network-security-tutorials/

dos-vs-ddos-attacks, 2023.

Downloads

Posted

10-25-2023