Bandit 3 → 4
Goal: read the password from a hidden file inside the inhere directory.
Approach
Section titled “Approach”bandit3@bandit:~$ cd inherebandit3@bandit:~/inhere$ ls -latotal 12drwxr-xr-x 2 root root 4096 Jul 28 19:03 .drwxr-xr-x 3 root root 4096 Jul 28 19:03 ..-rw-r----- 1 bandit4 bandit3 33 Jul 28 19:03 ...Hiding-From-Youbandit3@bandit:~/inhere$ cat ./...Hiding-From-YouThe password you are looking for is: <password>Password
2WmrDFRmJIq3IPxneAaMGhap0pFhF3NJWhy it works
Section titled “Why it works”ls omits any name beginning with a dot by default, so -a is needed to list it. The leading dots are only a naming convention, not a filesystem attribute, so once you name the file it reads like any other.