testing-for-host-header-injection

Detect HTTP Host header injection vulnerabilities during authorized security testing.

Updated Jan 29, 2024
One-click install
npx skills add https://github.com/riandeoliveira/aspnet-template --skill testing-for-host-header-injection-riandeoliveira
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-for-host-header-injection
Source: https://github.com/riandeoliveira/aspnet-template/tree/main/.claude/skills/testing-for-host-header-injection
Command: npx skills add https://github.com/riandeoliveira/aspnet-template --skill testing-for-host-header-injection-riandeoliveira

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Host header injection can let attackers poison password-reset links, corrupt caches with attacker-controlled content, trigger SSRF to internal services, and manipulate virtual host routing.

Core Features & Use Cases

  • Password reset poisoning checks: Detects whether changing Host or common proxy-forwarded headers causes reset responses to include attacker-controlled hosts.
  • Cache poisoning evaluation: Looks for evidence that host-related headers influence cached responses and persist attacker-controlled content.
  • SSRF and virtual-host manipulation testing: Probes whether backend request behavior or routing changes when Host is set to internal-looking values.

Quick Start

Run the agent against your target URL to generate a JSON report of reflection, password-reset poisoning, and cache poisoning signals.

Frequently Asked Questions about testing-for-host-header-injection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for Host header injection vulnerabilities in web applications?

Host header injection testing involves sending crafted Host and proxy-forwarded headers like X-Forwarded-Host to observable endpoints to detect reflected values and suspected poisoning outcomes including password reset manipulation, cache poisoning, SSRF, and virtual host routing changes.

What is password reset poisoning and how do I check if my application is vulnerable?

Password reset poisoning occurs when changing the Host or proxy-forwarded headers causes reset responses to include attacker-controlled hosts. You detect it by sending crafted headers to reset endpoints and reviewing the structured JSON report for malicious link generation.

Does this Host header injection test require the Python requests library?

Yes, the testing script requires the Python requests library to send crafted HTTP headers to target web applications and reverse proxies. You must have this dependency installed to execute the probes and generate the structured vulnerability report.

Can I use this to detect web cache poisoning and SSRF via alternative host headers?

Yes, you can detect web cache poisoning and SSRF by probing backend request behavior and routing when the Host header is set to internal-looking values. The tool evaluates whether host-related headers influence cached responses or trigger internal service requests.

What is the best way to find virtual host routing manipulation issues on reverse proxies?

The best way to find virtual host routing manipulation is to probe reverse proxies and load balancers with crafted Host and Forwarded headers, observing whether backend request routing changes when assigned internal-looking values.

What limitations should I be aware of when testing for host header injection?

Host header injection testing requires authorized security testing of target web applications and their reverse proxies or load balancers. You must ensure explicit permission before sending crafted headers to probe SSRF and routing behavior, as it can alter backend states.