Skip to content
KitploitKITPLOIT
도구블로그
Log in
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
graphql-cop — GraphQL API의 자동화된 보안 감사를 위한 경량 Python 유틸리티입니다. cURL 재현 명령어를 사용하여 잘못된 구성, 정보 유출, 서비스 거부 취약점을 탐지합니다. | Kitploit
도구/GitHubGitHub/dolevf/graphql-cop
Vulnerability ScannersWeb Vulnerability ScannersDynamic Code Analysis (DAST)Web Application ExploitationAPI Security TestingWeb SecurityPenetration TestingAPI SecurityAPI Security #5위API Security Testing #5위
6841012510개월 전Kitploit 검토 완료
Dynamic Code Analysis (DAST) #15위
Web Application Exploitation #16위
Web Security #15위
Web Vulnerability Scanners #15위
GitHubdolevf/graphql-cop

graphql-cop

GraphQL API의 자동화된 보안 감사를 위한 경량 Python 유틸리티입니다. cURL 재현 명령어를 사용하여 잘못된 구성, 정보 유출, 서비스 거부 취약점을 탐지합니다.

저장소 보기

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

GraphQL Cop - GraphQL 보안 감사 유틸리티

GraphQL Cop

소개

GraphQL Cop은 GraphQL API에 대해 일반적인 보안 테스트를 수행하는 소형 Python 유틸리티입니다. GraphQL Cop은 GraphQL에서 CI/CD 검사를 실행하는 데 적합합니다. 가볍고 GraphQL의 흥미로운 보안 문제를 다룹니다.

GraphQL Cop은 발견된 취약점에 대해 cURL 명령을 제공하여 결과를 재현할 수 있게 해줍니다.

요구 사항

  • Python3
  • Requests 라이브러리

탐지 항목

  • Alias 오버로딩 (DoS)
  • 배치 쿼리 (DoS)
  • GET 기반 쿼리 (CSRF)
  • urlencoded 페이로드를 사용한 POST 기반 쿼리 (CSRF)
  • GraphQL 추적/디버그 모드 (정보 유출)
  • 필드 중복 (DoS)
  • 필드 제안 (정보 유출)
  • GraphiQL (정보 유출)
  • 인트로스펙션 (정보 유출)
  • 지시어 오버로딩 (DoS)
  • 인트로스펙션을 이용한 순환 쿼리 (DoS)
  • GET 메서드를 통한 Mutation 지원 (CSRF)

설치

아래 명령어를 실행하여 종속성을 설치해야 합니다.

python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install -r requirements.txt

첫 번째 명령어는 path/to/venv 디렉터리에 가상 환경을 생성합니다. 두 번째 명령어는 가상 환경을 활성화합니다. 마지막 명령어는 requirements.txt에 나열된 모든 Python 패키지를 설치합니다.

사용법

$ python3 graphql-cop.py -h
Usage: graphql-cop.py -t http://example.com -o json

Options:
  -h, --help            show this help message and exit
  -t URL, --target=URL  target url with the path - if a GraphQL path is not
                        provided, GraphQL Cop will iterate through a series of
                        common GraphQL paths
  -H HEADER, --header=HEADER
                        Append Header(s) to the request '{"Authorization":
                        "Bearer eyjt"}' - Use multiple -H for additional
                        Headers
  -o FORMAT, --output=FORMAT
                        json
  -e EXCLUDED_TESTS, --excluded-tests=EXCLUDED_TESTS
                        Exclude specific tests
  -l, --list-tests      List available tests
  -f, --force           Forces a scan when GraphQL cannot be detected
  -d, --debug           Append a header with the test name for debugging
  -x PROXY, --proxy=PROXY
                        HTTP(S) proxy URL in the form
                        http://user:pass@host:port
  -w WORDLIST, --wordlist=WORDLIST
                        Path to a list of custom GraphQL endpoints
  -v, --version         Print out the current version and exit.
  -T, --tor             Sends the request through the Tor network (ensure Tor
                        is running and properly configured)

웹사이트 테스트

$ python3 graphql-cop.py -t https://mywebsite.com/graphql

