Content area

Abstract

This paper presents a novel neural network model for the detection of Structured Query Language (SQL) injection attacks for web applications. The model features high detection accuracy, fast inference speed, and low weight size. The model is based on a novel Natural Language Processing (NLP) technique, where a tokenizer for converting SQL queries into tokens is adopted as a pre-processing stage for detection. Only SQL keywords and symbols are considered as tokens for removing noisy information from input queries. Moreover, semantic labels are assigned to tokens for highlighting malicious intentions. For the exploration of correlation among the tokens, a lightweight multi-head self-attention scheme with a position encoder is employed. Experimental results show that the proposed algorithm has high detection performance for SQL injection. In addition, compared to its lightweight NLP counterparts based on self-attention, the proposed algorithm has the lowest weight size and highest inference speed. It consumes only limited computation and storage overhead for web services. In addition, it can even be deployed in the edge devices with low computation capacity for online detection. The proposed algorithm therefore is an effective low-cost solution for SQL injection detection.

Details

1009240
Business indexing term
Title
SQL Injection Detection Based on Lightweight Multi-Head Self-Attention
Author
Rui-Teng Lo 1 ; Hwang, Wen-Jyi 1   VIAFID ORCID Logo  ; Tsung-Ming Tai 2 

 Department of Computer Science and Information Engineering, National Taiwan Normal University, Taipei 116, Taiwan; [email protected] 
 NVIDIA AI Technology Center, NVIDIA Taiwan, Taipei 114, Taiwan; [email protected] 
Publication title
Volume
15
Issue
2
First page
571
Publication year
2025
Publication date
2025
Publisher
MDPI AG
Place of publication
Basel
Country of publication
Switzerland
Publication subject
e-ISSN
20763417
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Online publication date
2025-01-09
Milestone dates
2024-11-14 (Received); 2025-01-06 (Accepted)
Publication history
 
 
   First posting date
09 Jan 2025
ProQuest document ID
3159291198
Document URL
https://www.proquest.com/scholarly-journals/sql-injection-detection-based-on-lightweight/docview/3159291198/se-2?accountid=208611
Copyright
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Last updated
2025-01-24
Database
ProQuest One Academic