Deep Learning-Based Vulnerability Detection for Web Application Security: A Dual-Stage Hamiltonian Neural Network Approach for SQLi and XSS Attacks
摘要
The complexity of modern web application security has become a big challenge due to SQL injections and cross-site scripting attacks. Traditional detection techniques, such as payload-based or request-based, result in higher false positives and limited capability to address new threats. This research aims to develop a novel deep learning-inspired framework using a Dual-Stage Hamiltonian Deep Neural Network (DS-HNN) and advanced feature extraction and optimization techniques. Pretrained architectures like VGGNet, UNet, ResNet, and DenseNet are used for feature extraction in high-dimension space. The Dung Beetle Optimization (DBO) algorithm is introduced to improve detection performance with better computational complexity. The DS-HNN model distinguishes vulnerable samples and refines predictions to reduce false positives. Extensive evaluation on SQL-XSS Payload, Testbed, and CSIC 2010 datasets shows high detection accuracy up to 99.89%, outperforming existing methods. The proposed method is efficient, scalable, and can be adapted to secure up-to-date web applications from evolving threats.