  A malicious attempt to exhaust a victim's resources to cause it to crash or
halt its services is known as a distributed denial-of-service (DDoS) attack.
DDOS attacks stop authorized users from accessing specific services available
on the Internet. It targets varying components of a network layer and it is
better to stop into layer 4 (transport layer) of the network before approaching
a higher layer. This study uses several machine learning and statistical models
to detect DDoS attacks from traces of traffic flow and suggests a method to
prevent DDOS attacks. For this purpose, we used logistic regression, CNN,
XGBoost, naive Bayes, AdaBoostClassifier, KNN, and random forest ML algorithms.
In addition, data preprocessing was performed using three methods to identify
the most relevant features. This paper explores the issue of improving the DDOS
attack detection accuracy using the latest dataset named CICDDoS2019, which has
over 50 million records. Because we employed an extensive dataset for this
investigation, our findings are trustworthy and practical. Our target class
(attack class) was imbalanced. Therefore, we used two techniques to deal with
imbalanced data in machine learning. The XGboost machine learning model
provided the best detection accuracy of (99.9999%) after applying the SMOTE
approach to the target class, outperforming recently developed DDoS detection
systems. To the best of our knowledge, no other research has worked on the most
recent dataset with over 50 million records, addresses the statistical
technique to select the most significant feature, has this high accuracy, and
suggests ways to avoid DDOS attackI.
