dicklesworthstone/pi_agent_rust/sqlmap-database-pentesting
Claude Code and agent skill by dicklesworthstone/pi_agent_rust
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "automate SQL injection testing," "enumerate database structure," "extract database credentials using sqlmap," "dump tables and columns from a vulnerable database," or "perform automated database penetration testing." It provides comprehensive guidance for using SQLMap to detect and exploit SQL injection vulnerabilities.
Install
npx vskill@latest install dicklesworthstone/pi_agent_rust/sqlmap-database-pentestingSKILL.md
The same SKILL.md was published earlier as davila7/claude-code-templates/sqlmap-database-pentesting.
SQLMap Database Penetration Testing
Purpose
Provide systematic methodologies for automated SQL injection detection and exploitation using SQLMap. This skill covers database enumeration, table and column discovery, data extraction, multiple target specification methods, and advanced exploitation techniques for MySQL, PostgreSQL, MSSQL, Oracle, and other database management systems.
Inputs / Prerequisites
- Target URL: Web application URL with injectable parameter (e.g.,
?id=1) - SQLMap Installation: Pre-installed on Kali Linux or downloaded from GitHub
- Verified Injection Point: URL parameter confirmed or suspected to be SQL injectable
- Request File (Optional): Burp Suite captured HTTP request for POST-based injection
- Authorization: Written permission for penetration testing activities
Outputs / Deliverables
- Database Enumeration: List of all databases on the target server
- Table Structure: Complete table names within target database
- Column Mapping: Column names and data types for each table
- Extracted Data: Dumped records including usernames, passwords, and sensitive data
- Hash Values: Password hashes for offline cracking
- Vulnerability Report: Confirmation of SQL injection type and severity
Core Workflow
1. Identify SQL Injection Vulnerability
Manual Verification
Initial SQLMap Scan
2. Enumerate Databases
List All Databases
Key Options:
-u: Target URL with injectable parameter--dbs: Enumerate database names--batch: Use default answers (non-interactive mode)
3. Enumerate Tables
List Tables in Specific Database
Key Options:
-D: Specify target database name--tables: Enumerate table names
4. Enumerate Columns
List Columns in Specific Table
Key Options:
-T: Specify target table name--columns: Enumerate column names
5. Extract Data
Dump Specific Table Data
Dump Specific Columns
Dump Entire Database
Key Options:
--dump: Extract all data from specified table--dump-all: Extract all data from all tables-C: Specify column names to extract
6. Advanced Target Options
Target from HTTP Request File
Target from Log File
Target Multiple URLs (Bulk File)
Target via Google Dorks (Use with Caution)
Quick Reference Commands
Database Enumeration Progression
| Stage | Command | |
|---|---|---|
| List Databases | sqlmap -u "URL" --dbs --batch | |
| List Tables | sqlmap -u "URL" -D dbname --tables --batch | |
| List Columns | sqlmap -u "URL" -D dbname -T tablename --columns --batch | |
| Dump Data | sqlmap -u "URL" -D dbname -T tablename --dump --batch | |
| Dump All | sqlmap -u "URL" -D dbname --dump-all --batch |
Supported Database Management Systems
| DBMS | Support Level | |
|---|---|---|
| MySQL | Full Support | |
| PostgreSQL | Full Support | |
| Microsoft SQL Server | Full Support | |
| Oracle | Full Support | |
| Microsoft Access | Full Support | |
| IBM DB2 | Full Support | |
| SQLite | Full Support | |
| Firebird | Full Support | |
| Sybase | Full Support | |
| SAP MaxDB | Full Support | |
| HSQLDB | Full Support | |
| Informix | Full Support |
SQL Injection Techniques
| Technique | Description | Flag | |
|---|---|---|---|
| Boolean-based blind | Infers data from true/false responses | --technique=B | |
| Time-based blind | Uses time delays to infer data | --technique=T | |
| Error-based | Extracts data from error messages | --technique=E | |
| UNION query-based | Uses UNION to append results | --technique=U | |
| Stacked queries | Executes multiple statements | --technique=S | |
| Out-of-band | Uses DNS or HTTP for exfiltration | --technique=Q |
Essential Options
| Option | Description | |
|---|---|---|
-u | Target URL | |
-r | Load HTTP request from file | |
-l | Parse targets from Burp/WebScarab log | |
-m | Bulk file with multiple targets | |
-g | Google dork (use responsibly) | |
--dbs | Enumerate databases | |
--tables | Enumerate tables | |
--columns | Enumerate columns | |
--dump | Dump table data | |
--dump-all | Dump all database data | |
-D | Specify database | |
-T | Specify table | |
-C | Specify columns | |
--batch | Non-interactive mode | |
--random-agent | Use random User-Agent | |
--level | Level of tests (1-5) | |
--risk | Risk of tests (1-3) |
Constraints and Limitations
Operational Boundaries
- Requires valid injectable parameter in target URL
- Network connectivity to target database server required
- Large database dumps may take significant time
- Some WAF/IPS systems may block SQLMap traffic
- Time-based attacks significantly slower than error-based
Performance Considerations
- Use
--threadsto speed up enumeration (default: 1) - Limit dumps with
--startand--stopfor large tables - Use
--techniqueto specify faster injection method if known
Legal Requirements
- Only test systems with explicit written authorization
- Google dork attacks against unknown sites are illegal
- Document all testing activities and findings
- Respect scope limitations defined in engagement rules
Detection Risk
- SQLMap generates significant log entries
- Use
--random-agentto vary User-Agent header - Consider
--delayto avoid triggering rate limits - Proxy through Tor with
--torfor anonymity (authorized tests only)
Examples
Example 1: Complete Database Enumeration
Example 2: POST Request Injection
Example 3: Bulk Target Scanning
Example 4: Aggressive Testing
Example 5: Extract Specific Credentials
Example 6: OS Shell Access (Advanced)
Troubleshooting
Issue: "Parameter does not seem injectable"
Cause: SQLMap cannot find injection point Solution:
Issue: Target Behind WAF/Firewall
Cause: Web Application Firewall blocking requests Solution:
Issue: Connection Timeout
Cause: Network issues or slow target Solution:
Issue: Time-Based Attacks Too Slow
Cause: Default time delay too conservative Solution:
Issue: Cannot Dump Large Tables
Cause: Table has too many records Solution:
Issue: Session Drops During Long Scan
Cause: Session timeout or connection reset Solution:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtests/ext_conformance/artifacts/templates-davila7/cli-tool/components/skills/security/sqlmap-database-pentesting/SKILL.md
Popularity
- Repository stars
- 1,831
- Repository forks
- 218
- 7-day trend score
- 38
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/dicklesworthstone/pi_agent_rust/sqlmap-database-pentesting)