A catalogue of writeups from past CTFs
This project is maintained by alran
In this challenge, we were given an IP Address and cryptic clue: “Welcome to Hacker2, where uptime is a main priority”.
When we tried to hit the address in our browser, we received a 403 Forbidden
. We poked around in the network calls
and hit it with curl. Then turned to good ol’ Google. This article was extremely enlightening:
Enumerating IPs in X-Forwarded Headers to Bypass 403 Restrictions
As described above, the X-Forwarded-For
header contains an ordered list of IP addresses. These can be unlimited in number, and are separated by a comma. The furthest left IP address represents the client’s address, and all others represent intermediate proxies. When a server receives this list of IPs, it traverses the list in reverse in order to determine the trustworthiness of the client’s address.
We set the X-Forwarded-For header in our request to include a list of four IPs that all matched the original local IP of the website.
X-Forwarded-For: <Local IP>, <Local IP>, <Local IP>, <Local IP>
This request allowed us to bypass the 403 and get the flag.
Def Con 2018 - OpenCTF - Aug 12, 2018