Starter
Last updated
Last updated
First thing I scan the machine for open ports using nmap
and rustscan.
Second is faster than first and I do a simple scan.
nmap
rustscan
Looks like we have 3 open ports:
21 (FTP)
22 (SSH)
80 (HTTP)
Start with FTP port and looks like can login with default credentials -> anonymous:anonymous
In the FTP server found 3 files: 1 jpg, 2 text. Remember: always to add -a tags at ls command, you can find some hidden files.
In this files we do not get important information
HTTP port
Try to enumerate the website, but I get just the /files
directory and this seems to be the what we get in the FTP server. Also nikto
don’t find nothing more.
You can change the wordlist and add some extensions if you want
In the / will find the recipe.txt
file when you can get the answer for first question. Also in this directory you will find another directory the owner being www-data.
I found a pcapng
file. Let’s download it and analyze it.
In the pcapng
file we get Follow TCP Stream
and get the password for the user lennie
In the home directory of lennie
found the user flag, and another important file. Looks like the planner.sh
file execute another file print.sh
as root on. We have full permission for print.sh
, so let’s put a payload in this and open another reverse shell and get the root privilege.
After waiting some minutes get the root shell:
The /ftp
directory on the ftp server seems to have full permissions, so I upload a in this directory to get a reverse shell. Access the file from the website and get a reverse shell. Don’t forget to establish a reverse shell.