ARTIFICIAL INTELLIGENCE–BASED PROTECTION METHODS AGAINST SQL INJECTION IN RELATIONAL DATABASES
{$ Etel}:
SQL Injection, Relational Databases, PostgreSQL, Oracle, Machine Learning, Deep Learning, Static Analysis, JDBC, Anomaly DetectionAbstrak
SQL injection attacks remain a pervasive threat to the security of web applications, especially those backed by relational databases such as PostgreSQL and Oracle. Traditional defensive techniques – from static code analysis to runtime firewalls – often rely on rule-based heuristics and secure coding practices (e.g. using prepared statements) that struggle to keep pace with evolving attack patterns. Recent research has turned to artificial intelligence (AI) and machine learning (ML) to detect and prevent SQL injection dynamically, learning malicious query patterns from data rather than static rules. This paper surveys modern scientific literature (with an emphasis on IEEE and ACM sources) on protecting relational databases from SQL injection, focusing on applied methods implemented in Java environments for PostgreSQL and Oracle databases. We review state-of-the-art solutions, including static analysis tools, runtime monitoring systems, and novel AI/ML-driven detectors. We highlight cutting-edge approaches such as deep learning models (e.g. CNNs, LSTMs, transformers) that automatically learn query features, and discuss how these can be integrated into Java applications. We analyze system architectures and algorithms from recent studies, and illustrate practical implementations with code examples and system diagrams. Building on these insights, we propose an original approach – a graph-based ML detection system integrated at the JDBC driver level – that leverages the structural patterns of SQL queries and adaptive learning to thwart injection attempts in real-time. This proposed method aims to advance the state of the art by combining parse-tree analysis with deep neural networks, offering both scientific novelty and practical significance. The paper follows the IMRaD structure (Introduction, Methods, Results, Discussion), and includes an evaluation plan using real-world attack data on PostgreSQL and Oracle. Our work not only demonstrates the promise of AI-driven SQL injection defenses but also provides a blueprint for deploying these techniques in enterprise Java applications.
Bibliografik havolalar
[1] Halfond, W. G., & Orso, A. (2005). AMNESIA: Analysis and Monitoring for Neutralizing SQLInjection Attacks. Proc. of the 20th IEEE/ACM International Conference on Automated Software Engineering, 174–183.
[2] Bisht, P., Madhusudan, P., & Venkatakrishnan, V. N. (2010). CANDID: Dynamic Candidate Evaluations for Automatic Prevention of SQL Injection Attacks. ACM Transactions on Information and System Security, 13(2), 1–39.
[3] Gould, C., Su, Z., & Devanbu, P. (2004). JDBC Checker: A Static Analysis Tool for SQL/JDBC Applications. Proc. of the 26th International Conference on Software Engineering, 697–698.
[4] Sun, H., Du, Y., & Li, Q. (2023). Deep Learning-Based Detection Technology for SQL Injection. Applied Sciences, 13(16), 9466.
[5] Lo, R., Hwang, W., & Tai, T. (2023). SQL Injection Detection Based on Lightweight MultiHead Self-Attention. Applied Sciences, 15(2), 571.
[6] Zulu, J., Han, B., Alsmadi, I., & Liang, G. (2024). Enhancing Machine Learning Based SQL Injection Detection Using Contextualized Word Embedding. ACMSE 2024 Conference, 211–216.
[7] Adebiyi, M. O., et al. (2021). An SQL injection detection model using chi-square with classification techniques. Proc. of 2021 International Conference on Electrical, Computer and Energy Technologies (ICECET), 1–8.
[8] McWhirter, P. R., et al. (2018). SQL Injection Attack Classification through Feature Extraction of SQL Query Strings using a Gap-Weighted Subsequence Kernel. Journal of Information Security and Applications, 40, 199–216.

