Bandit Level 9 Solution

Bandit level 9 teaches you how to search for a character that is repeated multiple times.

Let’s start by logging into bandit 9 machine

ssh bandit9@bandit.labs.overthewire.org -p 2220

with the password that we got from the level before

UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR

We know the password is preceded by some of “=” characters.

Let’s try by displaying the content of the file

Now we got some rubish that we can’t understand anything from it, Let’s get the strings that are human readable by using “strings” command

strings data.txt

and we get some

Z/,_
WW"&8
2Qk)
xWa_
x?Xn
//M$
;yzEt!
WpU~e
`Rn,I
VSXdK
WB|{
GhG$
========== the*2i"4
.......

now let’s search for all sentences that contains multiple “=” characters

strings data.txt | grep ==

and we shall get the following strings

========== the*2i"4
========== password
Z)========== is
&========== truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk

so the password for the next level is obviously is the following

truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk