Abstract:
A BERT-GAN network model for detecting SQL injection attacks is proposed to solve the problems faced by the mainstream detection methods, such as low detection accuracy and difficult to obtain a large number of real data sets for training. The confrontation samples are synthesized by a Semi-Supervised Learning scheme.The unmarked data is processed using the fine-tuning of BERT-like architectures.Adversarial and real examples as well as detecting malicious and benign samples are distinguished by generating confrontation settings. The experimental results demonstrate that the accuracy, precision, recall and F1 score of the proposed model have been enhanced to a certain degree on openly managed and standardized datasets such as sqli, sqliv2 and self-built sqli-extend datasets. These improvements are observed in comparison to SQL injection detection methods based on CNN, LSTM, BERT-Base, and GAN-Base models. Furthermore, the faster convergence rate of the target loss function indicates that the proposed model exhibits high efficiency.