Power Cookie

Challenge Overview

Can you get the flag?

Go to this website and see what you can discover.

Solution

This is the site:

image

Looking at the source before clicking the "Continue as guest" button you can see what it does.

image

So it just goes to the "/check.php" and sets your isAdmin cookie value to 0.

After clicking the button you then go to "application" and then under "cookies" you can see that there is now an isAdmin cookie with a value of 0.

image

Assumig "0" stands for false, and "1" stands for true I just replaced the 0 with a 1 and reloaded the /check.php page.

That then gives me the flag.

image

Also if you wanted to you don't even need to click the button. You can go straight to /check.php and see this page.

image

It is saying this because you currently have no cookie in this case.

If you then go to the same place: "application" then under "cookies". You can create your own cookie by double-clicking a row. Just name the cookie isAdmin as seen from the source code of the button.

image

And set the value to 1.

image

Reload the http://saturn.picoctf.net:57329/check.php page and you now once again have the flag.

Flag: picoCTF{gr4d3_A_c00k13_65fd1...}