offensive-graphql
できること
このスキルは、GraphQL APIのセキュリティテストの方法論です。エンドポイントを見つけ、スキーマを読むかまたは再構築し、アクセスのルールを確認して、バッチ処理と深さをテストします。許可を得てテストするセキュリティの専門家とバグバウンティの研究者向けです。
使う場面
- ✓許可を得た評価で、GraphQL APIをテストしているとき。
- ✓イントロスペクションが無効で、テストのためにスキーマを再構築する必要があるとき。
- ✓GraphQL APIがバッチ処理、深さ、リクエストの頻度を制限しているか確認したいとき。
スキルのリンク
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-graphql/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのGraphQL APIをテストする許可があります。イントロスペクションが有効か、アクセスのルールが守られているかを確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、GraphQLのエンドポイントを見つけ、エンジンを特定します。そしてイントロスペクションか、スキーマの再構築によってスキーマを取得し、アクセスと注入の箇所、バッチ処理、クエリの深さをテストします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Offensive GraphQL
GraphQL consolidates an entire API surface behind a single endpoint, making it a high-value target during web application assessments. Unlike REST, where each route maps to a discrete resource, a GraphQL schema exposes every type, field, mutation, and subscription in one queryable structure. Attackers who obtain or reconstruct that schema gain a complete map of the application's data model before writing a single exploit. This skill walks you through each phase of a GraphQL engagement with concrete queries, tool invocations, and chaining patterns.
Quick Workflow
- Discover the endpoint -- probe common paths, inspect client-side JS bundles, check WebSocket upgrade headers.
- Fingerprint the implementation -- use graphw00f to identify the engine and tailor payloads.
- Dump or reconstruct the schema -- full introspection query; if blocked, field suggestion probing or clairvoyance.
- Map the attack surface -- feed the schema into GraphQL Voyager or InQL.
- Test authentication and authorization -- every query and mutation with no token, low-privilege, and cross-user tokens.
- Inject through resolvers -- SQL, NoSQL, and OS command payloads through arguments and variables.
- Abuse batching -- arrayed operations for brute force, OTP bypass, and rate limit evasion.
- Stress depth and complexity -- nested queries, alias fans, and circular fragments.
- Probe subscriptions -- WebSocket with expired or missing tokens, subscribe to sensitive streams.
- Exfiltrate via errors -- verbose stack traces, type mismatches, field suggestions.
- Test file upload -- multipart GraphQL specification for oversized or malicious files.
- Chain and escalate -- combine findings into multi-step attack paths with proof-of-concept queries.
1 -- Endpoint Discovery and Fingerprinting
Probe common paths with a minimal query body. A __typename response confirms a live GraphQL endpoint.
curl -s -X POST https://target.com/graphql \
-H "Content-Type: application/json" \
-d '{"query":"{__typename}"}' | jq .
Paths to probe: /graphql, /graphiql, /v1/graphql, /v2/graphql, /api/graphql, /graphql/console, /playground, /explorer, /query. Some servers accept GET requests:
curl -s "https://target.com/graphql?query=\{__typename\}"
Fingerprint the implementation to determine default behaviors (introspection state, error format, batching syntax):
python3 graphw00f.py -t https://target.com/graphql
Run graphql-cop for a one-pass configuration audit -- it reports introspection status, field suggestion leaks, GET-based query acceptance (CSRF risk), and unrestricted batching:
python3 graphql-cop.py -t https://target.com/graphql
2 -- Introspection and Blind Schema Reconstruction
Full Introspection Dump
When introspection is enabled, pull the entire schema in one request. This is the single most valuable recon step.
query FullIntrospection {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
kind name description
fields(includeDeprecated: true) {
name args { name type { ...T } defaultValue } type { ...T }
}
inputFields { name type { ...T } defaultValue }
interfaces { ...T }
enumValues(includeDeprecated: true) { name description }
possibleTypes { ...T }
}
directives { name description locations args { name type { ...T } } }
}
}
fragment T on __Type {
kind name ofType { kind name ofType { kind name ofType { kind name } } }
}
Pipe the result into GraphQL Voyager for visual exploration, or load InQL in Burp Suite -- it parses the schema and generates individual queries for every field and mutation.
Targeted __type Queries
When full introspection is disabled but __type lookups still work (a common misconfiguration where the server blocks __schema but forgets __type):
query { __type(name: "User") { name fields { name type { name kind } } } }
Bypassing Disabled Introspection
Field suggestion oracle. Most engines return "Did you mean..." when you query a non-existent field. Submit plausible names and harvest suggestions:
query { __typename aaa }
{
"errors": [{
"message": "Cannot query field \"aaa\" on type \"Query\". Did you mean \"user\", \"users\", \"admin\"?"
}]
}
Automate this with clairvoyance, which iterates a wordlist, collects sug
よくある質問
イントロスペクションとは何ですか?
APIの型やフィールドを一覧にするGraphQLの機能で、露出していないか確認されます。
イントロスペクションが無効な場合はどうしますか?
フィールドの候補を探るなど、スキーマを再構築する方法を説明します。
許可を得たテストだけのためのものですか?
はい。書面による許可のもとでのテストのために書かれています。
詳細
作者による元の説明
Offensive methodology for attacking GraphQL APIs during penetration tests and bug bounty engagements. Covers the full attack lifecycle: endpoint discovery, introspection abuse and blind schema reconstruction when introspection is disabled, authentication and authorization bypass through Relay node IDs and nested object traversal, injection via variables and directives, query batching for brute force and OTP bypass, denial of service through depth bombs and alias amplification, WebSocket subscription hijacking, information disclosure through verbose errors and field suggestion oracles, and file
repo: SnailSploit/Claude-Red
人気
- GitHubのスター
- 10k
- ランキング
- #11977
- ライセンス
- MIT
- 更新日
- 2026/10/12
コメント
- …
このリポジトリの他のスキル
offensive-active-directory
10kエージェントが、ネットワークの地図作成から Domain Adminへの攻撃経路の発見まで、許可を得た Active Directoryのセキュリティテストを計画できるよう支援します。
offensive-netexec
10kエージェントが、許可を得たネットワークのテストで、NetExec(nxc)ツールを使えるよう支援します。プロトコル、認証、認証情報の確認を扱います。
offensive-api-abuse
10kエージェントが、ビジネスロジックの悪用、GraphQLのリスク、競合状態を探す、許可を得たAPIのセキュリティテストを計画できるよう支援します。
offensive-api-security
10kエージェントが、OWASP API Top 10に基づき、REST、gRPC、WebSocketのAPIに対して許可を得たセキュリティテストを行えるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。