
Herramienta de fingerprinting del motor del servidor GraphQL que envía consultas benignas y malformadas para identificar la tecnología del backend y evaluar las defensas de seguridad a través de la GraphQL Threat Matrix.
graphw00f (inspirado en wafw00f) es la herramienta de fingerprinting GraphQL para endpoints GQL; envía una mezcla de consultas benignas y malformadas para determinar el motor GraphQL que se ejecuta detrás de escena. graphw00f hará uso del proyecto GraphQL Threat Matrix para proporcionar información sobre qué defensas de seguridad ofrece cada tecnología de forma nativa, y si están activadas o desactivadas por defecto.
Consultas especialmente diseñadas provocan que diferentes implementaciones de servidores GraphQL respondan de manera única a consultas, mutaciones y suscripciones, lo que hace trivial identificar el motor backend y distinguir entre las distintas implementaciones GraphQL. (CWE: CWE-200)
graphw00f soporta la detección y el fingerprinting de servidores GraphQL que utilizan consultas basadas en GET o POST.
Actualmente graphw00f intenta descubrir los siguientes motores GraphQL:
El proyecto graphw00f utiliza el Proyecto GraphQL Threat Matrix como su base de datos de matriz de seguridad tecnológica. Cuando graphw00f identifica exitosamente un endpoint GraphQL, imprimirá el documento de la matriz de amenazas. Este documento ayuda a los ingenieros de seguridad a identificar cuán madura es la tecnología, qué características de seguridad ofrece y si contiene algún 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.
No hay muchas configuraciones necesarias para graphw00f. Pero, si necesitas cosas como cabeceras de Autorización o Cookies configuradas para un endpoint en particular, usa el archivo conf.py.
# Custom Headers
HEADERS = {'User-Agent':'graphw00f'}
# Custom Cookies
COOKIES = {"PHPSESS":"DEADBEEF"}
El uso de --user-agent añade la clave User-Agent independientemente de si el archivo conf.py la tiene; si el archivo ya tiene una, el parámetro de línea de comandos la sobrescribe.
Este es un ejemplo de cómo hacer fingerprinting (-f) de un endpoint donde se conoce la ubicación de GraphQL de antemano (/graphql)
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.
Este es un ejemplo de cómo graphw00f puede detectar (-d) dónde reside GraphQL y luego ejecutar el proceso de fingerprinting (-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.
Cualquier incidencia con graphw00f, como falsos positivos, detecciones incorrectas, errores, etc., por favor crea un issue en GitHub con los detalles del entorno.
¿Quieres aprender más sobre GraphQL? Dirígete a mi otro proyecto y hackea GraphQL: Damn Vulnerable GraphQL Application