The Challenge
A “click counter” web app. You are supposed to click a button many millions of times to reach the target. The click count is stored in a client-side cookie named cookies.
Approach
The server reads $_COOKIE['cookies'] (or the equivalent) without any server-side state. Setting the cookie to the target value directly skips all the clicking. One GET request with the forged cookie is enough.
Solution
|
|
cookies={"cookies": "10000000"} forges the counter at the target value. BeautifulSoup parses the response and extracts the flag from the first <h1> element.
What I Learned
Client-side counter state (cookies, localStorage, session storage) is always forgeable. Any security-relevant threshold that relies on a client-controlled counter must be validated on the server against a server-side record of actual clicks.