Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
graphql-cop — Utilità Python leggera per il controllo di sicurezza automatizzato delle API GraphQL. Rileva configurazioni errate, fughe di informazioni e vulnerabilità di denial-of-service con comandi di riproduzione cURL. | Kitploit
Strumenti/GitHubGitHub/dolevf/graphql-cop
Scanner di VulnerabilitàScanner di Vulnerabilità WebAnalisi Dinamica del Codice (DAST)Sfruttamento di Applicazioni WebTest di Sicurezza delle APISicurezza WebPenetration TestingSicurezza delle APITop in Sicurezza delle API n.5Top in Test di Sicurezza delle API n.5
684101910 mesi faRevisionato da Kitploit
Top in Analisi Dinamica del Codice (DAST) n.15
Top in Sfruttamento di Applicazioni Web n.16
Top in Sicurezza Web n.15
Top in Scanner di Vulnerabilità Web n.15
GitHubdolevf/graphql-cop

graphql-cop

Utilità Python leggera per il controllo di sicurezza automatizzato delle API GraphQL. Rileva configurazioni errate, fughe di informazioni e vulnerabilità di denial-of-service con comandi di riproduzione cURL.

Vedi Repository

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

GraphQL Cop - Utility di Audit di Sicurezza per GraphQL

GraphQL Cop

Informazioni

GraphQL Cop è un piccolo utility Python per eseguire test di sicurezza comuni contro API GraphQL. GraphQL Cop è perfetto per eseguire controlli CI/CD in GraphQL. È leggero e copre problemi di sicurezza interessanti in GraphQL.

GraphQL Cop ti permette di riprodurre i risultati fornendo comandi cURL per ogni vulnerabilità identificata.

Requisiti

  • Python3
  • Libreria Requests

Rilevazioni

  • Sovraccarico alias (DoS)
  • Query batch (DoS)
  • Query basate su GET (CSRF)
  • Query basate su POST con payload urlencoded (CSRF)
  • Modalità di tracciamento/debug di GraphQL (Fuga di informazioni)
  • Duplicazione di campi (DoS)
  • Suggerimenti sui campi (Fuga di informazioni)
  • GraphiQL (Fuga di informazioni)
  • Introspezione (Fuga di informazioni)
  • Sovraccarico di direttive (DoS)
  • Query circolare tramite introspezione (DoS)
  • Supporto alle mutazioni tramite metodi GET (CSRF)

Installazione

I comandi seguenti devono essere eseguiti per installare le dipendenze.

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

Il primo comando crea un ambiente virtuale nella directory specificata da path/to/venv.
Il secondo comando attiva l'ambiente virtuale.
L'ultimo comando installa tutti i pacchetti Python elencati nel file requirements.txt.

Utilizzo

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)

Test di un sito 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)

Escludi un test specifico

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)

Testa un sito web, esporta in output JSON analizzabile, comando cURL di riproduzione

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'}]

Testa un sito web attraverso un proxy (es. Burp Suite in ascolto su 127.0.0.1:8080) con intestazioni personalizzate (es. Authorization):

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)

Configurazione e Utilizzo con Docker

Prerequisiti

  • Docker installato sulla tua macchina.

Creazione dell'immagine Docker

  1. Clona il repository:
root@kitploit:~
git clone https://github.com/dolevf/graphql-cop.git
cd graphql-cop
  1. Crea l'immagine Docker:
root@kitploit:~
docker build -t graphql-cop:latest .

Esecuzione del container Docker

Puoi eseguire il container Docker e passare argomenti allo script graphql-cop come segue:

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

Esempio

Ecco un esempio di esecuzione del container:

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

Nota

Per un elenco di tutte le opzioni disponibili, esegui:

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

Risoluzione dei problemi

  1. Errore File non trovato: Se il container non riesce a trovare lo script da eseguire, assicurati che la struttura del repository sia intatta e che il Dockerfile sia configurato correttamente.
  2. Problema di dipendenze: Se mancano delle dipendenze, verifica che il file requirements.txt sia completo.
Scarica lo strumento