How to write a write-up CTF: template and mistakes part 2

Depov

Moderator
Staff member
MODERATOR
ULTIMATE
SUPREME
PREMIUM
MEMBER
Joined
Feb 18, 2025
Messages
790
Reaction score
1,484
Good and Bad Write-Ups: A CTF Task Analysis Using an Example

The best way to understand the difference is to see both options side by side. Let's take a fictitious task: "Holiday Snap" (Forensics, 100 pts). Description: "The admin posted a vacation photo. Nothing interesting." File: holiday.jpg.

Bad option:

I ran exiftool, found the base64 in the comment, and decoded it. Flag: CTF{exif_data}. Easy.

Technically correct. In practice, it's useless: the reader won't know why the author started with metadata instead of steganography. In six months, the author won't remember either. There's no context for the problem, no TL;DR, no dead ends, no explanation of the logic.

Good option (fragment):

## TL;DR
The flag is a Base64-encoded string in the EXIF Comment field.
The metadata analysis tools found it with a single command.

## First Look
The file is a standard JPEG with EXIF data. `strings` revealed a Base64-encoded string
at the beginning of the file, where the metadata is stored. Initial hypothesis: EXIF.

## Dead End
`steghide` with an empty password returned nothing. No password hints.

## Solution
`exiftool -Comment holiday.jpg` → Base64 string → decoded → flag.

Translated with DeepL.com (free version)

The same flag, but the reader received a triage order for any image-related task: first metadata, then steganography. The example of the second type of CTF write-up teaches thinking, while the first simply states a fact. The difference is five minutes of writing time.
A ready-made Markdown template for CTF writing

The template below is the skeleton I use at every competition. It's in pure Markdown format and renders well on GitHub, any blog, or forum. Replace the curly braces with your own information and remove any sections that aren't needed for the specific task.

# {Challenge} ({Category}, {points}) — {CTF} {year}

| Field | Value |
|-----------|------------------------------------------ --|
| CTF | {Name, dates} |
| Category | {web / crypto / pwn / reverse / forensics} |
| Points | {value, static/dynamic} |
| Solved | {number, if published} |
| Author | {problem author, if specified} |
| Solved by | {nickname (team)} |

## TL;DR
{Bug class and key insight—two sentences maximum.}

After the header come the sections described above: Problem (verbatim description in the quote + files with hashes), First look (what was checked and why), Dead ends (one line for each), Solution (steps with subheadings and rationale), Flag , Conclusions , Links and thanks .

A tip that saved me dozens of hours: create this file before you start solving the problem. Fill in the "First Look" and "Dead Ends" sections as you go, and by the end of the CTF, you'll have a draft that just needs polishing. How can you write a CTF write-up in 30 minutes instead of three hours? Don't write it from scratch after the competition.

If you want to generate PDF for your portfolio from the same Markdown, use this link pandoc+ The Eisvogel template produces a PDF with a title page and syntax highlighting with a single command in the terminal. Installation: texlive, pandoc, download the template from GitHub - described in the project documentation. Convenient for sending to an employer or password-protecting (via pdftk) for the duration of the embargo.
Formatting screenshots and code in Write-Up

The design of a CTF solution isn't about decoration, it's about navigation. A poorly designed copy will bury the most elegant exploit behind a wall of unstructured text.

Screenshots. Text output – paste as text into code blocks, not as an image. Terminal output in screenshot form cannot be copied, searched, or read with a screen reader. Screenshots are for visual purposes only: a web page render, a decompiler graph in Ghidra, an oscilloscope trace in Audacity, or an image with suspicious artifacts.

Crop to the relevant area, using a frame to highlight the key detail. Write a caption explaining what's shown and why: "Ghidra decompiler: input length check compared to 16" – not just "Screenshot 3." Before publishing, blur out session cookies, API tokens, real IP addresses, email addresses, and the names of other participants. A minute's work and there won't be any awkward leaks.

