GraphQL

ko-fiarrow-up-right

Found a target using GraphQL?

  1. Run the introspection query to map out all methods

  2. Use GraphQL Voyager to display all methods

  3. Use BatchQL or the InQL extension to test all methods for IDORs, SQLi, SSRF, etc

Definition

  • Query is an operation to retrieve data (read).

  • Mutation is an operation used to submit and write data (create, update, and delete).

  • Subscription is an operation used to send data (read) when an event occurs. Subscription is a way for GraphQL clients to listen to live updates from the server.

Detection

Basics

Fingerprinting

Scan

Introspection enabled

Introspection disabled

Error Messages

JS Files

  1. Download all js files to directory js_files

  2. Run this command:

Scan endpoints

Wordlists

IDOR

IDORchevron-right

Change the internalId field

Add extra field

Initial query

Modified query

Path Traversal

File Inclusion LFI / RFIchevron-right

Mass Asignement - mutation

Mass Assignmentchevron-right

Initial query

Modified query - role added

CSRF

Bypassing rate limits

Batching attack

Tool: batchql

SQL injection

Get all informations about the API schema:

Ex:

SQL injection - Time based

Automated - Graphqlmap

NoSQL Injection

NoSQL injectionchevron-right

Use $regex, $ne frominside a search parameter.

LDAP Injection

LDAP Injectionchevron-right

Command injection

Command Injectionchevron-right

XSS

XSSchevron-right

HTML Injection

DoS throught batched queries

Wordlists

GraphQL Raider - Burp Extension

InQL

Burp Extension

CLI

Tools

Interesting Book

circle-info

Disclaimer: As an Amazon Associate, I earn from qualifying purchases. This helps support this GitBook project at no extra cost to you.

Support this Gitbook

I hope it helps you as much as it has helped me. If you can support me in any way, I would deeply appreciate it.

ko-fiarrow-up-right

buymeacoffeearrow-up-right

Interesting Reports

1. https://hackerone.com/reports/2048725arrow-up-right

2. https://hackerone.com/reports/2524939arrow-up-right

3. https://hackerone.com/reports/2357012arrow-up-right

4. https://hackerone.com/reports/2122671arrow-up-right

5. https://hackerone.com/reports/2207248arrow-up-right

6. https://hackerone.com/reports/1864188arrow-up-right

7. https://hackerone.com/reports/1085332arrow-up-right

8. https://hackerone.com/reports/1084904arrow-up-right

9. https://hackerone.com/reports/1293377arrow-up-right

10. https://hackerone.com/reports/1192460arrow-up-right

Resources

Last updated