Cookies (Easy)
- Challenge Link: https://play.picoctf.org/practice/challenge/173?category=1&difficulty=1&page=2
- Challenge Description: Who doesn't love cookies? Try to figure out the best one.
Solution
Cookies are small pieces of data that a website stores in your browser. They can hold information like your session data, preferences, or authentication tokens. When you visit a site, the browser sends cookies associated with that site back to the server, and the server can use that data to tailor your experience.
When you visit the page, the server sends a cookie to your browser. This cookie might contain something like a user ID, access level, or a flag related to your current session. You can inspect the cookie and notice that its value can be changed. When you change the value of the cookie and refresh the page, the browser sends the modified cookie to the server. The server interprets the new value, and depending on how it's programmed, it might lead to a different outcome. For example, it could redirect you to a new page, or give you access to something you weren’t supposed to see.
The front page cookie value:
The snickerdoodle cookie page
Replacing the cookie value
After some trial and error: