Bandit Level 11 → 12
Login: ssh bandit11@bandit.labs.overthewire.org -p 2220
Password: dtR173fZKb0RRsDFSGsg2RWnpNVj3qRr
task
The password for the next level is stored in the file data.txt, where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions.
theory lil bit
- ROT13: This is a simple substitution cipher that replaces a letter with the 13th letter after it in the alphabet. Since there are 26 letters in the English alphabet, applying ROT13 twice restores the original text.
- tr (translate): This command is used for translating or deleting characters.
- The syntax
tr 'A-Za-z' 'N-ZA-Mn-za-m'maps the first half of the alphabet to the second half and vice versa. - Specifically, it maps
AtoN,BtoO, and so on, effectively shifting everything by 13 places.
- The syntax
- Symmetry: ROT13 is its own inverse; you use the exact same command to both encrypt and decrypt the message.
solution
bandit11@bandit:~$ ls
data.txt
bandit11@bandit:~$ cat data.txt
Gur cnffjbeq vf 7k16JArUVv5LxIuJfsSVdbbtahGlw9D4
bandit11@bandit:~$ cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m'
The password is 7x16WNeHIi5YkIhWsfFIqoognUTyj9Q4
<!-- truncate -->
