| name | testing-for-host-header-injection |
| description | Test web applications for HTTP Host header injection vulnerabilities to identify password reset poisoning, web cache poisoning, SSRF, and virtual host routing manipulation risks. Use when testing web applications for http host header injection vulnerabilities to. |
| domain | cybersecurity |
| tags | ["host-header-injection","password-reset-poisoning","cache-poisoning","virtual-host","web-security","header-manipulation","ssrf"] |
| subdomain | web-application-security |
| version | 1.0 |
| author | oyi77 |
| license | Apache-2.0 |
| nist_csf | ["PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01"] |
Testing For Host Header Injection
Overview
Cybersecurity skill for testing for host header injection. Follows industry best practices and security standards.
When to Use
Trigger phrases:
-
"testing for host header injection"
-
"Test web applications for HTTP Host header injection vulnerabilities to identify"
-
When testing password reset functionality for token theft via host manipulation
-
During assessment of web caching behavior influenced by Host header values
-
When testing virtual host routing and server-side request processing
-
During penetration testing of applications behind reverse proxies or load balancers
-
When evaluating SSRF potential through Host header manipulation
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Burp Suite for intercepting and modifying Host headers
- Understanding of HTTP Host header role in virtual hosting and routing
- Knowledge of alternative host headers (X-Forwarded-Host, X-Host, X-Original-URL)
- Access to an attacker-controlled domain for receiving poisoned requests
- Burp Collaborator or interact.sh for out-of-band detection
- Multiple test accounts for password reset testing
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Workflow
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: ) -> :
{k: re.findall(v, text) k, v IOC_PATTERNS.items()}