offensive-graphql
Что он делает
Этот скилл представляет собой методику тестирования безопасности GraphQL API. Он охватывает поиск точки входа, чтение или восстановление схемы, проверку правил доступа и тестирование пакетных запросов и глубины. Он нужен специалистам по безопасности и исследователям bug bounty с разрешения.
Когда использовать
- ✓Когда вы тестируете GraphQL API в авторизованной оценке.
- ✓Когда интроспекция отключена и нужно восстановить схему для тестирования.
- ✓Когда вы хотите проверить, ограничивает ли GraphQL API пакетные запросы, глубину или частоту запросов.
Ссылка на скилл
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-graphql/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“У нас есть разрешение на тест нашего GraphQL API. Проверь, включена ли интроспекция и работают ли правила доступа.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл находит точку входа 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
Частые вопросы
Что такое интроспекция?
Это возможность GraphQL, которая перечисляет типы и поля API. Скилл проверяет, не раскрыта ли она.
Что если интроспекция отключена?
Скилл описывает способы восстановить схему, например проверку подсказок полей.
Это только для авторизованных тестов?
Да. Он написан для тестирования с письменным разрешением.
Подробности
Оригинальное описание автора
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 API по списку OWASP API Top 10.
Похожие скиллы
api-connector-builder
280kАгент создаёт новые подключения к API по существующему шаблону. Используйте, когда нужна ещё одна интеграция без нового способа делать то же самое.
api-design
280kПомогает агенту проектировать REST API по лучшим практикам: как API общаются, как показываются ошибки и как организовать данные.
backend-patterns
280kПомогает агенту с архитектурными паттернами серверной части и оптимизацией баз данных. Полезен при создании и проверке серверного кода.