offensive-graphql
Was er macht
Dieser Skill ist eine Methodik für Sicherheitstests von GraphQL-APIs. Er behandelt das Finden des Endpunkts, das Lesen oder Nachbauen des Schemas, die Prüfung von Zugriffsregeln und Tests von Batching und Abfragetiefe. Er ist für Sicherheitsfachleute und Bug-Bounty-Forscher mit Erlaubnis gedacht.
Wann du ihn nutzt
- ✓Wenn du eine GraphQL-API in einer autorisierten Prüfung testest.
- ✓Wenn die Introspektion abgeschaltet ist und du das Schema für Tests nachbauen musst.
- ✓Wenn du prüfen willst, ob eine GraphQL-API Batching, Tiefe oder Anfragerate begrenzt.
Link zum Skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-graphql/SKILL.mdKopiere 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
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wir sind autorisiert, unsere GraphQL-API zu testen. Prüfe, ob die Introspektion aktiv ist und ob die Zugriffsregeln halten.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill findet den GraphQL-Endpunkt und bestimmt die Engine. Danach holt er das Schema über Introspektion oder baut es nach und testet Zugriff, Eingangspunkte, Batching und Abfragetiefe.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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
Häufige Fragen
Was ist Introspektion?
Eine Funktion von GraphQL, die Typen und Felder der API auflistet. Der Skill prüft, ob sie offen liegt.
Was ist, wenn die Introspektion deaktiviert ist?
Der Skill beschreibt Wege, das Schema nachzubauen, etwa über Vorschläge bei Feldnamen.
Ist er nur für autorisierte Tests gedacht?
Ja. Er ist für Tests mit schriftlicher Genehmigung geschrieben.
Details
Originalbeschreibung des Autors
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
Beliebtheit
- GitHub-Sterne
- 10k
- Platz im Ranking
- #11977
- Lizenz
- MIT
- Aktualisiert
- 12.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
offensive-active-directory
10kHilft deinem Agenten, einen autorisierten Sicherheitstest für Active Directory zu planen, von der Kartierung des Netzwerks bis zu Angriffspfaden zu Domain Admin.
offensive-netexec
10kHilft deinem Agenten, das Werkzeug NetExec (nxc) für autorisierte Netzwerktests zu nutzen, mit Protokollen, Authentifizierung und Prüfung von Zugangsdaten.
offensive-api-abuse
10kHilft deinem Agenten, autorisierte API-Sicherheitstests zu planen, die nach Missbrauch der Geschäftslogik, GraphQL-Risiken und Race Conditions suchen.
offensive-api-security
10kHilft deinem Agenten, autorisierte Sicherheitstests für REST-, gRPC- und WebSocket-APIs auf Grundlage der OWASP API Top 10 durchzuführen.
Ähnliche Skills
api-connector-builder
280kLässt deinen Agenten neue API-Anbindungen nach dem bestehenden Muster bauen. Nutze es, wenn du eine weitere Integration ergänzen willst, ohne neue Wege einzuführen.
api-design
280kHilft deinem Agenten, REST-APIs nach Best Practices zu entwerfen. Nützlich für die Kommunikation, die Fehlerausgabe und die Organisation von Daten.
backend-patterns
280kHilft deinem Agenten bei Architekturmustern für die Serverseite und bei der Datenbankoptimierung. Nützlich zum Bauen und Prüfen von Server-Code.