offensive-graphql
O que ela faz
Esta skill é uma metodologia para testes de segurança em APIs GraphQL. Ela cobre encontrar o endpoint, ler ou reconstruir o schema, verificar as regras de acesso e testar o batching e a profundidade das consultas. Ela é para profissionais de segurança e pesquisadores de bug bounty com permissão.
Quando usar
- ✓Quando você está testando uma API GraphQL em uma avaliação autorizada.
- ✓Quando a introspecção está desligada e você precisa reconstruir o schema para o teste.
- ✓Quando você quer verificar se uma API GraphQL limita o batching, a profundidade ou a taxa de requisições.
Link da skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/web/offensive-graphql/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Temos autorização para testar nossa API GraphQL. Verifique se a introspecção está ativa e se as regras de acesso funcionam.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill encontra o endpoint GraphQL e identifica o mecanismo. Depois obtém o schema, por introspecção ou reconstruindo-o, e testa o acesso, os pontos de injeção, o batching e a profundidade das consultas.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
O que é introspecção?
É um recurso do GraphQL que lista os tipos e campos da API, algo que a skill verifica se está exposto.
E se a introspecção estiver desativada?
A skill descreve formas de reconstruir o schema, como testar as sugestões de campos.
Isso serve só para testes autorizados?
Sim. Ela foi escrita para testes com permissão por escrito.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 10 mil
- Posição no ranking
- #11977
- Licença
- MIT
- Atualizada em
- 12/10/2026
Comentários
- …
Mais skills deste repositório
offensive-active-directory
10 milAjuda seu agente a planejar um teste autorizado de segurança do Active Directory, do mapeamento da rede até os caminhos de ataque ao Domain Admin.
offensive-netexec
10 milAjuda seu agente a usar a ferramenta NetExec (nxc) em testes de rede autorizados, cobrindo protocolos, autenticação e verificação de credenciais.
offensive-api-abuse
10 milAjuda seu agente a planejar testes autorizados de segurança em APIs, buscando abuso da lógica de negócio, riscos de GraphQL e condições de corrida.
offensive-api-security
10 milAjuda seu agente a fazer testes de segurança autorizados em APIs REST, gRPC e WebSocket, com base no OWASP API Top 10.
Skills parecidas
api-connector-builder
280 milFaz seu agente construir novas conexões com APIs seguindo o padrão já existente. Use quando precisar adicionar mais uma integração sem criar um novo jeito de fazer.
api-design
280 milAjuda seu agente a projetar APIs REST seguindo as melhores práticas. É útil para definir como as APIs se comunicam, como os erros são mostrados e como organizar os dados.
backend-patterns
280 milAjuda seu agente com padrões de arquitetura do lado do servidor e otimização de banco de dados. É útil para construir ou revisar o código que roda no servidor.