[HIGH] Introspection Query Enabled (Information Leakage)
[LOW] GraphQL Playground UI (Information Leakage)
[HIGH] Alias Overloading with 100+ aliases is allowed (Denial of Service)
[HIGH] Queries are allowed with 1000+ of the same repeated field (Denial of Service)

특정 테스트 제외

$ python3 graphql-cop.py -t https://mywebsite.com/graphql -e field_duplication

[HIGH] Introspection Query Enabled (Information Leakage)
[LOW] GraphQL Playground UI (Information Leakage)
[HIGH] Alias Overloading with 100+ aliases is allowed (Denial of Service)
[HIGH] Queries are allowed with 1000+ of the same repeated field (Denial of Service)

웹사이트 테스트, 파싱 가능한 JSON 출력 및 cURL 재현 명령

python3 graphql-cop.py -t https://mywebsite.com/graphql -o json

 {'curl_verify': 'curl -X POST -H "User-Agent: graphql-cop/1.2" -H '
                 '"Accept-Encoding: gzip, deflate" -H "Accept: */*" -H '
                 '"Connection: keep-alive" -H "Content-Length: 33" -H '
                 '"Content-Type: application/json" -d \'{"query": "query { '
                 '__typename }"}\' \'http://localhost:5013/graphql\'',
  'description': 'Tracing is Enabled',
  'impact': 'Information Leakage',
  'result': False,
  'severity': 'INFO',
  'color': 'green',
  'title': 'Trace Mode'},
 {'curl_verify': 'curl -X POST -H "User-Agent: graphql-cop/1.2" -H '
                 '"Accept-Encoding: gzip, deflate" -H "Accept: */*" -H '
                 '"Connection: keep-alive" -H "Content-Length: 64" -H '
                 '"Content-Type: application/json" -d \'{"query": "query { '
                 '__typename @aa@aa@aa@aa@aa@aa@aa@aa@aa@aa }"}\' '
                 "'http://localhost:5013/graphql'",
  'description': 'Multiple duplicated directives allowed in a query',
  'impact': 'Denial of Service',
  'result': True,
  'severity': 'HIGH',
  'color': 'red',
  'title': 'Directive Overloading'}]

프록시(예: 127.0.0.1:8080에서 수신 중인 Burp Suite)를 통해 사용자 정의 헤더(예: Authorization)로 웹사이트 테스트:

$ python3 graphql-cop.py -t https://mywebsite.com/graphql --proxy=http://127.0.0.1:8080 --header '{"Authorization": "Bearer token_here"}'

[HIGH] Introspection Query Enabled (Information Leakage)
[LOW] GraphQL Playground UI (Information Leakage)
[HIGH] Alias Overloading with 100+ aliases is allowed (Denial of Service)
[HIGH] Queries are allowed with 1000+ of the same repeated field (Denial of Service)

Docker 설정 및 사용법

전제 조건

  • 시스템에 Docker가 설치되어 있어야 합니다.

Docker 이미지 빌드

  1. 저장소 클론:
git clone https://github.com/dolevf/graphql-cop.git
cd graphql-cop
  1. Docker 이미지 빌드:
docker build -t graphql-cop:latest .

Docker 컨테이너 실행

다음과 같이 Docker 컨테이너를 실행하고 graphql-cop 스크립트에 인수를 전달할 수 있습니다:

docker run --rm -it graphql-cop:latest -t <GRAPHQL_ENDPOINT> -H '{"<HEADER_KEY>": "<HEADER_VALUE>"}'

예제

다음은 컨테이너 실행 예제입니다:

docker run --rm -it graphql-cop:latest -t https://example.com/graphql -H '{"Authorization": "Bearer abc123xyz"}'

참고

사용 가능한 모든 옵션 목록을 보려면 다음을 실행하세요:

docker run --rm -it graphql-cop:latest --help

문제 해결

  1. 파일을 찾을 수 없음 오류: 컨테이너가 실행할 스크립트를 찾지 못하는 경우 저장소 구조가 손상되지 않았는지, Dockerfile이 올바르게 설정되었는지 확인하세요.
  2. 종속성 문제: 누락된 종속성이 있는 경우 requirements.txt 파일이 완전한지 확인하세요.
도구 다운로드