MonitorsThree

Port scan

β•°β”€βž€  fn 10.129.153.14              
Running initial fast Nmap scan on 10.129.153.14...
Open ports: 22,80
Running detailed Nmap scan on ports: 22,80...
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-26 21:29 IST
Nmap scan report for 10.129.153.14 (10.129.153.14)
Host is up (0.17s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 86:f8:7d:6f:42:91:bb:89:72:91:af:72:f3:01:ff:5b (ECDSA)
|_  256 50:f9:ed:8e:73:64:9e:aa:f6:08:95:14:f0:a6:0d:57 (ED25519)
80/tcp open  http    nginx 1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://monitorsthree.htb/
|_http-server-header: nginx/1.18.0 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 20.06 seconds
Scan complete. Results saved in ports.scan

Subdomain scan

Web Attack (SQLi)

Upon googling the Cacti version that the server is using, I found this: https://github.com/Cacti/cacti/security/advisories/GHSA-cx8g-hvq8-p2rv

Metasploit module -> www-data shell

After a whlie, I found juicy data ...

NOTE:

These are few cmds i usually use to get passwords (if any).

I found cacti dbs' username and password

Since I don't have a proper tty shell, I will make use of -e flag of mysql to run query with cli arguments

Extract username and passwords for marcus user

User shell

I used john to crack the password

But unfortunately we can't use the password to sign in as user (permission denied)

Workaround

Simply do su - marcus on the existing www-data shell we have and enter the password

Retrieve the private key from /home/marcus/.ssh/id_rsa and we can now ssh into box to have proper shell (FINALLY)

Root shell

If we see /opt directory, we find docker-compose file.

I used netstat command to find other ports running on the internal system Found one app on port 8200

Duplicati auth bypass

If we follow the above medium blog, we can bypass the authentication.

  • Take imp data from Duplicati .sqlite db

Take the server-passphrase from the file and follow the steps from the medium blog.

root shell

Add the script in Duplicati settings

You can have the run-script-before-required option from "Add advanced option"

Click on Run now and you will get /bin/bash with SUID privileges.

___________heapbytes' still pwning.

Last updated