# Cookies

## Category

Web Exploitation

## Question

Who doesn't love cookies? Try to figure out the best one. <http://mercury.picoctf.net:6418/>

## Hint

No Hint

## Solution

A box search is given to the challenge.

<figure><img src="https://2930324358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCVzu45Bb9LVrMqjdY6%2Fuploads%2F0D9Cq746B3H8Nmpm6lI9%2Fcookies.png?alt=media&#x26;token=6a0a5da9-33ab-4523-a39c-70f53e06c559" alt=""><figcaption><p>Cookies</p></figcaption></figure>

I tried to type `snickerdoodle`then I got `I love snickerdoodle cookies!`. As the title of the challenge, this is related to cookies, so I opened the dev tool and looked for cookies. It has a value field with the type of number. I tried to change the number and reload the website to see what happened and there are some changes on the web page.

So, I thought that flag might be shown if I can reach a number of the value field. To be faster, I used Burp and using Burp Intruder to the brute force value field.

I tried to brute force with numbers from 1 to 20 and looked for responses -> got the flag

<figure><img src="https://2930324358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCVzu45Bb9LVrMqjdY6%2Fuploads%2F0qlVHYDTdVZKBiXWZG05%2Fcookies-flag.png?alt=media&#x26;token=e98b23d2-c429-4bda-b691-aef70eabb54e" alt=""><figcaption><p>Flag</p></figcaption></figure>

## Flag

`picoCTF{3v3ry1_l0v3s_c00k135_88acab36}`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://thomasbui.gitbook.io/blog/software-security/ctfs-write-ups/writeups-picoctf-collection/picoctf-2021/web-exploitation/cookies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
