HOST HEADER INJECTION
HOST HEADER INJECTION
POISONING
The Host header is a key part of the HTTP request sent from a
client (e.g., a web browser) to a server. It specifies the domain
name of the server the client is trying to access. This header is
critical for servers hosting multiple websites (a common
scenario with virtual hosting).
Why is it important?
1. Virtual Hosting: Many web servers host multiple websites
on the same IP address. The Host header allows the server
to determine which specific website the client wants to
access.
o Example: A server with IP 192.168.1.1 might host
example.com and example.org. The Host header
differentiates these requests.
2. Routing Requests: Servers use the Host header to route
requests to the correct service or application.
# WHAT IS A HOST HEADER INJECTION ?
1. Phishing Attacks:
o Manipulated Host headers can generate links pointing
to malicious domains.
o Users clicking on these links might provide sensitive
information to attackers.
2. Cache Poisoning:
o An attacker injects a fake Host header, which the
server caches.
o Future users are served malicious or incorrect content
from the cache.
3. Cross-Site Scripting (XSS):
o If the Host header is reflected in responses (e.g., error
pages) without sanitization, it can lead to XSS.
4. Security Policy Bypass:
o Host-based security policies can be circumvented by
spoofing the Host header to a trusted domain.
5. Unauthorized Redirections:
o Applications relying on the Host header for
redirection can be tricked into redirecting users to
malicious sites.
1. Phishing Attacks:
o Poisoned reset links direct users to attacker-controlled
domains, enabling credential theft.
2. Account Takeover:
o If an attacker gains access to the reset token, they can
change the victim's password and hijack the account.
3. Brand Reputation Damage:
o Users lose trust in the service, believing it to be
compromised.
4. Data Breach:
o Account takeover can lead to exposure of sensitive
user data.