offensive-graphql
ما الذي تفعله
هذه المهارة منهجية للاختبار الأمني لواجهات GraphQL. تغطي إيجاد نقطة النهاية، وقراءة المخطط أو إعادة بنائه، وفحص قواعد الوصول، واختبار تجميع الاستعلامات وعمقها. وهي موجهة لمختصي الأمن وباحثي مكافآت الأخطاء بإذن.
متى تستخدمها
- ✓عندما تختبر واجهة GraphQL في تقييم مصرّح به.
- ✓عندما يكون الاستعلام الذاتي (introspection) مغلقًا وتحتاج إلى إعادة بناء المخطط للاختبار.
- ✓عندما تريد التحقق هل تحد واجهة GraphQL من التجميع أو العمق أو معدل الطلبات.
رابط المهارة
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-graphql/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“لدينا تصريح لاختبار واجهة GraphQL لدينا. افحص هل الاستعلام الذاتي مفعّل وهل قواعد الوصول صامدة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تجد المهارة نقطة نهاية GraphQL وتحدد محرك الواجهة. ثم تحصل على المخطط عبر الاستعلام الذاتي أو بإعادة بنائه، وتختبر الوصول ونقاط الحقن والتجميع وعمق الاستعلام.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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
الأسئلة الشائعة
ما الاستعلام الذاتي (introspection)؟
هو ميزة في GraphQL تعرض أنواع الواجهة وحقولها، وتفحص المهارة كشفها.
ماذا لو كان الاستعلام الذاتي معطّلًا؟
تصف المهارة طرقًا لإعادة بناء المخطط، مثل استكشاف اقتراحات الحقول.
هل هي للاختبارات المصرّح بها فقط؟
نعم. كُتبت للاختبار بإذن كتابي.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 10k
- الترتيب
- #11977
- الترخيص
- MIT
- آخر تحديث
- 12/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
offensive-active-directory
10kيساعد وكيلك على تخطيط اختبار أمني مصرّح به لـ Active Directory، من رسم الشبكة إلى إيجاد مسارات الهجوم نحو Domain Admin.
offensive-netexec
10kيساعد وكيلك على استخدام أداة NetExec (nxc) في الاختبارات الشبكية المصرّح بها، وتغطي البروتوكولات والمصادقة وفحوص بيانات الاعتماد.
offensive-api-abuse
10kيساعد وكيلك على تخطيط اختبارات أمان API مصرّح بها تبحث عن إساءة منطق العمل ومخاطر GraphQL وحالات السباق.
offensive-api-security
10kيساعد وكيلك على إجراء اختبارات أمان مصرّح بها لواجهات REST وgRPC وWebSocket، استنادًا إلى قائمة OWASP API Top 10.
مهارات مشابهة
api-connector-builder
280kيبني وكيلك اتصالات API جديدة على النمط الموجود، ويفيد عندما تحتاج إلى تكامل إضافي دون ابتكار طريقة جديدة للعمل.
api-design
280kيساعد وكيلك على تصميم واجهات REST API وفق أفضل الممارسات، ويوضح كيف تتواصل وكيف تُعرض الأخطاء وكيف تُنظَّم البيانات.
backend-patterns
280kيساعد وكيلك على أنماط بنية الخادم وتحسين قاعدة البيانات، ويفيد في بناء الشيفرة التي تعمل على الخادم أو مراجعتها.