PicoCTF GET aHEAD Writeup — Get the Flag with an HTTP HEAD Request

Web 2026-12-02 · picoGym · By CTFdojo · ⏱ ...
𝕏 Share
TL;DR

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.

PlatformpicoGym
Verified againstvivian-dai's picoCTF 2021 writeups
CategoryWeb Exploitation
DifficultyBeginner
Tools curl Burp Suite

Challenge description

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

Hint 1

The two buttons use two different HTTP methods. The title hints at a third one.

Hint 2

Send a HEAD request (curl -I) and read the response headers.

Step 1 — See which methods the page uses

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.

Step 2 — Send a HEAD request

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.

🚩 picoCTF{flag intentionally hidden}

The flag is deliberately hidden — follow the method, you've earned it. 💪

Key takeaways

HTTP methods are part of the request you control:

Resources

Guides for the tools used here

New to CTFs? Start here: beginner's guide to CTFs — what a CTF is, the categories, the tools and a step-by-step plan.

CTFdojo
CTFdojo
Community of ethical hackers writing beginner-friendly CTF writeups and guides.

Got a question or a different approach?

Discuss this writeup with the community on the CTFdojo Discord.

Join the Discord →