Dev.to Security 🔐 Cybersecurity 👁 0 📖 2 min read

OverTheWire Bandit Level 11 Writeup — Decode a ROT13-Rotated Password

data.txt is ROT13-encoded — every letter shifted by 13. Since the alphabet has 26 letters, applying the same shift again undoes it, and tr 'A-Za-z' 'N-ZA-Mn-za-m' does exactly that. Platform: OverTheWire Bandit Verif

data.txt is ROT13-encoded — every letter shifted by 13. Since the alphabet has 26 letters, applying the same shift again undoes it, and tr 'A-Za-z' 'N-ZA-Mn-za-m' does exactly that.

  • Platform: OverTheWire Bandit
  • Verified against: OverTheWire — official level page
  • Category: Linux Fundamentals
  • Level: 11 → 12
  • Difficulty: Beginner
  • Technique: ROT13 with tr

Challenge description

The text in the file looks like gibberish, but only the letters have changed — digits and spacing are untouched, which is the classic fingerprint of a letter-rotation cipher.

"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"

Step 1 — Look at the encoded text

Log in as bandit11 and print the file. The structure of a sentence is still visible — word lengths, spaces, digits — but the letters are scrambled:

ssh [email protected] -p 2220
cat data.txt
Gur cnffjbeq vf [ROTATED PASSWORD]

"Gur" for "The" is a giveaway: ROT13 turns T→G, h→u, e→r. Once you've seen it, you'll recognize it everywhere.

Step 2 — Rotate the letters back with tr

tr translates characters from one set into another, position by position. Mapping A-Z onto N-ZA-M (and the same for lowercase) shifts every letter forward 13 places — which, because 13 is half of 26, is also exactly the reverse of the original shift:

cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m'
The password is [PASSWORD FOR bandit12]

Anything outside the two ranges — digits, spaces, punctuation — passes through unchanged, which is why the password's numbers were readable even before decoding.

🔑 password intentionally hidden

The password is deliberately hidden — follow the method, you've earned it. 💪

Key takeaways

ROT13 is the same operation in both directions, which makes it trivial to undo once identified. More useful long-term is the tr pattern itself: any fixed letter shift (a full Caesar cipher) can be reversed by writing the shifted alphabet as the second set.

  • ROT13 is its own inverse — encoding and decoding are the same command
  • tr SET1 SET2 maps characters by position; ranges like A-Z and wraps like N-ZA-M express any rotation
  • Unchanged digits and spacing with scrambled letters point to a letter-substitution cipher

Originally published on CTFdojo — join the CTFdojo Discord to discuss writeups and get notified about new ones.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.