Find solution for Bandit war-game as a beginner level 0 - level 11
This blogpost contains the solutions of how I solved the challenges of the OverTheWire Bandit category. The purpose of this wargame is to solve the current level’s problem to find the password for the next level. I had used the basic shell commands in this. cd, cat, file, du, find,grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd like that.
level 0 :
Using putty give level 0 password as bandit0
and using hint found the level 1 password
bandit0 ->ls -> cat readme -> exit
level1 pw is :boJ9jbbUNNfktd78OOpsqOltutMc3MY1
level 1:
Using level 1 password loging to level 1
Using hints found level 2 password
bandit 1 -> ls -> cat ./- -> exit
level2 pw is :CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9
level 2:
Login to level 2 and go through the given hints.bandit2 -> ls -> cat "spaces in this filename" -> exit
level3 pw is :UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK
level 3:
Login level 3 and going through the given hints. Using hint can found a hidden file. Using cat operator open the file and found level 4 password.
bandit3 -> ls -> cd inhere -> ls -la -> cat .hidden
level4 pw is :UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK
level 4:
login level 4 and We are told the password is somewhere in the inhere directory and is the only human readable file in the directory. Let’s see what file types we have.
bandit4 -> ls -> cd inhere -> ls -la -> file ./* -> cat ./-file07
level5 pw is :koReBOKuIDDepwhWk7jZC0RTdopnAYKh
level 5:
login in to level5 and go through in the hints. this also similar to previous one.
bandit5 -> ls -> cd inhere -> ls -la -> find ./-size 1033 ->cat ./maybehere07/.file2 -> exit
level6 pw is :DXjZPULLxYr17uwoI01bNLQbtFemEgo7
level 6:
login to the level 6 and searching level 7 password the file size is 33 byte, that file is in anywhere .
bandit6 -> first go ti the root using (find / -size 33c)
-> and find group and other (find / -size 33c -user bandit7 -group bandit6)
and after re direct the unusable files (2</dev/null)
we could found the correct fiele and open the file (cat /var/lib/dpkg/info/bandit7.password
) and got the password
level7 pw is :HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs
level 7:
login in to the level7 next level password stored in data.txt file next word is millionth therefore we should filter that word using grep operator.
bandit7 -> ls -> cat data.txt |grep millionth
level 8 pw is :cvX2JJa4CFALtqS87jk27qwqGhBM9plV
level 8 :
login in to level 8 and it also next level password stored in data.txt file but it is unique therefore we use uniq keyword.
bandit7 -> cat data.txt | sort | uniq -u
level9 pw is :UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR
level 9 :
lpgin in to level 9 and it also next level password stored in data.txt file but it is start from "=" it can read for few people.
bandit9 -> ld -> data.txt -> strings data.txt | grep '='
level10 pw is : truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk
level 10 :
login in to level10 and it also has data.txt file but it contains base64 encoded data.
bandit10 -> ls ->data.txt -> base63 -d data.txt -> exit
level11 pw is :IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR