Skip to content
Default image

OVERTHEWIRE – BANDIT LEVEL 9 -> LEVEL 10

ssh bandit9@localhost
UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR

or if you are no longer logged in as bandit8:

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

In this level we need to find the password which is stored in the data.txt file in one of the few human-readable strings, preceded by several “=” characters.

The file we are looking for is located in the current working directory.

We know from that the password is in one of the few human-readable strings in the data.txt file. This means we are dealing with a binary file. Using the cat it is not a valid option in this case as it will only fill the terminal with symbols that will make it very hard to go through the document.

At this point you might be wondering how we will move forward. It’s simple, we will use the strings command and the grep command.

strings data.txt | grep '=='

strings -> this command will allow us to see the human-readable text from our binary file

grep '==' -> grep will search for a particular pattern of characters ( '==' in our case) and will print out all the lines that contain that pattern

We can add cat in the above command and get the same result

cat data.txt | strings | grep '=='