Hola Amigos,
we have ssh-ed into bandit3 till now, & are searching for bandit4 password
Given: the password is in a hidden directory called inhere
- we use ls -la to view all files & directory (including hidden) in the pwd i.e. present working directory
- we see the inhere directory(d in starting not a dash) so cd into it
- use cd inhere/ to change directory
- ls -la to the content of inhere directory
- cat the .hidden file to the password for bandit4
bandit3@bandit:~$ ls -la
total 24
drwxr-xr-x 3 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
drwxr-xr-x 2 root root 4096 May 7 2020 inhere
-rw-r — r — 1 root root 675 May 15 2017 .profile
bandit3@bandit:~$ cd inhere/
bandit3@bandit:~/inhere$ ls -la
total 12
drwxr-xr-x 2 root root 4096 May 7 2020 .
drwxr-xr-x 3 root root 4096 May 7 2020 ..
-rw-r — — — 1 bandit4 bandit3 33 May 7 2020 .hidden
bandit3@bandit:~/inhere$ cat .hidden
pIwrPrtPN36Q************yaFoFgAB
:) good luck for level bandit 4–5 !
P.S. some info about dot files
In Unix-like operating systems, any file or folder that starts with a dot character (for example, /home/user/. config), commonly called a dot file or dotfile, is to be treated as hidden — that is, the ls command does not display them unless the -a or -A flags ( ls -a or ls -A ) are used. ~wikipedia
Above we have used the ls -la flag that is why we were able view the .hidden file.