{% extends "base.html" %} {% block content %}

# DDoS Attack Prediction

## What is this Project?

This project detects **Distributed Denial of Service (DDoS) Attacks** in network traffic using Machine Learning. It analyzes input features such as protocol type, packet size, flow duration, and other network parameters to classify whether the traffic is normal or under attack.

## Problem Statement

DDoS attacks overwhelm a system by flooding it with traffic, disrupting services. Traditional security measures struggle to detect **sophisticated attack patterns**. This project aims to provide an **automated, ML-based** approach to identifying such attacks.

## Input Fields Information

Feature Name | Description
--- | ---
Protocol | Indicates network protocol type (e.g., TCP, UDP)
Flow Duration | Total time of network flow
Total Fwd Packets | Number of packets sent forward
Total Backward Packets | Number of packets sent backward
Flow Bytes/s | Rate of bytes per second

## Algorithm Information

#### XGBoost Classifier

We use **XGBoost**, a high-performance, optimized gradient boosting algorithm that efficiently classifies network traffic patterns.

#### Min-Max Scaling

The input features are normalized using **Min-Max Scaling** to improve model accuracy.

## Output Information

Predicted Class | Description
--- | ---
Benign | Normal network traffic
DrDoS_DNS | DNS-based DDoS attack detected
DrDoS_UDP | UDP-based DDoS attack detected
WebDDoS | Web-based DDoS attack detected

## Project Flow

##

The dataset is collected from network traffic logs, containing both benign and attack samples.

##

The data is cleaned, missing values are handled, and features are scaled using Min-Max Scaler.

##

The XGBoost model is trained on preprocessed data and evaluated for accuracy.

##

The user inputs network parameters, and the model predicts the type of network traffic.

## Project Implementation

#### 1. Flask Backend

The Flask framework is used to create a web-based interface for the model.

#### 2. Model Deployment

The trained XGBoost model is integrated into the Flask app for predictions.

#### 3. UI Design

Bootstrap is used for a responsive and user-friendly interface.

Try Prediction
{% endblock %}