Machine Learning-Based Detection of SQL Injection and Data Exfiltration Through Behavioral Profiling of Relational Query Patterns

Semirat Abidemi Balogun, Onuh Matthew Ijiga, Nonso Okika, Lawrence Anebi Enyejo, Ogboji James Agbo · 2025

SQL injection and data exfiltration remain among the most severe threats to relational database security, often leading to critical data breaches in enterprise systems. This review explores the application of machine learning techniques for detecting such threats by profiling the behavioral patterns of relational SQL queries. Unlike traditional rule-based approaches, machine learning models enable the dynamic identification of anomalous query structures and access behaviors indicative of malicious intent. The study synthesizes recent advancements in supervised, unsupervised, and deep learning methods tailored for query classification, anomaly detection, and user behavior modeling. Furthermore, it evaluates the efficacy of these techniques in detecting stealthy exfiltration attacks under evolving threat landscapes. Emphasis is placed on data preprocessing strategies, feature extraction from SQL logs, and the use of graph-based and sequence-aware models for enhanced detection accuracy. The review concludes by outlining emerging challenges such as adversarial query generation, concept drift, and the need for explainable models in high-assurance environments.

Read the paper · More papers on PaperTik