Bandit Level 1 → Level 2

Skills: cat

#Login details:

Username - bandit1
Password - boJ9jbbUNNfktd78OOpsqOltutMc3MY1

#SSH Command:

ssh -p 2220

Looking at home directory (~), we see a file name with hyphen "-", which is odd. If you do cat -, it hangs and doesn't give any output. This is because hyphen is consider as a input to Linux commands specifying args.

Doing cat -, puts us in interactive mode and it takes arguments and promptly displays back.

This can also be done without "hyphen"

To overcome this, we will need to escape "-" and display contents of file -

cat ./-

We can do by using above command -

Last updated