February 2022
Decoding
Stage 1 Area 1
This was the opening stage of BLK_BOX_2, acting as a light introduction before the later, more involved challenges. It included a teaser challenge followed by three encoded files, only one of which needed to be decoded to progress.
The teaser challenge provided a text file containing a mix of repeated strings. The task was to find the string that occurred most frequently, making it a small exercise in using common Linux command-line tools. Sorting the file, counting duplicate lines, sorting by frequency, and displaying the top result reveals the answer:
sort teaser.txt | uniq -c | sort -nr | head -n 1Files
The three challenge files each used a different encoding method, but all decoded to the same unlock message.
File 1 - Token substitution binary
BTMTOPBTMBTMANSENSTOPTOPANSTOPENSTOPBTMBTMALIBTMAN...This file uses three-letter tokens as binary values. HUM, ANS, and BTM map to 0, while ALI, ENS, and TOP map to 1.
File 2 - Binary substitution
BABBBAAABAAABBABBAABBABABAABBABABAAABABBBAABABBABA...This file is a direct binary substitution. Replacing B with 0, replacing A with 1, and converting the resulting binary to text reveals the message.
File 3 - Manchester encoded binary
_~~__~_~_~~_~_~__~~_~_~__~_~~__~_~~_~__~_~~__~~__~...This file is Manchester encoded. Replacing _ with 1 and ~ with 0, then decoding the result using the IEEE 802.3 Manchester convention, produces the same message as the other two files.
Decoded message
Greetings neighbours!
I’ve infected your systems to stop you mining MY asteroid. But don’t
fret, I like to play. Will you play with me? If you play with me and win
you get to go home! Good yes?
Unlock code: F6GTD555GFDFFile 1 was actually the last challenge I solved, after finishing the rest of BLK_BOX_2. Although it was not required for completion, I wanted to revisit it and resolve the one remaining loose end. I originally assumed each three-letter token represented a base-6 digit, forming one large number that needed to be converted into bytes, but it turned out to be a much simpler token-to-bit substitution.