WPICTF - getaflag

description: Come on down and get your flag, all you have to do is enter the correct password …

category: Web - 150

wpi_getaflag.png

Trying some input:

wpi_getaflag_input.png

It seems that we have to guess the password, or maybe…?

wpi_getaflag_source.png

$ echo -n "SGV5IEdvdXRoYW0sIGRvbid0IGZvcmdldCB0byBibG9jayAvYXV0aC5waHAgYWZ0ZXIgeW91IHVwbG9hZCB0aGlzIGNoYWxsZW5nZSA7KQ==" | base64 -d
Hey Goutham, don't forget to block /auth.php after you upload this challenge ;) 

The auth.php file:

wpi_getaflag_auth.png

Hum -> extract($_GET) That means we can rewrite previous variable declarations !

Considering the script is using get_contents, we can suppose that changing the $passcode will make get_contents return an empty string.

Finally:

wpi_getaflag_flag.png

The flag is WPI{1_l0v3_PHP}