
Strumento di fingerprinting del motore server GraphQL che invia query benigne e malformate per identificare la tecnologia backend e valutare le difese di sicurezza tramite la GraphQL Threat Matrix.
graphw00f (ispirato da wafw00f) è lo strumento di riconoscimento di GraphQL per endpoint GQL. Invia una combinazione di query benigne e malformate per determinare il motore GraphQL in esecuzione dietro le quinte. graphw00f sfrutta il progetto GraphQL Threat Matrix per fornire informazioni sulle difese di sicurezza offerte da ciascuna tecnologia e se sono attivate o disattivate per impostazione predefinita.
Query appositamente create provocano risposte uniche da diverse implementazioni del server GraphQL, rendendo così banale il riconoscimento del motore backend e la distinzione tra le varie implementazioni GraphQL. (CWE: CWE-200)
graphw00f supporta il rilevamento e il riconoscimento di server GraphQL che utilizzano query basate su GET o POST.
graphw00f cerca attualmente di scoprire i seguenti motori GraphQL:
Il progetto graphw00f utilizza il Progetto GraphQL Threat Matrix come database della matrice di sicurezza delle tecnologie. Quando graphw00f riconosce con successo un endpoint GraphQL, stampa il documento della matrice delle minacce. Questo documento aiuta gli ingegneri della sicurezza a identificare il livello di maturità della tecnologia, le sue funzionalità di sicurezza e se contiene 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.
Non ci sono molte configurazioni necessarie per graphw00f. Tuttavia, se hai bisogno di impostare intestazioni di Autorizzazione o Cookie per un endpoint specifico, usa il file conf.py.
# Custom Headers
HEADERS = {'User-Agent':'graphw00f'}
# Custom Cookies
COOKIES = {"PHPSESS":"DEADBEEF"}
Usando --user-agent si aggiunge la chiave User-Agent indipendentemente dal fatto che il file conf.py la contenga; se il file la contiene già, il parametro da riga di comando la sovrascrive.
Questo è un esempio di come riconoscere (-f) un endpoint di cui è nota la posizione di GraphQL (/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.
Questo è un esempio di come graphw00f può rilevare (-d) dove si trova GraphQL e poi eseguire il processo di riconoscimento (-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.
Per qualsiasi problema con graphw00f, come falsi positivi, rilevamenti imprecisi, bug, ecc., crea una segnalazione su GitHub con i dettagli dell'ambiente.
Vuoi saperne di più su GraphQL? Dai un'occhiata al mio altro progetto e metti alla prova GraphQL: Damn Vulnerable GraphQL Application