host header injection explain with practical

Hacking Truth

host header injection explain with practical

Let's talk about Host Header Attack

host header or value =
host header or value =
host header or value =

With XSS

host header or value ="><script>alert(32);</script>

In many cases, developers are trusting the HTTP host header value and using it to generate links, import scripts and even generate password resets links with its value. This is a very bad idea, becaus the HTTP host header can be controlled by an attacker. This can be exploited using web cache poisoning and by abusing alternative channels like password reset emails. host header injection explain with practical

host header injection exaplain with practical

It is common practice for the same server to host several website or web application on the same IP. This is why the host error exists, the host header specifies which website or web application should be process an incoming request. The web server uses a value of this header to dispatch the request to the specified websites or web application. Each web application hosted on the same IP address is commonly refered to the virtual host.

what happened if we specified invalid host header. Most web server are configured to path the unrecognized host header to the first virtual host in the list. There for its possible to  request with arbitrary  host to the first virtual host another way to bypass host header is to used x-desk or y-desk host. In the same configurable the header will be reject the value of the host header.


Arbitrary code

Arbitrary code means malicious software code that is written by the hacker, and which generally does bad things. ... It might take advantage of flaws in operating systems or even microprocessors to sneak the malware into buffers or caches, and then the bad software is run automatically.

so, let's take a example of the host header

Video Practical :- 


More Practical Soon...


This was written for educational purpose and pentest only.
The author will not be responsible for any damage ..!
The author of this tool is not responsible for any misuse of the information.
You will not misuse the information to gain unauthorized access.
This information shall only be used to expand knowledge and not for causing  malicious or damaging attacks. Performing any hacks without written permission is illegal ..!

All video’s and tutorials are for informational and educational purposes only. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. We believe that it is impossible to defend yourself from hackers without knowing how hacking is done. The tutorials and videos provided on is only for those who are interested to learn about Ethical Hacking, Security, Penetration Testing and malware analysis. Hacking tutorials is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used.

All tutorials and videos have been made using our own routers, servers, websites and other resources, they do not contain any illegal activity. We do not promote, encourage, support or excite any illegal activity or hacking without written permission in general. We want to raise security awareness and inform our readers on how to prevent themselves from being a victim of hackers. If you plan to use the information for illegal purposes, please leave this website now. We cannot be held responsible for any misuse of the given information.

- Hacking Truth by Kumar Atul Jaiswal

I hope you liked this post, then you should not forget to share this post at all.
Thank you so much :-)

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !