Skillpedia
الأمان5.5k · #14789

graphql-audit

ما الذي تفعله

تعلّم هذه المهارة الوكيل كيفية مراجعة واجهة GraphQL API، التي تسمح للعميل بطلب حقول كثيرة في استدعاء واحد. تغطي كشف المخطط، والتحكم في الوصول إلى الحقول المفردة، وإساءة استخدام التجميع والاستعلامات المتداخلة.

متى تستخدمها

  • ✓عندما يكشف الهدف عن نقطة /graphql أو نقطة GraphQL مشابهة.
  • ✓عندما يريد المختبِر فحص هل الاستبطان مفتوح في المخطط.
  • ✓عندما يحتاج المختبِر إلى معرفة هل يستطيع مستخدم قراءة سجلات مستخدم آخر عبر GraphQL.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/graphql-audit/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“افحص نقطة GraphQL هذه بحثاً عن الاستبطان المفتوح وغياب فحوص الوصول لكائن واحد.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يحدد وكيلك محرك GraphQL، ويفحص هل المخطط مفتوح، ويختبر اقتراحات الحقول والتحكم في الوصول. ثم يجرب أنماط التجميع والأسماء المستعارة، ويبلّغ عما يؤكده.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من 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
الأسئلة الشائعة

ما الاستبطان؟

هو ميزة في GraphQL قد تكشف المخطط كاملاً، وتفحص المهارة هل هي مفعّلة.

ماذا لو كان الاستبطان معطلاً؟

تقترح المهارة اكتشاف الحقول وفحص اقتراحات الكتابة الخاطئة، وهما قد يكشفان أجزاء من المخطط.

أي أدوات تذكرها؟

تذكر graphw00f وclairvoyance وGraphQLmap وgraphql-cop وinql.

التفاصيل

الوصف الأصلي من المؤلف

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

الشعبية

نجوم GitHub
5.5k
الترتيب
#14789
الترخيص
MIT
آخر تحديث
28‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة