Bandit level 1 teaches you about how to deal with special characters in bash in case you have a file that starts with them, for a list of special characters , you can check it from here.
Let’s start by logging into bandit level 1 machine
ssh bandit1@bandit.labs.overthewire.org -p 2220
with the password that we got from the previous level
boJ9jbbUNNfktd78OOpsqOltutMc3MY1
let’s list all the files that are in our home directory
ls -la
You should get the following
now if we try to open the file with
cat -
you will get a blank input with repeating the input that you type because – character is a convention to refer stdin or stdout.
in order to open a file that starts with “-” or it’s called “-“, you have two ways, the first one is to specify the full path like
cat ./-
or by using redirection like
cat < -
and that’s how we get the password for our challenge
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9
you can check the next level from here
Recent Comments