xalgorix/xalgorix/exploiting-sql-injection-with-sqlmap
Claude Code and agent skill by xalgorix/xalgorix
- community
Checking that the SKILL.md file is still in the repository.
Detecting and exploiting SQL injection vulnerabilities using sqlmap to extract database contents during authorized
Install
npx vskill@latest install xalgorix/xalgorix/exploiting-sql-injection-with-sqlmapSKILL.md
The same SKILL.md was published earlier as xalgorix/xalgorix/exploiting-sql-injection-with-sqlmap.
Exploiting SQL Injection with sqlmap
When to Use
- During authorized web application penetration testing engagements
- When manual testing reveals potential SQL injection points in parameters, headers, or cookies
- For validating SQL injection findings from automated scanners like Burp Suite or OWASP ZAP
- When you need to demonstrate the impact of SQL injection by extracting data from backend databases
- During CTF challenges involving SQL injection exploitation
How to CONFIRM a Hit (avoid false negatives)
- The positive signal is sqlmap's own technique confirmation plus manual re-verification — not an HTTP 200. Require sqlmap to print
the parameter '<x>' is vulnerableand list the confirmed techniques (B=boolean, E=error, U=union, S=stacked, T=time) and the back-end DBMS. A scan that ends with "all tested parameters do not appear to be injectable" is a negative ONLY after the escalations below. - Re-verify manually so you are not chasing a false positive: reproduce the boolean differential (true vs false page differ), the time delay (a
SLEEP(5)/WAITFORpayload adds ~5s vs baseline), the DB error string, or the UNION row appearing in the response. If you cannot reproduce by hand, treat sqlmap's claim with suspicion. - Watch for false negatives from defaults: bump
--level=5 --risk=3, set the right--dbms, and supply a--techniqueif only blind is viable. - Do NOT conclude negative until you have tried ALL of these:
- Mark the exact param with
-p, and test cookies/headers (--cookie,-p "User-Agent,Referer",--headers), JSON bodies (*markers), and POST data from a saved-r request.txt. - WAF/filter bypass via
--tamper(e.g.space2comment,between,randomcase,modsecurityversioned) and--random-agent. - Adjust
--time-sec,--string/--not-string/--codeto stabilize boolean detection on noisy pages. - Second-order via
--second-url/--second-req; and--csrf-token/--csrf-urlwhen a token blocks replay. - A 200 with identical content for true and false payloads is NOT injectable; a 500 is a hint, not proof. Confirm a controlled differential before reporting.
Prerequisites
- Authorization: Written penetration testing agreement (Rules of Engagement) for the target
- sqlmap: Install via
pip install sqlmaporapt install sqlmapon Kali Linux - Python 3.6+: Required runtime for sqlmap
- Burp Suite (optional): For capturing and replaying HTTP requests
- Target access: Network connectivity to the target web application
- Browser with proxy: Firefox with FoxyProxy for intercepting requests
Workflow
Step 1: Identify Potential Injection Points
Manually browse the application and identify parameters that interact with the database. Use Burp Suite to capture requests.
Step 2: Run sqlmap Basic Detection Scan
Launch sqlmap against the suspected injection point to confirm the vulnerability and identify the database type.
Step 3: Enumerate Database Structure
Once injection is confirmed, enumerate databases, tables, and columns.
Step 4: Extract Data from Target Tables
Dump the contents of sensitive tables to demonstrate impact.
Step 5: Test for Advanced Exploitation Vectors
Assess the full impact by testing OS-level access and file operations.
Step 6: Use Tamper Scripts to Bypass WAF/Filters
When Web Application Firewalls or input filters block basic payloads, use tamper scripts.
Step 7: Generate Report and Clean Up
Document findings and clean up any artifacts.
Key Concepts
| Concept | Description | |
|---|---|---|
| Union-based SQLi | Uses UNION SELECT to append attacker query results to the original query output | |
| Blind Boolean SQLi | Infers data one bit at a time by observing true/false application responses | |
| Blind Time-based SQLi | Uses database sleep functions (e.g., SLEEP(5)) to infer data based on response delays | |
| Error-based SQLi | Extracts data through verbose database error messages returned in HTTP responses | |
| Stacked Queries | Executes multiple SQL statements separated by semicolons for INSERT/UPDATE/DELETE operations | |
| Out-of-band SQLi | Exfiltrates data via DNS or HTTP requests initiated by the database server | |
| Tamper Scripts | sqlmap plugins that modify payloads to bypass WAFs and input sanitization filters | |
| Second-order SQLi | Injected payload is stored and executed later in a different query context |
Tools & Systems
| Tool | Purpose | |
|---|---|---|
| sqlmap | Automated SQL injection detection and exploitation framework | |
| Burp Suite Professional | HTTP proxy for intercepting, modifying, and replaying requests | |
| OWASP ZAP | Free alternative to Burp for web application scanning and proxying | |
| Havij | Automated SQL injection tool with GUI (Windows) | |
| jSQL Injection | Java-based GUI tool for SQL injection testing | |
| DBeaver/DataGrip | Database clients for verifying extracted data structure |
Common Scenarios
Scenario 1: E-commerce Product Page SQLi
A product detail page uses id parameter directly in SQL query. Use sqlmap to extract the full customer database including payment information to demonstrate critical business impact.
Scenario 2: Login Form Bypass
A login form concatenates user input into an authentication query. Exploit to bypass authentication and enumerate all user credentials stored in the database.
Scenario 3: Search Function with WAF Protection
A search feature is vulnerable to SQL injection but protected by a WAF. Use tamper scripts like space2comment and between to encode payloads and bypass the filter rules.
Scenario 4: Cookie-based Blind SQL Injection
A session cookie value is used in a database query on the server side. Use time-based blind injection techniques to extract data character by character.
Output Format
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginternal/tools/skills/data/web-application-security/exploiting-sql-injection-with-sqlmap/SKILL.md
Popularity
- Repository stars
- 1,153
- Repository forks
- 212
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xalgorix/xalgorix/exploiting-sql-injection-with-sqlmap)