Zum Inhalt springen
Skillpedia
Sicherheit5.5k · #14789

graphql-audit

Was er macht

Dieser skill zeigt einem Agenten, wie er eine GraphQL-API prüft. Mit GraphQL kann ein Client in einem Aufruf viele Felder anfordern. Der skill behandelt offene Schemata, die Zugriffskontrolle auf einzelne Felder sowie Missbrauch von Batching und verschachtelten Abfragen.

Wann du ihn nutzt

  • ✓Wenn ein Ziel einen /graphql-Endpunkt oder einen ähnlichen GraphQL-Endpunkt bereitstellt.
  • ✓Wenn ein Tester prüfen möchte, ob die Schema-Introspektion offen ist.
  • ✓Wenn ein Tester prüfen muss, ob ein Nutzer über GraphQL die Daten eines anderen Nutzers lesen kann.

Link zum Skill

https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/graphql-audit/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/graphql-audit/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Prüfe bitte diesen GraphQL-Endpunkt auf offene Introspektion und fehlende Zugriffsprüfungen bei einzelnen Objekten.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent erkennt die GraphQL-Engine, prüft, ob das Schema offen ist, und testet Feldvorschläge und Zugriffskontrolle. Außerdem probiert er Batching- und Alias-Muster aus und berichtet dann, was er bestätigt.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

GRAPHQL SECURITY AUDIT

GraphQL flips the threat model — clients drive queries. One endpoint, infinite attack surface. Introspection hands you the schema; even without it, field suggestions give you 80% back.


0. QUICK KILL CHECKLIST

[ ] Run graphql_audit.sh <endpoint> — full automated sweep
[ ] Check if introspection is enabled (__schema query)
[ ] If introspection off — run clairvoyance for field discovery
[ ] Fingerprint engine (graphw00f) — different engines, different CVEs
[ ] Test query batching — send 100 identical queries in one POST
[ ] Test alias bombing — 1000 aliases in one query
[ ] Check field suggestions on typos — leaks schema even when introspection off
[ ] Try IDOR: query another user's object by ID, no auth check
[ ] Test field-level auth: query privileged fields (admin, role, internalNote)
[ ] Inject SQLi/NoSQLi via string arguments — id, filter, search args
[ ] Check subscriptions: can you subscribe to other users' events?
[ ] Try introspection bypass: __schema\nquery, query batching, fragment tricks
[ ] Look for mutation rate limiting — account takeover / self-XSS via mutations

1. TOOL — graphql_audit.sh

# Basic audit
bash bughunter/tools/graphql_audit.sh https://target.com/graphql

# With auth cookie
bash bughunter/tools/graphql_audit.sh https://target.com/api/graphql --cookie "session=abc123"

# With Authorization header
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --header "Authorization: Bearer TOKEN"

# Through Burp proxy
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --proxy http://127.0.0.1:8080

# Custom output directory
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --output-dir ./findings/target/graphql

Output: findings/<target>/graphql/<timestamp>/

  • introspection.json — full schema dump (if enabled)
  • fingerprint.txt — engine type (graphw00f)
  • field_suggestions.txt — discovered fields via clairvoyance
  • batching_dos.txt — response time delta for 1 vs 100 queries
  • alias_bomb.txt — alias depth test results
  • injection.txt — injection scan results (built-in SQLi probe)
  • cop_report.txt — graphql-cop attack checklist results
  • summary.txt — hit/miss per phase

2. INTROSPECTION — Schema Leak (Most Common First Step)

Check If Enabled

curl -s -X POST https://target.com/graphql \
  -H 'Content-Type: application/json' \
  -d '{"query":"{ __schema { queryType { name } } }"}' | jq .

Full Schema Dump

# Pull complete introspection schema (pipe to InQL or graphql-voyager)
curl -s -X POST https://target.com/graphql \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } }"
  }' | jq . > schema.json

What To Look For In The Schema

- Mutations involving user data: updateUser, deleteAccount, changeEmail, changePassword
- Queries returning other users' objects: user(id: X), order(id: X)
- Fields: internalNote, adminOnly, role, isAdmin, rawPassword, apiKey
- Types: AdminUser, InternalConfig, DebugInfo
- Deprecated fields — often bypassed auth or forgotten
- Subscription types — real-time data leaks

Introspection Bypass Techniques

When __schema is blocked, try:

# Newline injection (bypasses naive keyword filters)
{"query": "query {\n  __schema\n  { queryType { name } } }"}

# Fragment trick
{"query": "fragment f on __Schema { queryType { name } } { ...f }"}

# __type instead of __schema (often overlooked in blocklists)
{"query": "{ __type(name: \"User\") { fields { name type { name } } } }"}

# Via GET request (some servers allow GET, filter only POST)
GET /graphql?query={__schema{queryType{na
Häufige Fragen

Was ist Introspektion?

Es ist eine GraphQL-Funktion, die das vollständige Schema offenlegen kann. Der skill prüft, ob sie aktiviert ist.

Was ist, wenn die Introspektion aus ist?

Der skill schlägt Feld-Erkennung und das Prüfen von Tippfehler-Vorschlägen vor, was trotzdem Teile des Schemas verraten kann.

Welche Tools nennt er?

Er nennt graphw00f, clairvoyance, GraphQLmap, graphql-cop und inql.

Details

Originalbeschreibung des Autors

GraphQL security hunting — introspection abuse, field suggestion enumeration (clairvoyance), batching DoS, IDOR via aliasing, auth bypass, injection via arguments, subscription abuse, depth/complexity bombs, and WAF bypass. Covers graphw00f fingerprinting, GraphQLmap, graphql-cop, and inql. Use when a target exposes a /graphql, /api/graphql, or GQL-over-HTTP endpoint.

repo: awarexone/Agentic-Bug-Hunter

Beliebtheit

GitHub-Sterne
5.5k
Platz im Ranking
#14789
Lizenz
MIT
Aktualisiert
28.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills