SQL injection detection algorithm based on a fusion network of syntax and semantic features
In the age of the Internet of Things (IoT), SQL injection (SQLi) attacks have become a major security risk for IoT devices. Traditional SQLi detection methods primarily rely on manually crafted rules, while deep learning-based approaches often solely focus on the semantic features of SQLi, rendering them ineffective against zero-day attacks or disguised SQLi attacks. This paper proposes a method that integrates both semantic and syntax features to detect SQLi. It employs BERT (Bidirectional Encoder Representations from Transformers) to capture semantic features, employs prompt engineering for syntax feature extraction, and adopts a cross-attention mechanism to weightedly fuse these features. Experimental results demonstrate that this method exhibits remarkable superiority in detecting SQLi attacks, achieving an accuracy and F1-Weighted score of 0.999, far surpassing other benchmark methods and showcasing immense potential for practical applications.
Authors
- Baozhan Chen (ORCID: https://orcid.org/0000-0002-3199-5472)
- Huan Ma (ORCID: https://orcid.org/0000-0002-8823-325X)
- Wan Zhang (ORCID: https://orcid.org/0000-0003-1896-8186)
- Dalong Zhang
Institutions
- Zhengzhou University of Light Industry (CN)
- Zhengzhou University (CN)
- First Affiliated Hospital of Zhengzhou University (CN)
Publication Details
- Published
- 2025-05-19
- DOI
- https://doi.org/10.1117/12.3056913
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00