Classic: Cookie Monster
The portal trusted a cookie to decide who's an admin.
The original CampusHack portal set a role cookie and believed whatever came back.
1
Trusting the client
First visit:
httpHTTP/1.1 200 OK Set-Cookie: ch_role=student; Path=/api/sim Welcome, new visitor. Your role is "student". Admin area: LOCKED.The server code behind it:
jsif (cookies.ch_role === "admin") return "Admin area unlocked. FLAG{never_trust_cookies}";Cookies live in the browser and can be edited in DevTools (Application โ Cookies).
โ Report a problem with this room
Log in to report a problem.