PORT STATE SERVICE REASON VERSION
22/tcp open ssh syn-ack ttl 63 OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
8080/tcp open nagios-nsca syn-ack ttl 63 Nagios NSCA
| http-methods:
|_ Supported Methods: GET HEAD OPTIONS
|_http-title: Home
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Website
The website itself is described as Zodd Cloud which is a place to store, share and collaborate on files and folders.
There's not much to the page itself, the registration is disabled and the login button is a dead end.
But there's and upload button wich will take you to a page where you are able to upload files.
Foothold
Exploitation
Upload: LFI & Directory Listing
As always I let Burp run in the background and browse the page, click on everything and check what I got in Burp.
After uploading an image I already noticed the URL which looked like a typical target for a LFI.
URL: /show_image?img=cat.png
And as I thought I was able to verify it's vulnerable to LFI and even lists directories!
But you would have to either use curl or Burp to see the results as the Webapp tries to display the response as Image.
Display: /etc/passwd
GET /show_image?img=../../../../../../etc/passwd HTTP/1.1
Host: 10.129.54.43:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
token: ddac62a28254561001277727cb397baf
While looking around I discovered a folder called .m2 in franks home directory. That folder contained a settings.xml which included credentials for the user account of phil.
su - phil
Flag
The flag is located in /home/phil
Escalation
Local Enumeration
User Phil is member of the group staff which could be interesting.