Skip to content

Commit 3ce72ad

Browse files
authored
Merge pull request #1630 from HackTricks-wiki/update_InQL_v6_1_0_Just_Landed_with_New_Features_and_Cont_20251203_183031
InQL v6.1.0 Just Landed with New Features and Contribution S...
2 parents 39edc55 + d1f58d3 commit 3ce72ad

File tree

1 file changed

+39
-0
lines changed
  • src/network-services-pentesting/pentesting-web

1 file changed

+39
-0
lines changed

src/network-services-pentesting/pentesting-web/graphql.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,43 @@ file:* mutation
437437
file:* query
438438
```
439439

440+
### Error-based schema reconstruction & engine fingerprinting (InQL v6.1+)
441+
442+
When introspection is blocked, **InQL v6.1+** can now reconstruct the reachable schema purely from error feedback. The new *schema bruteforcer* batches candidate field/argument names from a configurable wordlist and sends them in multi-field operations to reduce HTTP chatter. Useful error patterns are then harvested automatically:
443+
444+
- `Field 'bugs' not found on type 'inql'` confirms the existence of the parent type while discarding invalid field names.
445+
- `Argument 'contribution' is required` shows that an argument is mandatory and exposes its spelling.
446+
- Suggestion hints such as `Did you mean 'openPR'?` are fed back into the queue as validated candidates.
447+
- By intentionally sending values with the wrong primitive (e.g., integers for strings) the bruteforcer provokes type mismatch errors that leak the real type signature, including list/object wrappers like `[Episode!]`.
448+
449+
The bruteforcer keeps recursing over any type that yields new fields, so a wordlist that mixes generic GraphQL names with app-specific guesses will eventually map large chunks of the schema without introspection. Runtime is limited mostly by rate limiting and candidate volume, so fine-tuning the InQL settings (wordlist, batch size, throttling, retries) is critical for stealthier engagements.
450+
451+
In the same release, InQL ships a **GraphQL engine fingerprinter** (borrowing signatures from tools like `graphw00f`). The module dispatches deliberately invalid directives/queries and classifies the backend by matching the exact error text. For example:
452+
453+
```graphql
454+
query @deprecated {
455+
__typename
456+
}
457+
```
458+
459+
- Apollo replies with `Directive "@deprecated" may not be used on QUERY.`
460+
- GraphQL Ruby answers `'@deprecated' can't be applied to queries`.
461+
462+
Once an engine is recognized, InQL surfaces the corresponding entry from the [GraphQL Threat Matrix](https://github.com/nicholasaleks/graphql-threat-matrix), helping testers prioritize weaknesses that ship with that server family (default introspection behavior, depth limits, CSRF gaps, file uploads, etc.).
463+
464+
Finally, **automatic variable generation** removes a classic blocker when pivoting into Burp Repeater/Intruder. Whenever an operation requires a variables JSON, InQL now injects sane defaults so the request passes schema validation on the first send:
465+
466+
```text
467+
"String" -> "exampleString"
468+
"Int" -> 42
469+
"Float" -> 3.14
470+
"Boolean" -> true
471+
"ID" -> "123"
472+
ENUM -> first declared value
473+
```
474+
475+
Nested input objects inherit the same mapping, so you immediately get a syntactically and semantically valid payload that can be fuzzed for SQLi/NoSQLi/SSRF/logic bypasses without manually reverse-engineering every argument.
476+
440477
## CSRF in GraphQL
441478

442479
If you don't know what CSRF is read the following page:
@@ -718,5 +755,7 @@ https://graphql-dashboard.herokuapp.com/
718755
- [**https://portswigger.net/web-security/graphql**](https://portswigger.net/web-security/graphql)
719756
- [**https://github.com/advisories/GHSA-5gc2-7c65-8fq8**](https://github.com/advisories/GHSA-5gc2-7c65-8fq8)
720757
- [**https://github.com/escape-tech/graphql-armor**](https://github.com/escape-tech/graphql-armor)
758+
- [**https://blog.doyensec.com/2025/12/02/inql-v610.html**](https://blog.doyensec.com/2025/12/02/inql-v610.html)
759+
- [**https://github.com/nicholasaleks/graphql-threat-matrix**](https://github.com/nicholasaleks/graphql-threat-matrix)
721760

722761
{{#include ../../banners/hacktricks-training.md}}

0 commit comments

Comments
 (0)