This study proposes a hybrid deep learning approach that combines Gated Recurrent Units (GRUs) and Convolutional Neural Networks (CNNs) for Distributed Denial of Service (DDoS) cyberattack detection. The model, called DBSCAN–GRU–CNN, uses density-based clustering (DBSCAN) to select relevant features and reduce execution time. The dataset for this study was obtained from live penetration testing, where a series of simulated attacks was performed on a monitored network. To evaluate the performance of the proposed model, several comparison models were used, including DBSCAN–GRU–CNN (Single Hidden Layer), DBSCAN–GRU–CNN (Double Hidden Layers), DBSCAN–GRU–CNN (With Regularization), DBSCAN–GRU–CNN–PSO, GRU–CNN, GRU–CNN (With Hyperparameter Tuning), and Random Forest (Tuned Model). Variations of the model tested were made by adding hidden layers, regularization, optimization with Particle Swarm Optimization (PSO), and hyperparameter tuning. Experimental results show that the DBSCAN–GRU–CNN–PSO model provided optimal performance with a 99.3% accuracy, a 99% precision, a 98.9% recall, and a 99% F1-score, while the model with hyperparameter tuning achieved a 99% accuracy. By adding PSO, the model achieved optimized weights, better generalization, and excellent accuracy in DDoS detection.
Copyrights © 2025