Abstract
NoSQL databases were created for the purpose of manipulating large amounts of data in real time. However, at the beginning, security was not important for their developers. The popularity of SQL generated the false belief that NoSQL databases were immune to injection attacks. As a consequence, NoSQL databases were not protected and are vulnerable to injection attacks. In addition, databases with NoSQL queries are not available for experimentation. Therefore, this paper presents a new method for the construction of a NoSQL query database, based on JSON structure. Six classification algorithms were evaluated to identify the injection attacks: SVM, Decision Tree, Random Forest, K-NN, Neural Network and Multilayer Perceptron, obtaining an accuracy with the last two algorithms of 97.6%.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Eassa, A., El-Bakry, H., Al-Tarawneh, O., Salama, A.: NoSQL racket: a testing tool for detecting NoSQL injection attacks in web applications. Int. J. Adv. Comput. Sci. Appl. 8, 614–622 (2017). ResearchGate, Fuzhou, China
Ma, H., Wu, T., Chen, M., Yan, R., Pan, J.: A parse tree-based NoSQL injection attacks detection mechanism. J. Inf. Hiding Multimed. Signal Process. 8, 916–928 (2017). ResearchGate, Fuzhou, China
APISecurity. https://apisecurity.io/issue-15-fortnite-hack-tls-mitm-attacks-sql-injections-for-nosql/. Accessed 24 Jan 2019
Islam, R., Islam, S., Ahmed, Z., lqbal, A., Shahriyar, R.: Automatic detection of NoSQL injection using supervised learning. In: 43rd Annual Computer Software and Applications Conference (COMPSAC), pp. 760 – 769. IEEE, Milwaukee, USA (2019)
Eassa, A., Elhoseny, M., El-Bakry, H., et al.: NoSQL injection attack detection in web applications using RESTful service. Programm. Comput. Softw. 44, 435–444 (2018). Springer, Cairo, Egypt
Hasan, M., Balbahaith, Z., Tarique, M.: Detection of SQL injection attacks: a machine learning approach. In: International Conference on Electrical and Computing Technologies and Applications (ICECTA), pp. 1–6. IEEE, Ras Al Khaimah, United Arab Emirates (2019)
Ron, A., Bronshtein, E., Shulman-Peleg, A.: No SQL, no injection? Exam. NoSQL Secur. J. 1, 1–4 (2015). ResearchGate
Websecurify. https://blog.websecurify.com/2014/08/hacking-nodejs-and-mongodb.html. Accessed 14 Aug 2020
InfoQ. https://www.infoq.com/articles/nosql-injections-analysis/. Accessed 18 June 2017
Researchgate. https://www.researchgate.net/publication/350671150_NoSQL_dataset
Regexper. https://regexper.com/. Accessed 08 Oct 2020
WEKA. https://www.cs.waikato.ac.nz/ml/weka/. Accessed 25 Nov 2020
Zhang, K.: A machine learning based approach to identify SQL injection vulnerabilities. In: 34th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 1286–1288. IEEE, San Diego, CA, USA (2019)
Ross, K., Moh, M., & Moh, T.: Multi-Source Data Analysis and Evaluation of Machine Learning Techniques for SQL Injection Detection. In: Proceedings of the ACMSE 2018 Conference (ACMSE ‘18), pp. 1–8. ACM, New York, NY, USA (2018)
Singh, G., Kant, D., Gangwar, U., Singh, U., Pratap, A.: SQL Injection detection and correction using machine learning techniques. In: Satapathy, S., Govardhan, A., Raju, K., Mandal, J. (eds.) Emerging ICT for Bridging the Future - Proceedings of the 49th Annual Convention of the Computer Society of India (CSI). Advances in Intelligent Systems and Computing, vol. 337, pp. 435–442. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-13728-5_49
Tripathy, D., Gohil, R., Halabi, T.: Detecting SQL injection attacks in cloud SaaS using machine learning. In: 2020 IEEE 6th International Conference on Big Data Security on Cloud (BigDataSecurity), IEEE International Conference on High Performance and Smart Computing, (HPSC) & IEEE Intl Conference on Intelligent Data and Security (IDS), pp. 145–150. IEEE, Baltimore, MD, EE. UU (2020)
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Mejia-Cabrera, H.I., Paico-Chileno, D., Valdera-Contreras, J.H., Tuesta-Monteza, V.A., Forero, M.G. (2021). Automatic Detection of Injection Attacks by Machine Learning in NoSQL Databases. In: Roman-Rangel, E., Kuri-Morales, Á.F., Martínez-Trinidad, J.F., Carrasco-Ochoa, J.A., Olvera-López, J.A. (eds) Pattern Recognition. MCPR 2021. Lecture Notes in Computer Science(), vol 12725. Springer, Cham. https://doi.org/10.1007/978-3-030-77004-4_3
Download citation
DOI: https://doi.org/10.1007/978-3-030-77004-4_3
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-77003-7
Online ISBN: 978-3-030-77004-4
eBook Packages: Computer ScienceComputer Science (R0)