# OverTheWire ###### tags: `ctf` `overthewire` ## Bandit * CTF: https://overthewire.org/wargames/bandit/ #### Level -1 ```bash= ssh bandit0@bandit0.labs.overthewire.org -p 2220 ``` #### Level 0 ```bash= ls cat readme ``` :::success boJ9jbbUNNfktd78OOpsqOltutMc3MY1 ::: #### Level 1 ```bash= ls cat ./- ``` :::success CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9 ::: #### Level 2 ```bash= ls cat 'spaces in this filename' ``` :::success UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK ::: #### Level 3 ```bash= ls -la cd inhere cat .hidden ``` :::success pIwrPrtPN36QITSp3EQaw936yaFoFgAB ::: #### Level 4 ```bash= ls -la cd inhere ls -la file ./* cat ./-file07 ``` :::success koReBOKuIDDepwhWk7jZC0RTdopnAYKh ::: #### Level 5 To find the file of 1033 bytes in size ```bash= ls -la du -ab . | grep 1033 1033 ./maybehere07/.file2 ``` `du -a` to work in all files `du -b` to show size in bytes To check if the file is not a executable ```bash= ls -la ./maybehere07/.file2 rw-r----- 1 root bandit5 1033 May 7 2020 ./maybehere07/.file2 ``` To check if the file is human-readable ```bash= file ./maybehere07/.file2 ./maybehere07/.file2: ASCII text, with very long lines ``` :::success DXjZPULLxYr17uwoI01bNLQbtFemEgo7 :::