Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
graphql-cop — 軽量なPython製ユーティリティで、GraphQL APIの自動セキュリティ監査を行います。設定ミス、情報漏洩、denial-of-service脆弱性を検出し、cURL再現コマンドを生成します。 | Kitploit
ツール/GitHubGitHub/dolevf/graphql-cop
脆弱性スキャナーウェブ脆弱性スキャナー動的コード分析 (DAST)ウェブアプリケーション悪用APIセキュリティテストウェブセキュリティペネトレーションテストAPIセキュリティAPIセキュリティ 第5位APIセキュリティテスト 第5位
6841011010ヶ月前Kitploit レビュー済み
動的コード分析 (DAST) 第15位
ウェブアプリケーション悪用 第16位
ウェブセキュリティ 第15位
ウェブ脆弱性スキャナー 第15位
GitHubdolevf/graphql-cop

graphql-cop

軽量なPython製ユーティリティで、GraphQL APIの自動セキュリティ監査を行います。設定ミス、情報漏洩、denial-of-service脆弱性を検出し、cURL再現コマンドを生成します。

リポジトリを見る

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

GraphQL Cop - GraphQL用セキュリティ監査ユーティリティ

GraphQL Cop

概要

GraphQL Copは、GraphQL APIに対して一般的なセキュリティテストを実行する軽量なPythonユーティリティです。GraphQL Copは、GraphQLのCI/CDチェックの実行に最適です。軽量で、GraphQLの興味深いセキュリティ問題をカバーしています。

GraphQL Copは、特定された脆弱性に対してcURLコマンドを提供することで、結果を再現できます。

必要条件

  • Python3
  • Requestsライブラリ

検出内容

  • エイリアスオーバーロード (DoS)
  • バッチクエリ (DoS)
  • GETベースのクエリ (CSRF)
  • URLエンコードされたペイロードを使用したPOSTベースのクエリ (CSRF)
  • GraphQLトレーシング/デバッグモード (情報漏洩)
  • フィールド重複 (DoS)
  • フィールドサジェスト (情報漏洩)
  • GraphiQL (情報漏洩)
  • イントロスペクション (情報漏洩)
  • ディレクティブオーバーロード (DoS)
  • イントロスペクションを使用した循環クエリ (DoS)
  • GETメソッド経由のミューテーションサポート (CSRF)

インストール

依存関係をインストールするには、以下のコマンドを実行してください。

root@kitploit:~
python3 -m venv path/to/venv
source path/to/venv/bin/activate
python3 -m pip install -r requirements.txt

最初のコマンドは、path/to/venvで指定されたディレクトリに仮想環境を作成します。 2番目のコマンドは仮想環境を有効にします。 最後のコマンドは、requirements.txtにリストされているすべてのPythonパッケージをインストールします。

使用方法

root@kitploit:~
$ 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)

Webサイトのテスト

root@kitploit:~
$ 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)

特定のテストを除外

root@kitploit:~
$ 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)

Webサイトをテストし、解析可能なJSON出力とcURL再現コマンドを出力

root@kitploit:~
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)を使用してWebサイトをテスト:

root@kitploit:~
$ 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. リポジトリをクローン:
root@kitploit:~
git clone https://github.com/dolevf/graphql-cop.git
cd graphql-cop
  1. Dockerイメージをビルド:
root@kitploit:~
docker build -t graphql-cop:latest .

Dockerコンテナの実行

以下のようにDockerコンテナを実行し、graphql-copスクリプトに引数を渡すことができます:

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

例

コンテナ実行の例は次のとおりです:

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

注意

利用可能なすべてのオプションの一覧を表示するには、以下を実行してください:

root@kitploit:~
docker run --rm -it graphql-cop:latest --help

トラブルシューティング

  1. ファイルが見つからないエラー:コンテナが実行するスクリプトを見つけられない場合、リポジトリ構造が完全で、Dockerfileが正しく設定されていることを確認してください。
  2. 依存関係の問題:依存関係が不足している場合は、requirements.txtファイルが完全であることを確認してください。
ツールをダウンロード