Bandit 2 ( level 1->2 )
Level Goal
The password for the next level is stored in a file called - located in the home directory
Commands you may need to solve this level
ls , cd , cat , file , du , find
Helpful Reading Material
Solving
ssh into bandit1:
In this level we'll be dealing with a tricky file name.

As you can see in the img1, we have a file named - (dash). Which we can't just cat it ordinary.

You can see in img2 that the cat command is not reading texts inside the - file.
The reason is in the command cat - : the - tells cat to read from stdin rather than a file.
To solve our scenario we can use './' before a file name to directly reference to a file like:

There we go, we captured our flag.
Last updated