Web servers provide websites, web applications, APIs, and other online services by processing HTTP requests received from clients. These requests generate network traffic with measurable characteristics, including flow duration, packet counts, byte counts, packet lengths, and traffic rates. Analyzing these characteristics can help security teams investigate abnormal network activity and identify potential Distributed Denial-of-Service (DDoS) attacks.
DDoS attacks attempt to disrupt service availability by generating excessive traffic from multiple sources or distributed systems. Such activity may consume network bandwidth, connection capacity, CPU resources, or other server resources, potentially affecting legitimate users. Identifying suspicious traffic is an important part of DDoS investigation, but a classification result alone does not explain why a particular traffic observation was considered malicious.
Traditional detection approaches may use fixed thresholds, predefined signatures, or known attack patterns. Machine-learning classifiers can analyze multiple traffic characteristics to distinguish normal traffic from DDoS-related activity. However, complex classification models may provide limited information about which features influenced a particular prediction.
Explainable Artificial Intelligence (XAI) addresses this limitation by providing explanations for machine-learning predictions. In this use case, HistGradientBoostingClassifier is used to classify network traffic, while SHAP (SHapley Additive exPlanations) is used to explain the features influencing the model's predictions.
An Apache HTTP Server is deployed on Ubuntu within an isolated laboratory environment. Kali Linux is used as the controlled security-testing system, and VirtualBox provides the virtualized environment for the application and testing systems.
A public DDoS traffic dataset is used as the existing data source for machine-learning development. Normal and DDoS-related traffic records are selected and processed to extract the features required for model training. The dataset is obtained from an existing public source rather than manually created for this project.
The HistGradientBoostingClassifier model is trained using the selected labelled traffic records. After model evaluation, SHAP is applied to explain the classification results by identifying features that contribute to individual predictions and by summarizing influential features across the evaluated traffic population.
During practical validation, legitimate and controlled test traffic associated with the Apache web server is captured and analyzed. The trained classifier evaluates compatible traffic features, and SHAP explanations are generated to support the investigation of selected predictions. The resulting explanations are reviewed against the known laboratory test scenario to assess their usefulness and limitations.
The primary objective is to build a practical DDoS investigation workflow that combines traffic classification with interpretable model explanations. The project focuses on explaining detection decisions rather than automatically blocking traffic.
The complete explainable investigation workflow is:
Public DDoS Traffic Dataset → Data Preprocessing → Traffic Feature Extraction → HistGradientBoosting Training → Model Evaluation → Apache HTTP Server on Ubuntu → Network Traffic Capture → Feature Extraction → Traffic Classification → SHAP Explanation → Influential Feature Identification → Investigation Report → Controlled Laboratory Validation