Skip to main content

A Deep Learning Based Natural Language Processing Approach for Detecting SQL Injection Attack

  • Conference paper
  • First Online:
Intelligent Systems Design and Applications (ISDA 2022)

Part of the book series: Lecture Notes in Networks and Systems ((LNNS,volume 715))

  • 244 Accesses

Abstract

A drastic increase in cyber-attacks affects internet reliability in different fields. The website Structured Query Language (SQL) Injection is still a loophole that attackers frequently use. Four algorithms have been implemented and tested in this study: Logistic Regression, Naive Bayes, Random Forest and Convolutional Neural Network (CNN). Natural Language Processing (NLP) is also applied to increase the text processing's detection accuracy. The study is made using two datasets for preparing the model. The data for the model that is used for training are contained in the first dataset. The validation records used to test and evaluate the model are contained in the second dataset. The primary dataset is turned into a corpus to help the model comprehend the input more quickly and easily. Based on the performance of the models, CNN has given the highest level of accuracy. The response time of the output is less, and the validation accuracy is 99.29%. Compared to machine learning methods, the Deep Learning (DL) algorithm performed far better. The accuracy of Machine Learning (ML) approaches is 0.942857 for Logistic Regression, 0.978576 for Naive Bayes, and 0.902380 for Random Forest.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 189.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 249.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Marchand-Melsom, A., Mai, D.B.N.: Automatic repair of OWASP Top 10 security vulnerabilities: a survey. In: Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops, pp. 23–30 (2020)

    Google Scholar 

  2. Akbar, M., M.A.F.Ridha: SQL injection and cross site scripting prevention using OWASP ModSecurity web application firewall. JOIV: Int. J. Inform. Visual. 2(4), 286–292 (2018)

    Google Scholar 

  3. Akhgar, B., Staniforth, A., Bosco, F. (eds.): Syngress, Oxford (2014)

    Google Scholar 

  4. Dhingra, M., Jain, M., Jadon, R.S.: Role of artificial intelligence in enterprise information security: a review. In: 2016 Fourth International Conference on Parallel, Distributed and Grid Computing (PDGC), pp. 188–191. IEEE (2016)

    Google Scholar 

  5. Anandha Krishnan, S.S., Sabu, A.N., Sajan, P.P., Sreedeep, A.L.: SQL injection detection using machine learning. Revista Geintec-Gestao Inovacao e Tecnologias 11(3), 300–310 (2021)

    Article  Google Scholar 

  6. Kavitha, M.N., Vennila, V., Padmapriya, G., Rajiv Kannan, A.: Prevention of SQL injection attack using unsupervised machine learning approach. Int. J. Aquatic Sci. 12 (2021). ISSN 2008-8019

    Google Scholar 

  7. Xuan, N.Y., Juremi, J., Saad, N.H.M.: Securing e-commerce against SQL injection, cross site scripting and broken authentication. J. Appl. Technol. Innov. 5(2), 73 (2021). (e-ISSN 2600-7304)

    Google Scholar 

  8. Cherry, D.: Securing SQL Server: Protecting Your Database from Attackers. Syngress, Oxford (2015)

    Google Scholar 

  9. Ahmad, K., Karim, M.: A method to prevent SQL injection attack using an improved parameterized stored procedure. Int. J. Adv. Comput. Sci. Appl. 12(6) (2021)

    Google Scholar 

  10. Joshi, A., Geetha, V.: SQL injection detection using machine learning. In: 2014 International Conference on Control, Instrumentation, Communication and Computational Technologies (ICCICCT), pp. 1111–1115. IEEE (2014)

    Google Scholar 

  11. Deriba, F., Salau, A.O., Mohammed, S.H., Kassa, T.M., Demilie, W.B.: Development of a compressive framework using machine learning approaches for SQL injection attacks. PRZEGLĄD ELEKTROTECHNICZNY 1(7), 183–189 (2022)

    Google Scholar 

  12. Falor, A., Hirani, M., Vedant, H., Mehta, P., Krishnan, D.: A deep learning approach for detection of SQL injection attacks using convolutional neural networks. In: Gupta, D., Polkowski, Z., Khanna, A., Bhattacharyya, S., Castillo, O. (eds.) Proceedings of Data Analytics and Management, vol. 91, pp. 293–304. Springer, Singapore (2022). https://doi.org/10.1007/978-981-16-6285-0_24

    Chapter  Google Scholar 

  13. Hashem, I., Islam, M., Haque, S.M., Jabed, Z.I., Sakib, N.: A proposed technique for simultaneously detecting DDoS and SQL injection attacks. Int. J. Comput. Appl. 975, 8887 (2021)

    Google Scholar 

  14. Kranthikumar, B., Leela Velusamy, R.: SQL injection detection using REGEX classifier. J. Xi’an Univ. Archit. Technol. 12(6), 800–809 (2020)

    Google Scholar 

  15. Jemal, I., Cheikhrouhou, O., Hamam, H., Mahfoudhi, A.: SQL injection attack detection and prevention techniques using machine learning. Int. J. Appl. Eng. Res. 15(6), 569–580 (2020)

    Google Scholar 

  16. Roy, P., Kumar, R., Rani, P.: SQL injection attack detection by machine learning classifier. In: 2022 International Conference on Applied Artificial Intelligence and Computing (ICAAIC), pp. 394–400. IEEE (2022)

    Google Scholar 

  17. Wadhwa, G., Kaur, A.: Various image modalities used in computer-aided diagnosis system for detection of breast cancer using machine learning techniques: a systematic review. In: Reddy, V.S., Prasad, V.K., Wang, J., Reddy, K.T.V. (eds.) Soft Computing and Signal Processing. Advances in Intelligent Systems and Computing, vol. 1340, pp. 281–292. Springer, Singapore (2022). https://doi.org/10.1007/978-981-16-1249-7_27

    Chapter  Google Scholar 

  18. Kim, B., Yuvaraj, N., Sri Preethaa, K.R., Arun Pandian, R.: Surface crack detection using deep learning with shallow Convolutional Neural Network architecture for enhanced computation. Neural Comput. Appl. 33(15), 9289–9305 (2021)

    Article  Google Scholar 

  19. Wadhwa, G., Mathur, M.: A convolutional neural network approach for the diagnosis of breast cancer. In: 2020 Sixth International Conference on Parallel, Distributed and Grid Computing (PDGC), pp. 357–361. IEEE (2020)

    Google Scholar 

  20. Shah, S.S.H.: SQL injection dataset In: Kaggle Dataset

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gitanjali Wadhwa .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Natarajan, Y., Karthikeyan, B., Wadhwa, G., Srinivasan, S.A., Akilesh, A.S.P. (2023). A Deep Learning Based Natural Language Processing Approach for Detecting SQL Injection Attack. In: Abraham, A., Pllana, S., Casalino, G., Ma, K., Bajaj, A. (eds) Intelligent Systems Design and Applications. ISDA 2022. Lecture Notes in Networks and Systems, vol 715. Springer, Cham. https://doi.org/10.1007/978-3-031-35507-3_38

Download citation

Publish with us

Policies and ethics