A Multi-Agent Framework for SQL Injection Auditing with LLM-Driven Post-Exploitation and Privilege Escalation
Julio Gómez-López, Daniel Penco-Hernández, Óscar David Gómez-López, Francisco Javier Martínez-López, Nicolás Padilla-SorianoWeb security audits of SQL injection (SQLi) vulnerabilities still depend primarily on the analyst’s skill and knowledge to select the right tools, interpret results, and determine whether there is any vulnerability. This work presents SQLiAgent, an open-source multi-agent framework that automates the complete cycle of an SQLi audit—from initial recognition to post-exploitation assisted by artificial intelligence (AI)—in order to facilitate the detection and subsequent patching of vulnerabilities. SQLiAgent integrates well-established tools from the pentesting ecosystem within a decoupled and traceable workflow, and it adds a mode assisted by large language models (LLMs) whose contribution is especially relevant in post-exploitation: automated interpretation of database schema, identification of credential tables and autonomous generation of privilege-escalation SQL statements from the inferred structure of the database. The tool has been validated on the OWASP Broken Web Applications (BWA) environment, used as a reproducible testbed that makes it possible to measure its effectiveness and to establish a baseline for comparison with other systems. The results obtained show that both modes reach 100% coverage per application and that the AI mode improves detection, locating a larger number of vulnerable pages than the non-AI mode. The incorporation of AI demonstrates a clear advantage in post-exploitation, in tasks such as the automatic generation of privilege escalation or generation of technical security reports.