Netmon

Overview

Initial Foothold : RCE in PRTG NetMon

Privilege Escalation : No Need

Enumeration

Port Scanning

Start with full port scan

Ftp port 21 was open and also anonymous access was allowed this information we got from our nmap full port scan

Lets start with ftp

FTP Enumeration

Got directory listing on ftp

Lets enumerate through the files

Got user.txt file in /users/public directory

Till now that all we need from ftp enumeration. If we stuck on anything we will again enumerate this port

Lets start with web enumeration as port 80 was open

Web Enumeration

Now visit the webpage

PRTG Network Monitor was running

Next search for this service on google

Got a RCE exploit for this service

But this requires authentication and we dont have any creds till now

Search for any default credentials for this service

Got the username prtgadmin and password as prtgadmin

Now try this creds on our target website

And this didn't worked

We have an exploit but we dont have correct credentials

Options we have

  • Bruteforce

  • Finding any configuration file in FTP

Lets start with finding creds in the directory in ftp

First we need proper or exact path of the file we want

After some googling I got a post which tells us about the storage of creds

In this post we got the exact location of the files we need

lets open ftp session and get to path described

Got some configuration files. Download them using get command.

I haven't got much information in configuration.dat and configuration.old file

but got some creds in configuration.old.bak file

After trying this creds I haven't got the admin session may be if we change 2018 to 2019 in password then we can get it because it is the backup file and can contains old passwords

prtgadmin : PrTg@dmin2019

And we were right we got admin session using this creds

Exploitation

We got admin session, we got exploit for this service lets exploit

circle-info

Properly copy the exploit code or it will generate errors

This exploit requires the cookies of admin session

We can get that using brupsuite

Copy the cookie value and fire the exploit

This exploit will create a user in administrative users group

The exploit succesfully created pentest user with password P3nT3st!

Now use psexec.py script to get the shell

And got the root shell

That' all for this box

Thank you :)

Last updated