Challenge Name: Whitespace Message
Category: Forensics / Steganography
Points: 100 PTS
Difficulty: Standard / Easy
Flag Format: HackCTF{…}
- Challenge Overview
The challenge provides a plain text file named message.txt with the following description:
A text file looks normal …..but is it? message.txt

When opened, message.txt contains a standard email text regarding password rotation. However, invisible whitespace characters are hidden inside the file.
- Analysis & Hints
Looking at the hints provided on the challenge platform:
Hint 1: Highlighting text (Ctrl+A) reveals extra hidden characters at the ends of lines.
Hint 2: A Space represents binary 0 and a Tab represents binary 1.
Running cat -A message.txt reveals a trailing block of tabs (I) and spaces at the bottom of the file.
- Solution & Bit Alignment
Converting the tabs and spaces using standard 8-bit ASCII initially causes garbled output because leading spaces from the text body throw off the bit alignment.
By isolating the tab block at the end of the file and scanning bit offsets from 0 to 7, offset 7 aligns the bitstream correctly.
python Solution Script
text = open("message.txt").read()
# Isolate whitespace payload starting at the first tab
tabs_start = text.find("\t")
payload = text[tabs_start:] if tabs_start != -1 else text
# Map Space -> 0, Tab -> 1
bits = "".join("0" if c == " " else "1" for c in payload if c in " \t")
# Scan offsets to align bit boundary
for offset in range(8):
b = bits[offset:]
msb = "".join(chr(int(b[i:i+8], 2)) for i in range(0, len(b)-7, 8))
if "HackCTF" in msb or "ackCTF" in msb:
print(f"[+] Flag Found at Offset {offset}: {msb}")
- Final Flag
Running the offset scanner reveals ackCTF{v1s1bl3_n0tHing_n35s} at offset 7, giving the full flag:
HackCTF{v1s1bl3_n0tHing_n35s}

- Key Takeaways
Whitespace Steganography: Binary data can be hidden in plain text files using tabs (1) and spaces (0).
Framing Shifts: Stray spaces outside the payload block shift the 8-bit alignment boundary, requiring offset scanning to render readable ASCII.