Log in with any username and password. The server sets a cookie admin=False; change it to True in DevTools and reload — the flag appears.
| Platform | picoGym |
| Verified against | thomasbui's picoCTF 2019 writeup |
| Category | Web Exploitation |
| Difficulty | Beginner |
| Tools | Browser DevTools curl |
The site belongs to a company that "doesn't seem to care about security". The login works for any name except Joe, but a normal user is told there's no flag for them.
Provided: a link to a login page
Stuck? Try a hint before reading the solution
Any login works except Joe's — so what decides whether you see the flag?
Check your cookies: one of them says whether you're an admin.
Enter any username and password (avoid Joe, which is rejected). You get in, but the page says there's no flag for you.
If a login accepts arbitrary credentials, the decision about what you can see must be made somewhere else — usually a cookie.
Open DevTools (F12) → Application (Chrome) or Storage (Firefox) → Cookies. Alongside your username and password, there's one more:
admin False
The server stores your authorization level on the client, in plain text, with no signature.
Double-click the value, change it to True, and reload the page. The flag is shown.
From the command line, send the cookie yourself:
$ curl -b 'admin=True' http://CHALLENGE/flag
The flag is deliberately hidden — follow the method, you've earned it. 💪
Anything stored on the client can be changed by the client:
New to CTFs? Start here: beginner's guide to CTFs — what a CTF is, the categories, the tools and a step-by-step plan.
Discuss this writeup with the community on the CTFdojo Discord.
Join the Discord →