Machine Learning-based system for detecting and classifying DDoS attacks in IoT networks using Random Forest, SVM, Naive Bayes, XGBoost, AdaBoost, and KNN.
This project implements an end-to-end machine learning pipeline to detect and classify DDoS attacks in IoT network traffic. Multiple classical ML models are trained, evaluated, and compared to understand how preprocessing, feature handling, and model choice impact detection performance in real-world scenarios. The project emphasizes data preprocessing, feature consistency, and reproducible evaluation as part of the ML workflow.
- Implemented and benchmarked multiple ML classifiers for DDoS detection.
- Evaluated models using Accuracy, Precision, Recall, and F1-score.
- Identified Random Forest as the best-performing model based on experimental results.
- Structured the project as a runnable application with a GUI for testing and demonstration.
- Designed repeatable workflows for training, evaluation, and comparison of models.
- Focused on reproducibility and consistency across experiments.
- Performed data preprocessing and feature preparation before model training.
- Validated input consistency and ensured fair comparison across models.
- Used structured result summaries to support model selection decisions.
- Detection and classification of DDoS attacks in IoT-style network traffic.
- Implementation and comparison of multiple ML models:
- Random Forest, Naive Bayes, SVM, XGBoost, AdaBoost, KNN
- Performance evaluation using Accuracy, Precision, Recall, and F1-score.
- GUI-based application (Tkinter) for testing and visualization.
- Confusion matrices and performance graphs for result interpretation.
The following table summarizes the performance of each model on the prepared dataset using standard classification metrics.
| Algorithm | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| Naive Bayes | 40.14% | 47.97% | 45.10% | 37.58% |
| Random Forest | 96.37% | 96.78% | 96.56% | 96.65% |
| SVM | 67.60% | 75.25% | 69.08% | 69.81% |
| XGBoost | 92.97% | 94.19% | 93.80% | 93.73% |
| AdaBoost | 56.23% | 60.31% | 53.51% | 53.99% |
| KNN | 84.89% | 88.18% | 86.04% | 86.01% |
Random Forest achieved the best performance
- Clone the repository:
git clone https://github.com/Deekshitha-Pasagada/DDoS-Detection-using-ML.git cd DDoS-Detection-using-ML - Install Dependencies:
pip install -r requirements.txt
- Run the project:
python src/Main.py
- src/ → Python source code (
Main.py) - docs/ → Documentation
- results/ → Accuracy/Performance comparison table
- requirements.txt → Required Python libraries
- run.bat → Script to run the project
- Add automated scripts for training and evaluation.
- Save model artifacts and evaluation metrics for reproducibility.
- Package the workflow as a CLI or API for easier reuse.
- Extend evaluation to additional datasets or traffic patterns.
- Deekshitha Pasagada
- Kenneth Gadhari
- Rohan Adithya
Guided by: Dr. Thota. Siva Ratna Sai