Hi.
For those confused like me, I will rephrase.
The IP address of the target is 10.10.10.10
If I’m interested in accessing the index page at vhost.example.htb
and vhost.example.htb
does not exist, I still get a 200 response code. Why?
As per @r3nt0n answer, this is due to the way the web server is configured. It defaults back to the page that actually exist (www.example.htb
) and returns the status code and response size for THAT page, and not the vhost we’re after.
So, while ffuf prints something like that:
mail2 [Status: 200, Size: 900, Words: 423, Lines: 56]
dns2 [Status: 200, Size: 900, Words: 423, Lines: 56]
ns3 [Status: 200, Size: 900, Words: 423, Lines: 56]
dns1 [Status: 200, Size: 900, Words: 423, Lines: 56]
lists [Status: 200, Size: 900, Words: 423, Lines: 56]
webmail [Status: 200, Size: 900, Words: 423, Lines: 56]
static [Status: 200, Size: 900, Words: 423, Lines: 56]
web [Status: 200, Size: 900, Words: 423, Lines: 56]
www1 [Status: 200, Size: 900, Words: 423, Lines: 56]
<...SNIP...>
Actually, it does not land on any of those pages. It’s misleading and utterly confusing.
Also, the course says:
We see that all words in the wordlist are returning 200 OK
! This is expected, as we are simply changing the header while visiting http://academy.htb:PORT/
. So, we know that we will always get 200 OK
. However, if the VHost does exist and we send a correct one in the header, we should get a different response size, as in that case, we would be getting the page from that VHosts, which is likely to show a different page.
Well, I disagree. It is not expected. We SPECIFICALLY ask for a particular vhost and ffuf tells us: “Yes, it’s right there, and it’s that big”, when in fact none of the vhost listed by ffuf above exist. While I do understand the logic described above (webserver falling back to the default page, thus serving a 200 and 900 in size), I also understand ffuff should be able to differentiate between a fallback and the actual vhost we’re after. A fallback is essentially a redirect, so if ffuf gets a 301, why would it call it a 200, duh?