Skip to content

Instantly share code, notes, and snippets.

@gabrielchl
Last active December 14, 2018 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielchl/23819bcca9c9abfa66644f96ed85725e to your computer and use it in GitHub Desktop.
Save gabrielchl/23819bcca9c9abfa66644f96ed85725e to your computer and use it in GitHub Desktop.
# Level 0
Here's where you start: http://overthewire.org/wargames/bandit/bandit0.html
The login information is given.
Username: bandit0
Password: bandit0
# Level 1
$ ls
There's a file in your home directory, readme
$ cat readme
The password is in the file
Username: bandit1
Password: boJ9jbbUNNfktd78OOpsqOltutMc3MY1
# Level 2
$ ls
There's a file in your home directory, -
As the cat function treats - as stdin/stdout,
$ cat ./-
where ./ stands for current directly,
it forces cat to treat - as the filename
Username: bandit2
Password: CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9
# Level 3
$ ls
The filename has spaces, spaces in this filename
$ cat "spaces in this filename"
Username: bandit3
Password: UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK
# Level 4
bandit3@bandit:~$ ls
inhere
bandit3@bandit:~$ cd inhere
(returns nothing, probably because it's a hidden file)
bandit3@bandit:~$ ls -a (a for all, including hidden files, those that starts with a .)
. .. .hidden
bandit3@bandit:~$ cat .hidden
Username: bandit4
Password: pIwrPrtPN36QITSp3EQaw936yaFoFgAB
# Level 5
bandit4@bandit:~$ ls
inhere
bandit4@bandit:~$ cd inhere
bandit4@bandit:~/inhere$ ls
-file00 -file02 -file04 -file06 -file08
-file01 -file03 -file05 -file07 -file09
(It's said in the website that one of the file is human readable,
so I've decided to cat each file as I don't know how to determine a file's content without doing so)
bandit4@bandit:~/inhere$ cat ./-file00
▒▒▒▒▒▒~% C[▒걱>▒▒| ▒bandit4@bandit:~/inhere$ cat ./-file01
▒▒▒U"7▒w▒▒▒H▒▒ê▒Q▒▒(▒▒▒#▒▒▒bandit4@bandit:~/inhere$ cat ./-file02
▒T▒v▒▒(▒ִ▒▒▒▒▒A*▒
2J▒Ş؇_▒y7bandit4@bandit:~/inhere$ cat ./-file03
▒.A▒▒u▒▒#▒▒▒w$N?c▒-▒▒Db3▒▒=▒▒bandit4@bandit:~/inhere$ cat ./-file04
▒=<▒W▒▒▒▒▒ht▒Z▒▒!▒▒{▒U
▒bandit4@bandit:~/inhere$ cat ./-file05
+▒▒pm▒▒▒;▒▒:D▒▒^▒▒@▒gl▒Q▒bandit4@bandit:~/inhere$ cat ./-file06
▒▒@▒%@▒▒▒ZP*E▒▒1▒V▒▒▒̫*▒▒▒▒bandit4@bandit:~/inhere$ cat ./-file07
koReBOKuIDDepwhWk7jZC0RTdopnAYKh
Username: bandit5
Password: koReBOKuIDDepwhWk7jZC0RTdopnAYKh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment