Submitted:
10 July 2023
Posted:
11 July 2023
You are already at the latest version
Abstract
Keywords:
1. Introduction
- Proposing an SQLIAs detection architecture based on a recurrent neural network (RNN) autoencoder algorithm.
- A comparison between the proposed method and different machine learning techniques used for detecting and preventing of SQLIAs.
2. Literature Review
3. Materials and Methods
3.1. Data Preparation
3.1.1. Data Preprocessing
3.1.2. Balancing and Sampling
3.2. Model Training
3.3. Model evaluation
4. Results and Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| SQLIA | SQL injection attacks |
| RNN-ED | RNN-based Encoder-Decoder |
| IDSs | Intrusion detection systems |
| ML | Machine learning |
| DL | Deep learning |
| NB | Naive Bayes classifier |
| DT | Decision Tree |
| LR | Logistic Regression |
| RF | Random Forests |
| SVM | Support Vector Machines |
| CNN | Convolutional Neural Network |
| ANN | Artificial Neural Networks |
| MLP | Multi-layer Perceptron |
| RNN | Recurrent Neural Networks |
| LSTM | Long short-term memory |
References
- H.R., Y.W.; Kottegoda, H.; Andaraweera, D.; Palihena, P. A comprehensive review of methods for SQL injection attack detection and prevention 2022.
- Chen, D.; Yan, Q.; Wu, C.; Zhao, J. SQL Injection Attack Detection and Prevention Techniques Using Deep Learning. Journal of Physics: Conference Series 2021, 1757. [Google Scholar] [CrossRef]
- Yu, W.; Kim, I.Y.; Mechefske, C. Analysis of different RNN autoencoder variants for time series classification and machine prognostics. Mechanical Systems and Signal Processing 2021, 149, 107322. [Google Scholar] [CrossRef]
- Do, J.S.; Kareem, A.B.; Hur, J.W. LSTM-Autoencoder for Vibration Anomaly Detection in Vertical Carousel Storage and Retrieval System (VCSRS). Sensors 2023, 23, 1009. [Google Scholar] [CrossRef] [PubMed]
- Ketema, A. DEVELOPING SQL INJECTION PREVENTION MODEL USING DEEP LEARNING TECHNIQUE. PhD thesis, St. Mary’s University, 2022.
- Roy, P.; Kumar, R.; Rani, P. SQL Injection Attack Detection by Machine Learning Classifier. 2022 International Conference on Applied Artificial Intelligence and Computing (ICAAIC). IEEE, 2022, pp. 394–400.
- Krishnan, S.A.; Sabu, A.N.; Sajan, P.P.; Sreedeep, A. SQL Injection Detection Using Machine Learning. REVISTA GEINTEC-GESTAO INOVACAO E TECNOLOGIAS 2021, 11, 300–310. [Google Scholar]
- Rahul, S.; Vajrala, C.; Thangaraju, B. A Novel Method of Honeypot Inclusive WAF to Protect from SQL Injection and XSS. 2021 International Conference on Disruptive Technologies for Multi-Disciplinary Research and Applications (CENTCON). IEEE, 2021, Vol. 1, pp. 135–140.
- Zhang, W.; Li, Y.; Li, X.; Shao, M.; Mi, Y.; Zhang, H.; Zhi, G. Deep Neural Network-Based SQL Injection Detection Method. Security and Communication Networks 2022, 2022. [Google Scholar] [CrossRef]
- Liu, M.; Li, K.; Chen, T. DeepSQLi: Deep semantic learning for testing SQL injection. Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, 2020, pp. 286–297.
- Chen, D.; Yan, Q.; Wu, C.; Zhao, J. Sql injection attack detection and prevention techniques using deep learning. Journal of Physics: Conference Series. IOP Publishing, 2021, Vol. 1757, p. 012055.
- Shah, S.S.H. SQL Injection Dataset, 2021.
- Chindove, H.; Brown, D. Adaptive Machine Learning Based Network Intrusion Detection. Proceedings of the International Conference on Artificial Intelligence and its Applications, 2021, pp. 1–6.
- Mwaruwa, M.C. Long Short Term Memory Based Detection Of Web Based Sql Injection Attacks. PhD thesis, UoN, 2019.
- Ahmad, M.S.; Shah, S.M. Supervised machine learning approaches for attack detection in the IoT network. In Internet of Things and Its Applications; Springer, 2022; pp. 247–260.
- Said Elsayed, M.; Le-Khac, N.A.; Dev, S.; Jurcut, A.D. Network anomaly detection using LSTM based autoencoder. Proceedings of the 16th ACM Symposium on QoS and Security for Wireless and Mobile Networks, 2020, pp. 37–45.
- Afaq, S.; Rao, S. Significance of epochs on training a neural network. Int. J. Sci. Technol. Res 2020, 9, 485–488. [Google Scholar]








| Performance metrics | Result |
|---|---|
| Accuracy | 94% |
| Precision | 95% |
| Recall | 90% |
| F1-Score1 | 92% |
| Hyperparameters | Value |
|---|---|
| Number of Hidden layers | 3 |
| Hidden layer size (neurons) | 64 units |
| Optimizer | Adam |
| Loss function | binary cross-entropy |
| Activation function | ReLU and sigmoid |
| Number of epochs | 50 |
| Batch size | 128 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 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 (http://creativecommons.org/licenses/by/4.0/).