Deep Learning-Based Detection Technology for SQL Injection Research and Implementation

Amid the incessant evolution of the Internet, an array of cybersecurity threats has surged at an unprecedented rate. A notable antagonist within this plethora of attacks is the SQL injection assault, a prevalent form of Internet attack that poses a significant threat to web applications. These attac...

Full description

Bibliographic Details
Main Authors: Hao Sun, Yuejin Du, Qi Li
Format: Article
Language:English
Published: MDPI AG 2023-08-01
Series:Applied Sciences
Subjects:
Online Access:https://www.mdpi.com/2076-3417/13/16/9466
_version_ 1797585646233059328
author Hao Sun
Yuejin Du
Qi Li
author_facet Hao Sun
Yuejin Du
Qi Li
author_sort Hao Sun
collection DOAJ
description Amid the incessant evolution of the Internet, an array of cybersecurity threats has surged at an unprecedented rate. A notable antagonist within this plethora of attacks is the SQL injection assault, a prevalent form of Internet attack that poses a significant threat to web applications. These attacks are characterized by their extensive variety, rapid mutation, covert nature, and the substantial damage they can inflict. Existing SQL injection detection methods, such as static and dynamic detection and command randomization, are principally rule-based and suffer from low accuracy, high false positive (FP) rates, and false negative (FN) rates. Contemporary machine learning research on SQL injection attack (SQLIA) detection primarily focuses on feature extraction. The effectiveness of detection is heavily reliant on the precision of feature extraction, leading to a deficiency in tackling more intricate SQLIA. To address these challenges, we propose a novel SQLIA detection approach harnessing the power of an enhanced TextCNN and LSTM. This method begins by vectorizing the samples in the corpus and then leverages an improved TextCNN to extract local features. It then employs a Bidirectional LSTM (Bi-LSTM) network to decipher the sequence information inherent in the samples. Given LSTM’s modest effectiveness for relatively long sequences, we further integrate an attention mechanism, reducing the distance between any two words in the sequence to one, thereby enhancing the model’s effectiveness. Moreover, pre-trained word vector features acquired via BERT for transfer learning are incorporated into the feature section. Comparative experimental results affirm the superiority of our deep learning-based SQLIA detection approach, as it effectively elevates the SQLIA recognition rate while reducing both FP and FN rates.
first_indexed 2024-03-11T00:09:05Z
format Article
id doaj.art-e8418a8ec2fc40c79baf57c644a86e06
institution Directory Open Access Journal
issn 2076-3417
language English
last_indexed 2024-03-11T00:09:05Z
publishDate 2023-08-01
publisher MDPI AG
record_format Article
series Applied Sciences
spelling doaj.art-e8418a8ec2fc40c79baf57c644a86e062023-11-19T00:10:11ZengMDPI AGApplied Sciences2076-34172023-08-011316946610.3390/app13169466Deep Learning-Based Detection Technology for SQL Injection Research and ImplementationHao Sun0Yuejin Du1Qi Li2Academy of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, ChinaBeijing Qihoo Technology Co., Ltd., Beijing 100015, ChinaAcademy of Cyberspace Security, Beijing University of Posts and Telecommunications, Beijing 100876, ChinaAmid the incessant evolution of the Internet, an array of cybersecurity threats has surged at an unprecedented rate. A notable antagonist within this plethora of attacks is the SQL injection assault, a prevalent form of Internet attack that poses a significant threat to web applications. These attacks are characterized by their extensive variety, rapid mutation, covert nature, and the substantial damage they can inflict. Existing SQL injection detection methods, such as static and dynamic detection and command randomization, are principally rule-based and suffer from low accuracy, high false positive (FP) rates, and false negative (FN) rates. Contemporary machine learning research on SQL injection attack (SQLIA) detection primarily focuses on feature extraction. The effectiveness of detection is heavily reliant on the precision of feature extraction, leading to a deficiency in tackling more intricate SQLIA. To address these challenges, we propose a novel SQLIA detection approach harnessing the power of an enhanced TextCNN and LSTM. This method begins by vectorizing the samples in the corpus and then leverages an improved TextCNN to extract local features. It then employs a Bidirectional LSTM (Bi-LSTM) network to decipher the sequence information inherent in the samples. Given LSTM’s modest effectiveness for relatively long sequences, we further integrate an attention mechanism, reducing the distance between any two words in the sequence to one, thereby enhancing the model’s effectiveness. Moreover, pre-trained word vector features acquired via BERT for transfer learning are incorporated into the feature section. Comparative experimental results affirm the superiority of our deep learning-based SQLIA detection approach, as it effectively elevates the SQLIA recognition rate while reducing both FP and FN rates.https://www.mdpi.com/2076-3417/13/16/9466deep learningSQL injection detectionTextCNNLSTM
spellingShingle Hao Sun
Yuejin Du
Qi Li
Deep Learning-Based Detection Technology for SQL Injection Research and Implementation
Applied Sciences
deep learning
SQL injection detection
TextCNN
LSTM
title Deep Learning-Based Detection Technology for SQL Injection Research and Implementation
title_full Deep Learning-Based Detection Technology for SQL Injection Research and Implementation
title_fullStr Deep Learning-Based Detection Technology for SQL Injection Research and Implementation
title_full_unstemmed Deep Learning-Based Detection Technology for SQL Injection Research and Implementation
title_short Deep Learning-Based Detection Technology for SQL Injection Research and Implementation
title_sort deep learning based detection technology for sql injection research and implementation
topic deep learning
SQL injection detection
TextCNN
LSTM
url https://www.mdpi.com/2076-3417/13/16/9466
work_keys_str_mv AT haosun deeplearningbaseddetectiontechnologyforsqlinjectionresearchandimplementation
AT yuejindu deeplearningbaseddetectiontechnologyforsqlinjectionresearchandimplementation
AT qili deeplearningbaseddetectiontechnologyforsqlinjectionresearchandimplementation