-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
header fuzzing support in http templates (#4114)
* Add headersPartType for fuzzing * fix nil pointer dereference for headless mode * minor changes+ add integration test * update template in fuzz-header-multiple --------- Co-authored-by: 0x123456789 <0x123456789> Co-authored-by: Tarun Koyalwar <[email protected]>
- Loading branch information
1 parent
bafde6c
commit c377221
Showing
10 changed files
with
308 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
id: fuzz-header-basic | ||
|
||
info: | ||
name: fuzz header basic | ||
author: pdteam | ||
severity: info | ||
description: | | ||
In this template we check for any reflection when fuzzing Origin header | ||
variables: | ||
first: "{{rand_int(10000, 99999)}}" | ||
|
||
http: | ||
- raw: | ||
- | | ||
GET /?x=aaa&y=bbb HTTP/1.1 | ||
Host: {{Hostname}} | ||
Origin: https://example.com | ||
X-Fuzz-Header: 1337 | ||
Cookie: z=aaa; bb=aaa | ||
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) | ||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 | ||
Accept-Language: en-US,en;q=0.9 | ||
Connection: close | ||
payloads: | ||
reflection: | ||
- "'\"><{{first}}" | ||
|
||
fuzzing: | ||
- part: headers | ||
type: replace | ||
mode: single | ||
keys: ["Origin"] | ||
fuzz: | ||
- "{{reflection}}" | ||
|
||
stop-at-first-match: true | ||
matchers-condition: and | ||
matchers: | ||
- type: word | ||
part: body | ||
words: | ||
- "{{reflection}}" | ||
|
||
- type: word | ||
part: header | ||
words: | ||
- "text/html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
id: fuzz-header-multiple | ||
|
||
info: | ||
name: fuzz header multiple | ||
author: pdteam | ||
severity: info | ||
description: | | ||
In this template we fuzz multiple headers with single payload | ||
http: | ||
- raw: | ||
- | | ||
GET /?x=aaa&y=bbb HTTP/1.1 | ||
Host: {{Hostname}} | ||
Origin: https://example.com | ||
X-Forwared-For: 1337 | ||
Cookie: z=aaa; bb=aaa | ||
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) | ||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 | ||
Accept-Language: en-US,en;q=0.9 | ||
Connection: close | ||
payloads: | ||
reflection: | ||
- "secret.local" | ||
|
||
fuzzing: | ||
- part: headers | ||
type: replace | ||
mode: multiple | ||
keys: ["Origin", "X-Forwared-For"] | ||
fuzz: | ||
- "{{reflection}}" | ||
|
||
stop-at-first-match: true | ||
matchers-condition: and | ||
matchers: | ||
- type: word | ||
part: body | ||
words: | ||
- "admin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.