Level 11 → Level 12
Completed📋 Level Information
🎯 Level Goal
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 (ROT13 cipher).
Challenge: You need to decode the ROT13 encoded text to reveal the password.
🔧 Solution Steps
Step 1: Connect to Bandit11
Use the password from Level 10 to log in:
ssh bandit11@bandit.labs.overthewire.org -p 2220
Password: 6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM
Step 2: Check the data.txt File
First, let's see what's in the file:
cat data.txt
You'll see ROT13 encoded text that looks garbled:
Gur cnffjbeq vf 5Gr8L4qetPEsPk8htqjhRK8XSP6x2RHh
Step 3: Decode the ROT13 Text
Use the tr command to translate (rotate) the characters:
cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m'
Command breakdown:
tr- Translate or delete characters'A-Za-z'- The original character set'N-ZA-Mn-za-m'- The rotated character set (ROT13 mapping)
Step 4: Get the Password
The decoded output will reveal the password for Level 12:
The password is 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu
The password for Level 12 is: 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu
🔄 Alternative Methods
Method 2: Using Python
Python has built-in ROT13 decoding in the codecs module:
python3 -c "import codecs; print(codecs.decode(open('data.txt').read().strip(), 'rot13'))"
Method 3: Using Perl
Perl can also decode ROT13 easily:
perl -pe 'y/A-Za-z/N-ZA-Mn-za-m/' data.txt
Method 4: Online ROT13 decoder
For learning purposes, you can use online ROT13 decoders:
# Copy the encoded text and paste into an online ROT13 decoder
# This is only for educational purposes!
💡 Explanation
This level introduces the ROT13 cipher, a simple substitution cipher.
What is ROT13?
- ROT13 - "Rotate by 13 places"
- A simple letter substitution cipher that replaces each letter with the 13th letter after it in the alphabet
- Since there are 26 letters, applying ROT13 twice returns the original text
- ROT13(A) = N, ROT13(B) = O, ROT13(C) = P, etc.
How tr command works for ROT13:
'A-Za-z'represents all uppercase and lowercase letters'N-ZA-Mn-za-m'maps A→N, B→O, ..., Z→M (and same for lowercase)- This mapping effectively rotates each letter by 13 positions
ROT13 Character Mapping:
Original: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
ROT13: NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm
Why ROT13 is Used:
- Simple obfuscation (not real encryption)
- Hiding spoilers in online forums
- Concealing offensive content
- Educational purposes for learning about ciphers
⚠️ Common Mistakes
- Wrong character sets: Mixing up uppercase and lowercase in tr command
- Missing quotes: Forgetting quotes around the character sets
- Wrong rotation: Using different rotation values instead of 13
- Case sensitivity: Not preserving case in the output
💡 Pro Tips
- You can encode text with the same command:
echo "Hello" | tr 'A-Za-z' 'N-ZA-Mn-za-m' - ROT13 is its own inverse: encoding and decoding use the same operation
- Use
tr -d 'a-z'to delete lowercase letters - Combine tr with other commands for complex text processing
- Remember that ROT13 only affects letters; numbers and symbols remain unchanged