back

Bandit 02 - writeups

Sharing this writeups by following overthewire rules. This writing is for Level 2.

Bandit Level 2 → Level 3

ssh bandit2@bandit.labs.overthewire.org -p 2220
found password: 123JGJPfgU6LtABCdfWU1XP5yac30mJJ

bandit2@bandit:~$ ls
--spaces in this filename--

bandit2@bandit:~$ cat -- "--spaces in this filename--"
KKk8KNH3Usi2312PRUEoDFPqfxLPlsms

bandit2@bandit:~$ exit
logout
Connection to bandit.labs.overthewire.org closed.

Explanation:
cat -- "--spaces in this filename--" reads it: -- stops option parsing; quotes preserve spaces.

Copyright © 2026 Mahidul Haque. This post is licensed under a CC BY-NC-ND 4.0 license. You may read, learn, and share links to this post for non‑commercial, educational purposes, as long as you give appropriate attribution. You may not copy, reproduce, adapt, distribute, or use this work commercially without explicit permission.