overthewire-writeups

Bandit11 -> 12: The ROT13 Scramble

Challenge

Level Description

The password for the next level is stored in data.txt, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions. This is a classic substitution cipher known as ROT13.

The Process

When I looked at data.txt, the text looked like complete gibberish. However, knowing it was ROT13 made it a fun puzzle to solve. ROT13 works by replacing a letter with the 13th letter after it in the alphabet. Since there are 26 letters in the English alphabet, applying ROT13 twice gets you back to the original text!

To “unscramble” this, I used the tr (translate) command. This tool allows you to map one set of characters to another. I mapped the standard alphabet to an alphabet starting 13 letters in.

Here is the command I used:

$ cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m'

Breakdown of the command:

The result was a perfectly readable password. Caesar would be proud!

Password For the Next Level

[SPOILER]

What I Learned

Helpful Reading Material