💻
Ashish Khairnar
  • #whoami
  • Exam Reviews
    • Certified Red Team Professional Exam
  • OverTheWire
    • Bandit
      • Bandit Level 0
      • Bandit Level 0 → Level 1
      • Bandit Level 1 → Level 2
      • Bandit Level 2 → Level 3
      • Bandit Level 3 → Level 4
    • Natas
      • Natas Level 2 → Level 3
      • Natas Level 3 -> Level 4
      • Natas Level 4 -> Level 5
      • Natas Level 5 -> Level 6
      • Natas Level 6 -> Level 7
      • Natas Level 7 -> Level 8
      • Natas Level 8 -> Level 9
  • TryHackMe - Write-ups
    • TryHackMe - Vulnnet
  • HackTheBox - Writeups
    • HTB - ScriptKiddie
Powered by GitBook
On this page

Was this helpful?

  1. OverTheWire
  2. Bandit

Bandit Level 1 → Level 2

Skills: cat

PreviousBandit Level 0 → Level 1NextBandit Level 2 → Level 3

Last updated 4 years ago

Was this helpful?

#Login details:

Username - bandit1
Password - boJ9jbbUNNfktd78OOpsqOltutMc3MY1

#SSH Command:

ssh bandit1@bandit.labs.overthewire.org -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 -

CAT interacitive
Password for next level