Skip to main content

unnamed_challenge

Challenge

Imported from local notes.md.

Solution

Original Notes

unnamed_challenge

Challenge Summary

  • Given: A single text file, starting_files/blank.txt, described as an ordinary-looking recovered text file with hidden data.
  • Goal: Recover the hidden flag from the file structure.
  • Constraints: Flag format is IIITL{...}.

Initial Recon / Triage

  • Observations: The file is ASCII text, but cat -A and xxd show it is composed almost entirely of spaces, tabs, newlines, and # comment markers.
  • File identification: file reports plain text, but the real payload is the whitespace layout on each line.
  • Entry points: The exact sequence of spaces and tabs on each line.

Hypotheses & Approach

  • Hypothesis 1: The file might be a Whitespace-language program because it only contains whitespace plus comments. I explored that first with artifacts/decode_ws.py, but the stream did not parse cleanly as valid Whitespace bytecode.
  • Hypothesis 2: Each line may encode binary directly with spaces as 0 and tabs as 1. This was the correct model.

Execution Steps (Reproducible)

Stage 1

Commands:

file /root/incognito2026CTF/unnamed_challenge/starting_files/blank.txt
sed -n '1,40p' /root/incognito2026CTF/unnamed_challenge/starting_files/blank.txt | cat -A
xxd -g 1 -c 32 /root/incognito2026CTF/unnamed_challenge/starting_files/blank.txt | head -n 40

Results:

  • Each populated line contains either 32 bits or, for the last pair, 8 bits.
  • Adjacent lines decode into two byte streams: one looks random, the other forms readable decoy text fragments such as nori, ckro, llbr, and rick.

Stage 2

Commands:

python3 /root/incognito2026CTF/unnamed_challenge/artifacts/solve.py

Results:

  • artifacts/solve.py converts each line from whitespace into bits using space=0 and tab=1.
  • Each adjacent pair of decoded lines is XORed byte-by-byte.
  • The XOR output reconstructs the flag in 4-byte chunks.
  • Final flag: IIITL{k1nda_ea5y_1t_w4s_br0_6767}.

Stage 3

Commands:

sed -n '1,40p' /root/incognito2026CTF/unnamed_challenge/artifacts/solve_output.txt

Results:

  • The saved solver output records the reconstruction steps.
  • Lines 1-2 -> IIIT
  • Lines 3-4 -> L{k1
  • Lines 5-6 -> nda_
  • Lines 7-8 -> ea5y
  • Lines 9-10 -> _1t_
  • Lines 11-12 -> w4s_
  • Lines 13-14 -> br0_
  • Lines 15-16 -> 6767
  • Lines 17-18 -> }

Artifacts Produced

  • artifacts/solve.py - final reproducible solver.
  • artifacts/solve_output.txt - recorded XOR output for each adjacent line pair.
  • artifacts/decode_ws.py - initial parser attempt kept as triage context.

Flag

IIITL{k1nda_ea5y_1t_w4s_br0_6767}