Contents

๐ŸŒ Head Dump

A detailed write-up of the Web challenge 'Head Dump' from PicoCTF - 2025

/images/PicoCTF-2025/Web/Head-Dump/challenge_presentation.png
Challenge Presentation

๐Ÿ“Š 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:

/images/PicoCTF-2025/Web/Head-Dump/site_presentation.png
Site Presentation

Inspecting the page source, I didn’t find anything interesting, so since the description mentions API, I decided to run gobuster and do some Fuzzing on the api endpoints:

/images/PicoCTF-2025/Web/Head-Dump/gobuster.png
Gobuster

finding /api-docs. By visiting the route:

/images/PicoCTF-2025/Web/Head-Dump/swagger.png
Swagger

I was taken to the web interface of swagger, which is used for testing api. Let’s move on to the exploitation phase.

๐ŸŽฏ Solution Path

Exploitation Steps

Initial setup

The only suspicious api from the previous screenshot was /heapdump:

/images/PicoCTF-2025/Web/Head-Dump/heapdump.png
Heapdump

so I decided to execute it.

Exploitation

Clicking on the Try it out button and then on Execute:

/images/PicoCTF-2025/Web/Head-Dump/executed.png
Executed

As we can see, the body contains a file. After downloading it and opening it with sublimetext, I performed a search (CTRL+F) for picoCTF{, thus finding the flag. The other option was to directly use curl as suggested by the api itself and search for picoCTF{ with tmux:

/images/PicoCTF-2025/Web/Head-Dump/curl.png
Curl

Flag capture

/images/PicoCTF-2025/Web/Head-Dump/manual_flag.png
Manual Flag

๐Ÿ› ๏ธ Exploitation Process

Approach

The automatic exploit makes a GET request to the page and extracts the flag using a regex.

๐Ÿšฉ Flag Capture

Flag

picoCTF{Pat!3nt_15_Th3_K3y_13d135dd}

Proof of Execution

/images/PicoCTF-2025/Web/Head-Dump/automated_flag.png
Automated Flag
Screenshot of successful exploitation

๐Ÿ”ง 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: *