|
| 1 | +## Vulnerable Application |
| 2 | + |
| 3 | +This module scans GraphQL endpoints to check if they have enabled introspection. |
| 4 | +This allows for gathering the schema for the endpoint, potentially leading to information disclosure. |
| 5 | +The module stores this as a vulnerability, and can also store the dumped schema as loot. |
| 6 | + |
| 7 | +### Creating a Vulnerable Environment |
| 8 | +You can either target a public GraphQL endpoint present here: https://github.com/graphql-kit/graphql-apis |
| 9 | +Or set up a local server by following a tutorial here: https://www.apollographql.com/docs/apollo-server/getting-started |
| 10 | + |
| 11 | +## Options |
| 12 | + |
| 13 | +### TARGETURI |
| 14 | + |
| 15 | +The GraphQL endpoint URI, which will receive the POST requests. |
| 16 | + |
| 17 | +## Verification Steps |
| 18 | + |
| 19 | +1. Do: run `msfconsole` |
| 20 | +2. Do: use `auxiliary/scanner/http/graphql_introspection_scanner` |
| 21 | +3. Do: set `RHOSTS [IP]` |
| 22 | +4. Do: set `TARGETURI [URI]` |
| 23 | +5. Do: `run` |
| 24 | + |
| 25 | +## Scenarios |
| 26 | + |
| 27 | +### Apollo Server - JavaScript |
| 28 | +``` |
| 29 | +auxiliary(scanner/http/graphql_introspection_scanner) > check rport=4001 |
| 30 | +[+] 127.0.0.1:4001 - The target is vulnerable. The server has introspection enabled. |
| 31 | +
|
| 32 | +auxiliary(scanner/http/graphql_introspection_scanner) > run rport=4001 |
| 33 | +[*] Running module against 127.0.0.1 |
| 34 | +[+] 127.0.0.1:4001 - Server responded with introspected data. Reporting a vulnerability, and storing it as loot. |
| 35 | +[*] Auxiliary module execution completed |
| 36 | +
|
| 37 | +auxiliary(scanner/http/graphql_introspection_scanner) > vulns |
| 38 | +
|
| 39 | +Vulnerabilities |
| 40 | +=============== |
| 41 | +
|
| 42 | +Timestamp Host Name References |
| 43 | +--------- ---- ---- ---------- |
| 44 | +2025-05-27 16:12:25 UTC 127.0.0.1 GraphQL Information Disclosure through Introspection URL-https://portswigger.net/web-security/graphql,URL-https://graphql.o |
| 45 | + rg/learn/introspection/ |
| 46 | +2025-05-27 16:12:34 UTC 127.0.0.1 GraphQL Introspection Scanner URL-https://portswigger.net/web-security/graphql,URL-https://graphql.o |
| 47 | + rg/learn/introspection/ |
| 48 | +``` |
| 49 | + |
| 50 | +### Graphloc |
| 51 | +``` |
| 52 | +auxiliary(scanner/http/graphql_introspection_scanner) > run rhost=https://graphloc.com/ |
| 53 | +[*] Running module against 151.101.1.195 |
| 54 | +[*] 151.101.1.195:443 - Server responded with introspected data. Reporting a vulnerability, and storing it as loot. |
| 55 | +``` |
| 56 | + |
| 57 | +### catalysis-hub |
| 58 | +``` |
| 59 | +uxiliary(scanner/http/graphql_introspection_scanner) > run rhost=https://api.catalysis-hub.org/graphql? |
| 60 | +[*] Running module against 3.33.161.45 |
| 61 | +[*] 3.33.161.45:443 - Server responded with introspected data. Reporting a vulnerability, and storing it as loot. |
| 62 | +``` |
0 commit comments