You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[JSON list based batching](#json-list-based-batching)
23
-
-[Query name based batching](#query-name-based-batching)
22
+
-[JSON List Based Batching](#json-list-based-batching)
23
+
-[Query Name Based Batching](#query-name-based-batching)
24
24
-[Injections](#injections)
25
-
-[NOSQL injection](#nosql-injection)
26
-
-[SQL injection](#sql-injection)
25
+
-[NOSQL Injection](#nosql-injection)
26
+
-[SQL Injection](#sql-injection)
27
27
-[Labs](#labs)
28
28
-[References](#references)
29
29
@@ -46,9 +46,9 @@
46
46
47
47
## Enumeration
48
48
49
-
### Common GraphQL endpoints
49
+
### Common GraphQL Endpoints
50
50
51
-
Most of the time the graphql is located on the `/graphql` or `/graphiql` endpoint.
51
+
Most of the time GraphQL is located at the `/graphql` or `/graphiql` endpoint.
52
52
A more complete list is available at [danielmiessler/SecLists/graphql.txt](https://github.com/danielmiessler/SecLists/blob/fe2aa9e7b04b98d94432320d09b5987f39a17de8/Discovery/Web-Content/graphql.txt).
53
53
54
54
```ps1
@@ -63,7 +63,7 @@ A more complete list is available at [danielmiessler/SecLists/graphql.txt](https
63
63
```
64
64
65
65
66
-
### Identify an injection point
66
+
### Identify An Injection Point
67
67
68
68
```js
69
69
example.com/graphql?query={__schema{types{name}}}
@@ -211,7 +211,7 @@ You can also try to bruteforce known keywords, field and type names using wordli
211
211
212
212
213
213
214
-
### Enumerate the types' definition
214
+
### Enumerate Types Definition
215
215
216
216
Enumerate the definition of interesting types using the following GraphQL query, replacing "User" with the chosen type
217
217
@@ -220,7 +220,7 @@ Enumerate the definition of interesting types using the following GraphQL query,
Mutations work like function, you can use them to interact with the GraphQL.
287
287
@@ -299,7 +299,7 @@ Common scenario:
299
299
* 2FA bypassing
300
300
301
301
302
-
#### JSON list based batching
302
+
#### JSON List Based Batching
303
303
304
304
> Query batching is a feature of GraphQL that allows multiple queries to be sent to the server in a single HTTP request. Instead of sending each query in a separate request, the client can send an array of queries in a single POST request to the GraphQL server. This reduces the number of HTTP requests and can improve the performance of the application.
305
305
@@ -323,7 +323,7 @@ Query batching works by defining an array of operations in the request body. Eac
323
323
```
324
324
325
325
326
-
#### Query name based batching
326
+
#### Query Name Based Batching
327
327
328
328
```json
329
329
{
@@ -348,7 +348,7 @@ mutation {
348
348
> SQL and NoSQL Injections are still possible since GraphQL is just a layer between the client and the database.
349
349
350
350
351
-
### NOSQL injection
351
+
### NOSQL Injection
352
352
353
353
Use `$regex`, `$ne` from []() inside a `search` parameter.
354
354
@@ -364,7 +364,7 @@ Use `$regex`, `$ne` from []() inside a `search` parameter.
364
364
```
365
365
366
366
367
-
### SQL injection
367
+
### SQL Injection
368
368
369
369
Send a single quote `'` inside a graphql parameter to trigger the SQL injection
***Burp Suite**: Manually modify requests to test duplicate parameters.
17
+
***OWASP ZAP**: Intercept and manipulate HTTP parameters.
16
18
17
-
## How to test
18
19
19
-
HPP allows an attacker to bypass pattern based/black list proxies or Web Application Firewall detection mechanisms. This can be done with or without the knowledge of the web technology behind the proxy, and can be achieved through simple trial and error.
20
+
## Methodology
20
21
21
-
```
22
-
Example scenario.
23
-
WAF - Reads first param
24
-
Origin Service - Reads second param. In this scenario, developer trusted WAF and did not implement sanity checks.
22
+
HTTP Parameter Pollution (HPP) is a web security vulnerability where an attacker injects multiple instances of the same HTTP parameter into a request. The server's behavior when processing duplicate parameters can vary, potentially leading to unexpected or exploitable behavior.
23
+
24
+
HPP can target two levels:
25
+
26
+
* Client-Side HPP: Exploits JavaScript code running on the client (browser).
27
+
* Server-Side HPP: Exploits how the server processes multiple parameters with the same name.
25
28
26
-
Attacker -- http://example.com?search=Beth&search=' OR 1=1;## --> WAF (reads first 'search' param, looks innocent. passes on) --> Origin Service (reads second 'search' param, injection happens if no checks are done here.)
0 commit comments