IPfilter

Challenge Description

let's view source code and it give us a hint

so let's use the parameter ?src in the url

and it reveals php code

Testing with any IP gets you the backend server IP you need to provide.

so 192.168.112.3 is the backend ip we want to fetch from the flag but unfortunately it's filtering ip and restrict access to this ip

Bypassing the filter is easy because unlike the other checks, it just compares strings. 192.168.112.3 != 192.168.112.003 but obviously still resolves to the same machine.

vulnerable php code snippet

https://www.hacksparrow.com/networking/many-faces-of-ip-address.html here specifies all the different ways to specify IPs that also works on browsers.

Flag

Last updated

Was this helpful?