The two buttons send GET and POST. The challenge name hints at a third method: HEAD. curl -I sends one, and the flag appears as a response header.
| Platform | picoGym |
| Verified against | vivian-dai's picoCTF 2021 writeups |
| Category | Web Exploitation |
| Difficulty | Beginner |
| Tools | curl Burp Suite |
A page with two buttons, "Choose Red" and "Choose Blue", that change the background colour. The name of the challenge is the real hint.
Provided: a link to the challenge page
Stuck? Try a hint before reading the solution
The two buttons use two different HTTP methods. The title hints at a third one.
Send a HEAD request (curl -I) and read the response headers.
View the page source (Ctrl+U). The two forms differ only in their method:
<form action="index.php" method="GET"> ... Choose Red
<form action="index.php" method="POST"> ... Choose Blue
So the server reacts to the HTTP method. "aHEAD" points at another one: HEAD, which asks for a response's headers without the body.
curl -I sends a HEAD request and prints the response headers:
$ curl -I http://CHALLENGE/index.php
HTTP/1.1 200 OK
flag: picoCTF{***}
Content-type: text/html; charset=UTF-8
The flag comes back as a custom header. In Burp Suite, the same works by changing GET to HEAD in Repeater.
The flag is deliberately hidden — follow the method, you've earned it. 💪
HTTP methods are part of the request you control:
curl -I sends HEAD; curl -X METHOD sends any methodNew to CTFs? Start here: beginner's guide to CTFs — what a CTF is, the categories, the tools and a step-by-step plan.
Discuss this writeup with the community on the CTFdojo Discord.
Join the Discord →