Bandit Level 3 → Level 4

Skills: Reading hidden files.

#Login details:

Username - bandit3
Password - UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

#SSH Command:

ssh bandit3@bandit.labs.overthewire.org -p 2220

After login in, we see "inhere" directory. Going inside using cd command and by running ls command, we don't see anything.

Running ls -la, we see .hidden file. Doing cat on .hidden, we get password -

# Performing directory listing using ls command
bandit3@bandit:~$ ls
inhere

# Going inside inhere directory using cd 
bandit3@bandit:~$ cd inhere/

# Performing directory listing using ls 
bandit3@bandit:~/inhere$ ls

# Performing directory listing for ALL files (including hiiden files) using ls -la
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

# Looking inside .hidden file
bandit3@bandit:~/inhere$ cat .hidden 
pIwrPrtPN36QITSp3EQaw936yaFoFgAB

In Linux, files are hidden by prepending filename with period. This is mostly used to hide config files which cannot be accidentally deleted unless manually specified.

Last updated