본문으로 건너뛰기
Skillpedia
보안5.4k · #14910

hunt-graphql

하는 일

이 스킬은 객체 접근 실패, 범위가 없는 뮤테이션, 필드 단위 데이터 누출 같은 결함을 찾기 위해 GraphQL 엔드포인트를 테스트합니다. GraphQL API를 제공하는 앱을 허가받아 점검할 때 사용합니다.

사용하는 경우

  • ✓앱이 /graphql 엔드포인트를 노출하고 접근 제어를 확인하고 싶을 때.
  • ✓뮤테이션이 다른 사용자나 다른 팀의 데이터를 바꿀 수 있을 때.
  • ✓GraphQL 쿼리가 제한되어야 할 비공개 필드를 반환할 때.

스킬 링크

https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-graphql/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-graphql/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“허가된 테스트에서 저희 GraphQL API로 한 사용자가 다른 사용자의 기록을 읽거나 바꿀 수 있는지 확인해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 스키마를 파악하고, 서로 다른 사용자 계정으로 쿼리와 뮤테이션을 테스트합니다. 각 계정이 보거나 바꿀 수 있는 것을 비교해 접근 허점을 보고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Crown Jewel Targets

GraphQL vulnerabilities are high-value because the attack surface is both broad and deep — a single endpoint can expose entire data models, privilege escalation paths, and cross-API state confusion. Highest payouts occur in:

  • Platform APIs (GitHub, Shopify, Stripe-tier targets) where GraphQL mutations interact with REST APIs managing the same resources
  • Race conditions between GraphQL mutations and REST endpoints where state synchronization is non-atomic — these hit medium-to-high severity reliably
  • Authorization persistence bugs where team/org/repo membership state is controlled by one API but readable/writable by another
  • B2B SaaS platforms where one tenant affecting another via schema traversal = critical
  • Internal admin GraphQL endpoints accidentally exposed to lower-privilege users

The GitHub reports demonstrate the crown jewel pattern: privilege that should be revoked persists because two APIs disagree on ground truth.


Attack Surface Signals

URL Patterns:

/graphql
/api/graphql
/v1/graphql
/query
/gql
/graph
/api/v2/graphql
/internal/graphql

Response Headers:

Content-Type: application/json  (with query body)
X-Request-Id + no REST-style path params = likely GraphQL

JavaScript Source Patterns:

// grep for these in JS bundles
"query {"
"mutation {"
"__typename"
"apollo"
"ApolloClient"
"graphql-tag"
"gql`"
"operationName"
"GRAPHQL_URI"

Tech Stack Signals:

  • Apollo Server/Client in JS bundles
  • Relay in React apps
  • graphene or strawberry (Python), graphql-ruby, gqlgen (Go), Lighthouse (Laravel)
  • POST requests with {"query": "..."} body shape in Burp history
  • __schema or __type in any response = confirmed GraphQL

Recon Sources:

  • github.com search: "graphql" site:target.com
  • Wayback Machine for /graphql paths
  • JS bundle scanning with LinkFinder or getallurls

Step-by-Step Hunting Methodology

  1. Discover the endpoint — spider JS bundles, check /graphql, /api/graphql, review Burp passive scan hits for application/json POST with query fields

  2. Test introspection — send the full introspection query. Even if blocked, try field-level enumeration:

    { __typename }
    

    If that returns, introspection may be partially blocked but the schema is discoverable

  3. Map the full schema — use InQL (Burp extension) or graphql-voyager to visualize relationships. Specifically look for:

    • Mutations that modify ownership, permissions, or membership
    • Mutations that mirror REST API functionality
  4. Identify REST/GraphQL overlap — document every resource that can be modified via BOTH REST and GraphQL. These dual-write surfaces are your RC targets.

  5. Test authorization boundaries per mutation — replay mutations as lower-privilege users. Does the server enforce the same authz as the equivalent REST call?

  6. Hunt cross-API state desync — find sequences where:

    • REST action should revoke access
    • GraphQL mutation re-grants or preserves it
    • Test the ordering: REST first → GraphQL → check state; then GraphQL first → REST → check state
  7. Test for persistent privilege after role/membership changes — remove a user via REST, then call the corresponding GraphQL mutation for that resource. Query current state via both APIs and compare.

  8. Probe for IDOR in node IDs — GraphQL global IDs often encode object type + ID. Swap IDs across object boundaries and across account contexts.

  9. Check batch query abuse — send arrays of operations to bypass rate limiting or amplify enumeration.

  10. Document the exact reproduction chain — for RC bugs, time-based steps must be reproducible deterministically.


Payload & Detection Patterns

Full Introspection Query:

{
  __schema {
    types {
      name
      fields {
        name
        type {
          name
          kind
        }
      }
    }
  }
}

Minimal Introspection Probe (bypass attempt):

{ __typename }

curl introspection test:

curl -s -X POST https://target.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"query":"{ __schema { queryType { name } } }"}' | jq .

Field suggestion probe (bypass blind introspection blocks):

{ unknownField }

If response returns "Did you mean: [realFieldName]?" — schema is enumerable despite introsp

자주 묻는 질문

객체 직접 참조 취약점이란 무엇인가요?

앱이 객체의 ID를 바꾸는 것만으로 접근을 허용하고, 그 객체를 소유하는지 확인하지 않는 문제입니다.

배치 처리나 쿼리 비용도 테스트하나요?

네. 배치 남용과 쿼리 비용 제한을 확인하는 항목이 포함되어 있습니다.

테넌트 간 데이터도 다루나요?

네. 한 테넌트의 데이터에 다른 테넌트에서 닿을 수 있는 경우를 다룹니다.

상세 정보

작성자의 원본 설명

Hunting skill for graphql vulnerabilities. Built from 12 public bug bounty reports across IDOR via node() / GID, mutation IDOR including AI/LLM features, cross-tenant IDOR, SSRF via argument, batching-DoS, query-cost-bypass, SQLi via argument, broken-object-level-authz, auth-bypass via unscoped mutations, and PII exposure from missing field-level authz. Use when hunting graphql on any target.

repo: elementalsouls/Claude-BugHunter

인기도

GitHub 스타
5.4k
순위
#14910
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