stegofreeeasy

Crazy I was crazy once

metactf

Task: a text file repeats the 'crazy? i was crazy once' rhyme with increasing leetspeak and symbol substitutions. Solution: extract the three-character token immediately before each repetition's final crazy!, concatenate the 20 fragments, then reverse the result to recover the flag.

$ ls tags/ techniques/
positional_token_extractionleet_normalizationreverse_concatenation

Crazy I was crazy once — metactf

Description

Source challenge: Crazy I was crazy once

Provided file: crazy.txt

English summary: the challenge gives a single text file containing the same rhyme repeated many times. Each loop is slightly more corrupted with leetspeak, and the hidden flag is embedded in a consistent position inside every repetition.

Analysis

The important pattern is that every repetition ends with a final crazy! token before the next loop begins. The token immediately before that ending is always exactly three characters long and does not fit the surrounding sentence.

Extracting those 20 fragments yields:

}pl eh_ dne s_e sae lp_ efi l_y m_f o_l ort noc _ll a_t sol _ev ah_ i{F i{F waD

That string is clearly backwards. Reversing it reconstructs the full flag:

DawgCTF{i_have_lost_all_control_of_my_life_please_send_help}

Solution

  1. Read crazy.txt and split it into whitespace-separated tokens.
  2. Normalize each token by translating common leetspeak substitutions (4 -> a, 3 -> e, 1 -> i, 0 -> o, 5 -> s, 7 -> t, @ -> a) and stripping punctuation except !.
  3. Whenever the normalized token equals crazy!, record the raw token immediately before it.
  4. Concatenate the 20 recorded three-character fragments.
  5. Reverse the concatenated string to recover the flag.

...

🔒

Permission denied (requires auth)

Sign in to read this free writeup

This writeup is free — just sign in with GitHub to read it.

$ssh [email protected]