Skip to content

Commit 91f3716

Browse files
Merge pull request #37 from adarsh-jha-dev/patch-1
[fix] #659 : Add Host Header Manipulation Test
2 parents 479daef + 7797054 commit 91f3716

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
id: HOST_HEADER_MANIPULATION
2+
info:
3+
name: Host Header Manipulation
4+
description: "Test for Host Header Manipulation vulnerability to create/update entities."
5+
details: >
6+
"This test aims to identify potential security vulnerabilities related to Host Header Manipulation. It checks if an attacker can create/update entities by manipulating the HTTP headers. The test focuses on adding or replacing values such as 'host' with 'localhost' or '127.0.0.1' in HTTP headers. Additionally, it sets various header values related to the attacker's domain. The presence of these manipulated headers can indicate a security vulnerability. The test will be considered successful if the application responds with exception traces or error response strings."
7+
8+
impact: "Host Header Manipulation can lead to unauthorized entity creation or updates, compromising the application's security."
9+
10+
category:
11+
name: SM
12+
shortName: Misconfiguration
13+
displayName: Security Misconfiguration (SM)
14+
subCategory: HOST_HEADER_MANIPULATION
15+
severity: HIGH
16+
tags:
17+
- Business logic
18+
- OWASP top 10
19+
- HackerOne top 10
20+
references:
21+
- "https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers"
22+
- "https://portswigger.net/web-security/host-header/exploiting"
23+
24+
cwe:
25+
- CWE-123
26+
27+
api_selection_filters:
28+
or:
29+
- request_method:
30+
eq: POST
31+
- request_method:
32+
eq: PUT
33+
request_headers:
34+
for_one:
35+
key:
36+
eq: Host
37+
value:
38+
contains_either:
39+
- localhost
40+
- 127.0.0.1
41+
query_param:
42+
for_one:
43+
key:
44+
eq: create
45+
value:
46+
eq: true
47+
48+
execute:
49+
type: single
50+
requests:
51+
- req:
52+
- add_header:
53+
Host: localhost
54+
- add_header:
55+
Host: 127.0.0.1
56+
- add_header:
57+
X-Forwarded-For: evil-website.com
58+
- add_header:
59+
X-Forwarded-Host: evil-website.com
60+
- add_header:
61+
X-Client-IP: evil-website.com
62+
- add_header:
63+
X-Remote-IP: evil-website.com
64+
- add_header:
65+
X-Remote-Addr: evil-website.com
66+
- add_header:
67+
X-Host: evil-website.com
68+
69+
validate:
70+
response_payload:
71+
not_contains_either:
72+
- "Exception Trace"
73+
- "Error Response"
74+
response_code:
75+
not_contains_either:
76+
- 500
77+
- 503

0 commit comments

Comments
 (0)