Code and commands. Show the minimum required for playback. Trim noisy output to meaningful lines, marking gaps with ...Specify the language in code blocks — ```python, ```bashSyntax highlighting is no small thing: it switches the reader's perception to "technical mode" and instantly separates code from prose.

Placeholders instead of real CTF infrastructure addresses: chal.example.lab:31337instead of a real IP. The servers will be shut down in a week—a working address in the text is just confusing. Note the versions if the solution depends on them: "pwntools 4.x, Python 3.12" or "Burp Suite Professional 2024.x." A script that silently breaks on a different version isn't documentation, it's a trap.
Common mistakes CTF beginners make when writing write-ups

Seven mistakes I see most often—and I made most of them myself on my first write-ups.

1. Writing without context. The author jumps straight to the solution without explaining what the CTF is, what category it is, how many points it requires, or what the task entails. The reader opens the text and doesn't understand why they even started. exiftool or sqlmapMetadata is the first thing that should be in a file.

2. Skipping dead ends. If a write-up reads as a straight line from the condition to the flag, it's incomplete. Dead ends indicate which approaches don't work for this type of problem. Without them, it seems like the author knew the answer from the start. This is unrealistic and useless for learning.

3. Code without comments. A 40-line Python script without a single comment is not a write-up, but a code dump. The reader sees p.sendline(payload), but does not understand that in payloadAnd why send it this way? At a minimum: what the script does overall, what the non-obvious lines do.

4. Screenshots instead of text. A common mistake new CTF developers make when formatting their CTFs is to use only images in the terminal output. The results can't be copied, searched, or pasted into your script. The rule is simple: if it's text, paste it as text.

5. "Easy" instead of explanation. Phrases like "well, it's obvious" or "easily Googled" devalue the writing. What's obvious to you after solving the problem wasn't obvious before—and won't be obvious to the reader. Explain every transition: why you moved from one hypothesis to another.

6. Posting before the CTF ends. This isn't a formatting error—it's cheating, which ruins the experience for everyone else. Even if it seems like "the problem is simple, everyone's already solved it." Don't do that.

7. A write-up that can't be reproduced. A step was missed, the tool version wasn't specified, or the payload was copied with a typo. If the CTF platform is still available, re-run all the steps before publishing. 15 minutes of work and you won't have a flood of "but it doesn't work for me" comments.
Where and when to publish a write-up

When — the embargo rule. Publish your write-up only after the CTF officially ends. For one-time Jeopardy competitions, this is usually obvious: the event is over — publish it. With permanent platforms, it's more complicated. Hack The Box only requests that you document retired machines, while TryHackMe and other platforms have their own rules. Before publishing, check the platform's ToS. Violating the embargo is a blow to your reputation that no amount of quality writing can compensate for. If in doubt, ask the organizers directly.

Where — choosing a platform. Platforms are divided into proprietary and shared, and the optimal strategy is to use both.

Personal: GitHub Pages, personal blog on Jekyll or Hugo. Full control over the design, a single portfolio—easy to send to employers with a single link. The downside is that you'll have to attract an audience yourself: without promotion, no one will see your analysis.



Practical advice: Maintain a canonical version in your GitHub repository ( .md-files + folder img/), and for publishing, adapt the same Markdown to the specific platform. Markdown for writing is the same everywhere, so double publishing is 10 minutes of work, not double the effort.

A separate issue is format. Text-based write-ups are easier to search, copy commands from, and update. Video write-ups better demonstrate dynamic processes (debugging, navigating the interface), but require significantly more effort in production. If you have to choose one over the other, start with text. Video can be added later as an add-on.

The documentation skill developed through write-ups has an unexpectedly direct impact on work tasks. A penetration tester's report is essentially the same as a write-up, only with a different header format and recommendations section. A SOC analyst describing an incident follows the same structure: what was observed, what was tried, why one hypothesis was discarded and another adopted. The formula "why → what did you do → what did you see → what does it mean" from the step-by-step solution section works exactly the same in an alert investigation report. The only difference is that in a CTF you attack, and in a SOC you defend; the documentation format is the same.
 
Top Bottom