
良性および不正なクエリを送信してバックエンド技術を特定し、GraphQL Threat Matrixを介してセキュリティ防御を評価するGraphQLサーバーエンジンフィンガープリンティングツール。
graphw00f(wafw00fに触発された)は、GQLエンドポイント向けのGraphQLフィンガープリンティングツールです。正常なクエリと不正なクエリを混在して送信し、バックエンドで動作しているGraphQLエンジンを特定します。graphw00fはGraphQL Threat Matrixプロジェクトを利用して、各テクノロジーが標準で提供するセキュリティ防御機能と、それらがデフォルトで有効か無効かについての洞察を提供します。
特別に細工されたクエリは、さまざまなGraphQLサーバーの実装がクエリ、ミューテーション、サブスクリプションに対して独自の応答を返す原因となります。これにより、バックエンドエンジンのフィンガープリンティングと、さまざまなGraphQL実装の識別が容易になります。(CWE: CWE-200)
graphw00fは、GETベースまたはPOSTベースのクエリを使用するGraphQLサーバーの検出とフィンガープリンティングをサポートしています。
graphw00fは現在、以下のGraphQLエンジンの検出を試みます。
graphw00fプロジェクトは、GraphQL Threat Matrix Projectをテクノロジーセキュリティマトリックスデータベースとして使用しています。graphw00fがGraphQLエンドポイントのフィンガープリンティングに成功すると、脅威マトリックスドキュメントが出力されます。このドキュメントは、セキュリティエンジニアがテクノロジーの成熟度、提供するセキュリティ機能、およびCVEが含まれているかどうかを特定するのに役立ちます。

git clone https://github.com/dolevf/graphw00f.git
Usage: main.py -d -f -t http://example.com
Options:
-h, --help show this help message and exit
-r, --noredirect Do not follow redirections given by 3xx responses
-t URL, --target=URL target url with the path
-f, --fingerprint fingerprint mode
-d, --detect detect mode
-p PROXY, --proxy=PROXY
HTTP(S) proxy URL in the form
http://user:pass@host:port
-T TIMEOUT, --timeout=TIMEOUT
Request timeout in seconds
-o OUTPUT_FILE, --output-file=OUTPUT_FILE
Output results to a file (CSV)
-l, --list List all GraphQL technologies graphw00f is able to
detect
-u USERAGENT, --user-agent=USERAGENT
Custom user-agent to use (overrides the one from
headers configuration)
-H HEADER, --header=HEADER
Custom headers to send (e.g. "Authorization: Bearer
ey...").
-w WORDLIST, --wordlist=WORDLIST
Path to a list of custom GraphQL endpoints
-v, --version Print out the current version and exit.
graphw00fには多くの設定は必要ありません。ただし、特定のエンドポイントに対してAuthorizationヘッダーやCookieを設定する必要がある場合は、conf.pyファイルを使用してください。
# Custom Headers
HEADERS = {'User-Agent':'graphw00f'}
# Custom Cookies
COOKIES = {"PHPSESS":"DEADBEEF"}
--user-agentを使用すると、conf.pyファイルにUser-Agentキーがあるかどうかに関わらず追加されます。ファイルにすでにキーが存在する場合、コマンドラインパラメータがそれを上書きします。
これは、GraphQLの場所が事前にわかっているエンドポイント(/graphql)をフィンガープリントする(-f)例です。
python3 main.py -f -t https://demo.hypergraphql.org:8484/graphql
+-------------------+
| graphw00f |
+-------------------+
*** ***
** ***
** **
+--------------+ +--------------+
| Node X | | Node Y |
+--------------+ +--------------+
*** ***
** **
** **
+------------+
| Node Z |
+------------+
graphw00f - v1.0.7
The fingerprinting tool for GraphQL
Dolev Farhi <[email protected]>
[*] Checking if GraphQL is available at https://demo.hypergraphql.org:8484/graphql...
[*] Found GraphQL...
[*] Attempting to fingerprint...
[*] Discovered GraphQL Engine: (HyperGraphQL)
[!] Attack Surface Matrix: https://github.com/dolevf/graphw00f/blob/main/docs/hypergraphql.md
[!] Technologies: Java
[!] Homepage: https://www.hypergraphql.org
[*] Completed.
これは、graphw00fがGraphQLの存在を検出(-d)してからフィンガープリンティング処理(-f)を実行する例です。
python3 main.py -f -d -t http://localhost:5000
+-------------------+
| graphw00f |
+-------------------+
*** ***
** ***
** **
+--------------+ +--------------+
| Node X | | Node Y |
+--------------+ +--------------+
*** ***
** **
** **
+------------+
| Node Z |
+------------+
graphw00f - v1.1.2
The fingerprinting tool for GraphQL
Dolev Farhi <[email protected]>
[*] Checking http://dvga.example.local:5000/graphql
[!] Found GraphQL at http://dvga.example.local:5000/graphql
[*] Attempting to fingerprint...
[*] Discovered GraphQL Engine: (Graphene)
[!] Attack Surface Matrix: https://github.com/nicholasaleks/graphql-threat-matrix/blob/master/implementations/graphene.md
[!] Technologies: Python
[!] Homepage: https://graphene-python.org
[*] Completed.
graphw00fに関する問題(誤検知、不正確な検出、バグなど)がある場合は、環境の詳細を添えてGitHub Issueを作成してください。
GraphQLについてもっと学びたいですか?私の別のプロジェクトにアクセスして、GraphQLをハッキングしてみましょう:Damn Vulnerable GraphQL Application