Forum Discussion
goyogi
Nimbostratus
Dec 08, 2017Host header vulnerability
This interesting vulnerability was found with a simple redirect irule by injecting a bad actor site as a host header, the F5 will redirect based on the host header and not on the host within the URL ...
Stanislas_Piro2
Cumulonimbus
Dec 11, 2017when you enter in the address bar the following URL :
https://foobar.com/mypath.php
the HTTP request is:
GET /mypath.php HTTP/1.1
Host: foobar.com
User-Agent: Mozilla .....
...
this is how HTTP works.
you can filter allowed host header values with this code:
when RULE_INIT {
set static::allowed_hosts [list foobar.com www.foobar.com www.company.com]
}
when HTTP_REQUEST {
if {[lsearch [string tolower [HTTP::host]] $static::allowed_hosts] != -1}
HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects