Initial Observations: From the challenge name it seems that we will be dealing with cookies.
Tools Used
Cookie-Editor Extension
Python script
Burp Suite
Solution Steps
Inspecting the page
if search with the placeholder snickerdoodle we get this response
let’s see the cookie editor extension
let’s try to change the cookie value to a random number like 5 and see what happens
so by changing the cookie value we get different cookie names
How to get the cookie value of the flag
let’s see the request passed
So this is the request and response so I can make a python script to brute force the cookie value until the header of the picoCTF flag picoCTF{
The python script
First of all let’s see the maximum cookie value. After few tries I found that the maximum value is 28 so let’s start typing the script.
response = requests.get(url, headers=headers, cookies=cookies)
match = re.search(r"picoCTF\{.*?\}", response.text)
if "picoCTF{" in response.text:
print(f"🎉 Flag found! Cookie value: {i}")
print(match.group(0))
break
else:
print(f"Tried cookie value: {i} - No flag found.")
1
2
3
4
5
6
7
First from the request we captured by burp let's put it then try to extract the flag by regex expression.
---