Avatar
Part time CTF Player learn every day!!
🌠 I Love Hoshimachi Suisei!! 🌠
🌠 I Love Hoshimachi Suisei!! 🌠

OverTheWire Bandit Level 32 → 33 tutorial!!

Login

Log in as bandit32 using the password you obtained from Level 31 → 32.

ssh bandit32@bandit.labs.overthewire.org -p 2220
# password: 3O9RfhqyAlVBEZpVb6LYStshZoqoSx5K

Why? Each Bandit level is a separate UNIX user. To solve 32 → 33, you must be the bandit32 user.

Task

Task placeholder

When you log in, you’re dropped into an UPPERCASE SHELL that uppercases whatever you type (so ls becomes LS, which doesn’t exist). Goal: break out to a real shell and read the password for bandit33.

A little bit of Theory

  • The custom “uppershell” takes your input and converts letters → UPPERCASE before executing it.
  • In POSIX shells, $0 expands to the current shell’s path/name (e.g., /bin/sh). Because $ and digits aren’t letters, they aren’t uppercased, so $0 expands correctly and launches a normal shell.
  • Once in a normal shell, you can read /etc/bandit_pass/bandit33.

Further reading:

Solution

  1. Spawn a real shell using a variable expansion

    $0
    

    Why? $0 expands to the current shell’s executable (e.g., /bin/sh) after the uppercase filter, giving you a normal shell prompt.

  2. Verify who you are (optional)

    whoami
    # bandit32
    

    Why? Sanity-check that you’re still the right user, now in a proper shell.

  3. Read the next password

    cat /etc/bandit_pass/bandit33
    

    Why? Each password lives in /etc/bandit_pass/<user> and is readable by the matching previous level.

    password read placeholder

Password

Paste here the exact line your terminal printed:

tQdtbs5D5i2vJwkO8mEyYEyTL8izoeJ0

Troubleshooting

  • $0: command not found → Try echo "$0" to see what it expands to. If empty, try $SHELL (if set): "$SHELL". You can also try ${0}.
  • Still uppercased? → Make sure you typed $0 exactly (dollar-zero, no spaces).
  • Permission issues → You must be logged in as bandit32 to read bandit33’s password.

Congrats 🎉 You bypassed the uppercasing shell using variable expansion and grabbed the next credentials. On to bandit33!


Thanks for reading!

Until next time — Otsumachi!! 💖☄️✨

Cinema

all tags

GOT-overwrite aboutme aead ai alphanumeric-shellcode apt argc0 argon2 aslr assembly asymmetric atoi automation backbox bandit base64 bash beginner behemoth binary binary-exploitation binary-to-ascii blackarch blind blind-sqli blogging blue-team bruteforce buffer-overflow buffer-overwrite c caesar canary capabilities checksec command-injection commonmark cookie cron crypto cryptography ctf cutter cyberchef cybersecurity defenders detection dev directory-traversal dnf docs drifter ecc education elf env envp exploitation finale forensics format-string formulaone frequency frequency-analysis gcc gdb getchar gfm ghidra github-pages governance gpg guide hashing hkdf http jekyll jmpbuf kali kasiski kdf kernel keylength kramdown krypton lab ld_preload leviathan lfi lfsr linux linux-syscall llmops log-poisoning ltrace manpage markdown maze memcpy mitigations mitmproxy mlops narnia natas networking newline-injection nonce nop-sled nx object-injection obsidian openssl osint overflow overthewire package-manager pacman parrot path path-hijacking pathname php pie pkc pki pointer-trick pqc priv-esc privilege-escalation provable-security pwn pwntools pyshark python race-condition radare2 rag randomness recon red-team redirect relro requests ret2env ret2libc reverse-engineering reversing ricing roadmap rop rot13 rsa scapy security seed seo serialization session setjmp-longjmp setuid shell shellcode smoke soc sockets sprintf sql-injection srop stack-canary stack-overflow strace strcmp strcpy streamcipher strings strncpy strtoul substitution suid suisei symlink symmetric terminal test threat-intel time-based tls troubleshooting tshark type-juggling ubuntu udp utumno vigenere virtualbox virtualization vmware vortex walkthrough web windows wireshark writing wsl x86
dash theme for Jekyll by bitbrain made with