Over The Wire Bandit Level 1–2

br4ind3ad
2 min readJan 17, 2021

Given that the password for the next level is stored in a file called — (dash)located in the home directory

pointers that you should know about a dashed — file

  • To read a dash file use the following commands
cat -

or

cat < -

or a proper way to view the content of dashed filename would be to prefix the path of the file (like is the file in current directory use “.” or for home use ~ etc)

cat ./-
  • So now we only have to cat the dashed file to get the password for ssh into bandit2

bandit1@bandit:~$ ls -la
total 24
-rw-r — — — 1 bandit2 bandit1 33 May 7 2020 -
drwxr-xr-x 2 root root 4096 May 7 2020 .
drwxr-xr-x 41 root root 4096 May 7 2020 ..
-rw-r — r — 1 root root 220 May 15 2017 .bash_logout
-rw-r — r — 1 root root 3526 May 15 2017 .bashrc
-rw-r — r — 1 root root 675 May 15 2017 .profile
bandit1@bandit:~$ cat < -
CV1DtqXWVF************z0YwRINYA9

:) now we have leveled up to bandit2 & for learning more about dashed file here are 2 links that I found useful

--

--