neven@dimitri-dev:~$
cd ../hacknite-2021

$cat rules.mdMiscHacknite 2.0

Rules

The example flag printed in the competition rules wasn't a placeholder. It was the answer to this task.

  • #rules
  • #flag-format

$man rules

What this one teaches:

  • Every CTF defines what a flag looks like, usually in its rules, and you need that format for every task.
  • Read rules and task text to the end. "Example" values are sometimes the real thing.

Task description

Since you’re still reading this, chances are you didn’t read the rules carefully and have already missed one solution. Try again.

The original was in Croatian; this is my translation.

What a flag is

In a CTF (capture the flag) competition, every task hides a short piece of text called a flag. You prove you solved the task by typing the flag into the scoreboard, and it gives you points. Each competition picks its own flag format so players can tell a real flag from random text.

The task gives no file and no link. It only says we skipped something in the rules, so the rules are where to look.

Back to the rules

The Hacknite rules have a section on the competition format. One line in it describes the flag (my translation):

The goal of every task, without exception, is to find the solution, the so-called flag, which always consists of text in the following format: CTF2021[string of random characters]

The very next line says “one example of a solution (flag) is:” and prints a complete flag.

Example values in documentation are usually placeholders, so it’s easy to read past them. This one was real. We copied the example flag into the answer box for this task, exactly as written, and got the 10 points.

The format is worth remembering for the rest of the event. Intruder is built entirely around it.

$cat flag.txt revealCTF2021[871812117267]

Written by Neven Marić. This writeup was written with the help of Claude Code (Anthropic).