Skip to content
KitploitKITPLOIT
ToolsBlog
Einreichen
ToolsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
graphql-cop — Leichtgewichtiges Python-Werkzeug für automatisierte Sicherheitsaudits von GraphQL-APIs. Erkennt Fehlkonfigurationen, Informationslecks und Denial-of-Service-Schwachstellen mit cURL-Wiederholungsbefehlen. | Kitploit
Tools/GitHubGitHub/dolevf/graphql-cop
SchwachstellenscannerAPI-SicherheitstestsWebsicherheitPenetrationstests
GitHubdolevf/graphql-cop

graphql-cop

Leichtgewichtiges Python-Werkzeug für automatisierte Sicherheitsaudits von GraphQL-APIs. Erkennt Fehlkonfigurationen, Informationslecks und Denial-of-Service-Schwachstellen mit cURL-Wiederholungsbefehlen.

Repository anzeigen
684101vor 9 MonatenVon Kitploit geprüft

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

GraphQL Cop - Sicherheitsaudit-Dienstprogramm für GraphQL

GraphQL Cop

Über

GraphQL Cop ist ein kleines Python-Dienstprogramm zum Durchführen gängiger Sicherheitstests gegen GraphQL-APIs. GraphQL Cop eignet sich perfekt für CI/CD-Prüfungen in GraphQL. Es ist leichtgewichtig und deckt interessante Sicherheitsprobleme in GraphQL ab.

GraphQL Cop ermöglicht es Ihnen, die Ergebnisse zu reproduzieren, indem es cURL-Befehle für jeden identifizierten Sicherheitslücken bereitstellt.

Anforderungen

  • Python3
  • Requests-Bibliothek

Erkennungen

  • Alias-Überlastung (DoS)
  • Batch-Abfragen (DoS)
  • GET-basierte Abfragen (CSRF)
  • POST-basierte Abfragen mit urlencodierten Payloads (CSRF)
  • GraphQL Tracing / Debug-Modi (Informationsleck)
  • Feldduplizierung (DoS)
  • Feldvorschläge (Informationsleck)
  • GraphiQL (Informationsleck)
  • Introspection (Informationsleck)
  • Direktivenüberladung (DoS)
  • Zirkuläre Abfrage mittels Introspection (DoS)
  • Unterstützung von Mutationen über GET-Methoden (CSRF)

Installation

Die folgenden Befehle sollten ausgeführt werden, um Abhängigkeiten zu installieren.

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

Der erste Befehl erstellt eine virtuelle Umgebung im durch path/to/venv angegebenen Verzeichnis. Der zweite Befehl aktiviert die virtuelle Umgebung. Der letzte Befehl installiert alle in der requirements.txt aufgeführten Python-Pakete.

Verwendung

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)

Eine Website testen

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)

Einen bestimmten Test ausschließen

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)

Eine Website testen, in ein parse-fähiges JSON-Format ausgeben, cURL-Reproduktionsbefehl

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

Eine Website über einen Proxy testen (z. B. Burp Suite, die auf 127.0.0.1:8080 lauscht) mit benutzerdefinierten Headern (z. B. 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)

Docker-Setup und Verwendung

Voraussetzungen

  • Docker auf Ihrem Rechner installiert.

Docker-Image erstellen

  1. Repository klonen:
root@kitploit:~
git clone https://github.com/dolevf/graphql-cop.git
cd graphql-cop
  1. Docker-Image erstellen:
root@kitploit:~
docker build -t graphql-cop:latest .

Docker-Container ausführen

Sie können den Docker-Container ausführen und Argumente an das graphql-cop-Skript wie folgt übergeben:

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

Beispiel

Hier ist ein Beispiel für die Ausführung des Containers:

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

Hinweis

Für eine Liste aller verfügbaren Optionen führen Sie folgenden Befehl aus:

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

Fehlerbehebung

  1. Datei nicht gefunden: Wenn der Container das auszuführende Skript nicht finden kann, stellen Sie sicher, dass die Repository-Struktur intakt und das Dockerfile korrekt eingerichtet ist.
  2. Abhängigkeitsproblem: Falls Abhängigkeiten fehlen, überprüfen Sie, ob die requirements.txt-Datei vollständig ist.
Tool herunterladen