Twice over

05 Hard 30 points Encoding

Objective

Undo two layers of encoding to get the flag back.

The briefing

Encoding is not encryption. Encryption needs a key, and without the key there is nothing to do. Encoding is just a different way of writing the same thing, and anyone who knows the scheme can reverse it.

Two schemes were used here, one after the other.

The first turns three bytes into four printable characters, so that binary data can travel through systems that only carry text. You can spot it by the alphabet it uses: capitals, lower case, digits, and often one or two equals signs at the end as padding.

The second is older and simpler. It shifts every letter thirteen places along the alphabet, wrapping around at the end. Because there are twenty-six letters, running it again undoes it.

Undo them in the reverse order to the one they were applied in.

Set it up

Run this in Termux. It teaches the concept above a second time, then writes the challenge files into your home directory.

ctf start 05

The tool tells you how many files it wrote, never their names.

Then find the flag and hand it in with ctf check 05 LEARMUX{...}.

Hints

Two of them, revealed one at a time. The tool works the same way and remembers how many you have seen, so nothing is spoiled by accident.

The flag is not on this page It cannot be. Every flag is derived from a random value created on your device when you install the tool, so the answer here would be wrong for you. The tool is the only thing that can tell you whether you got it right.

All challenges Source on GitHub