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 email@example.com -p 2220
with the password that we got from the previous level
let’s list all the files that are in our home directory
You should get the following
now if we try to open the file with
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
or by using redirection like
cat < -
and that’s how we get the password for our challenge
you can check the next level from here