๐ Head Dump
A detailed write-up of the Web challenge 'Head Dump' from PicoCTF - 2025
๐ Challenge Overview
Category Details Additional Info ๐ Event PicoCTF - 2025 Event Link ๐ฐ Category Web ๐ ๐ Points 50 Out of 500 total โญ Difficulty ๐ข Easy Personal Rating: 1/10 ๐ค Author Prince Niyonshuti N. Profile ๐ฎ Solves (At the time of flag submission) 2.345 solve rate ๐ Date 19-03-2025 PicoCTF - 2025 ๐ฆพ Solved By mH4ck3r0n3 Team:
๐ Challenge Information
Welcome to the challenge! In this challenge, you will explore a web application and find an endpoint that exposes a file containing a hidden flag. The application is a simple blog website where you can read articles about various topics, including an article about API Documentation. Your goal is to explore the application and find the endpoint that generates files holding the serverโs memory, where a secret flag is hidden.
๐ฏ Challenge Files & Infrastructure
Provided Files
1
Files: None
๐ Initial Analysis
First Steps
Initially, the website appears as follows:
Inspecting the page source, I didn’t find anything interesting, so since the description mentions
API
, I decided to rungobuster
and do someFuzzing
on theapi
endpoints:finding
/api-docs
. By visiting the route:I was taken to the web interface of
swagger
, which is used for testingapi
. Let’s move on to the exploitation phase.
๐ฏ Solution Path
Exploitation Steps
Initial setup
The only suspicious
api
from the previous screenshot was/heapdump
:so I decided to execute it.
Exploitation
Clicking on the
Try it out
button and then onExecute
:As we can see, the
body
contains a file. After downloading it and opening it withsublimetext
, I performed a search (CTRL+F
) forpicoCTF{
, thus finding the flag. The other option was to directly usecurl
as suggested by theapi
itself and search forpicoCTF{
withtmux
:
Flag capture
๐ ๏ธ Exploitation Process
Approach
The automatic exploit makes a GET request to the page and extracts the flag using a regex.
๐ฉ Flag Capture
FlagpicoCTF{Pat!3nt_15_Th3_K3y_13d135dd}
Proof of Execution
๐ง Tools Used
Tool Purpose Python Exploit Gobuster Web Discovery
๐ก Key Learnings
Time Optimization
- If there are challenges related to
APIs
, always check the/api-docs
route.
Skills Improved
- Binary Exploitation
- Reverse Engineering
- Web Exploitation
- Cryptography
- Forensics
- OSINT
- Miscellaneous
๐ References & Resources
Learning Resources
๐ Final Statistics
Metric | Value | Notes |
---|---|---|
Time to Solve | 00:10 | From start to flag |
Global Ranking (At the time of flag submission) | 1339/10460 | Challenge ranking |
Points Earned | 50 | Team contribution |
Created: 19-03-2025 โข Last Modified: 19-03-2025 *Author: mH4ck3r0n3 โข Team: *