Netmon Walkthrough
Hey folks, today we have one of Hack The Box machines, itβs a retired one so letβs start our walkthrough with its info


As you can see itβs very similar to real-life machines and I think itβs the most interesting one Iβve played, so letβs get startedβ¦
Nmap Scan
As usual, we will start our scan with nmap
scan to know what ports are open and what the services run on them, so letβs scan by nmap -A -T4 -oG netmon.gnmap 10.10.10.152

As you can see we have ftp/http/smb
been open but not something that ftp
login allowed for anonymous.
Letβs start with brute-forcing the credentials by using brutespray
and the file which we generate before netmon.gnmap
β brutespray -f netmon.gnmap

As you can see, we have 2 valid accounts for ftp
server with the username:anonymous
and the password:111111 and 12345
FTP & User Flag
Let's log in to the ftp
server with these credentials by typing β ftp
β open
β 10.10.10.152
β enter username
β enter password

As you can see weβre logged in to the FTP server so letβs search for the user flag in the Users
directory

Good, we have the user flag into the Public
directory into the Users
directory, ftp
server used only for file sharing, so we cannot open and read the flag, so we will download it to the local machine by this command get
and you can know all the available commands by typing help


But unfortunately we canβt open the Administrator directory, upload reverse shell file or even get the system info because as I said before this server is only for file sharing not for anything else.
Website Enumeration
So letβs try to find any entry point on the website by opening 10.10.10.152:80
and it will redirect you to 10.10.10.152/index.htm
βPRTG Network Monitorβ page with the version of this monitor at the bottom

For now, we will do 3 tasks:
Check the source code and hidden directories
Try to find public exploits related to this version
Check the FTP files again
Check the source code and hidden directories
For the source code it doesnβt have any important informations and also for the hidden directories, NO useful informations
Finding public exploit
Iβve used google
and searchsploit
to check for any public exploit and find these results, google
also returned the same results

We have the first one need us to be authenticated, so we will search for the default credentials for prtg
and we will find these results

But unfortunately, it doesnβt work. Also, Iβve searched for how to bypass prtg authentication
and Iβve found CVE for that, but itβs fixed. NO more time will spend in this step, lets go to the next step
Check the ftp directories
Discover the ftp
directories through the browser or the server itself. I prefer to open it through the server to manage to discover the hidden directories and files by typing ls -la
so Iβll use the 2 methods
For the PRTG Configuration
file we have found this username prtgadmin
and this username we have found it before in the above step

Iβve continued searching for passwords in the whole directories but unfortunately canβt find anything, so letβs start to discover the hidden directories and files from the server
Iβve found this directory and contain all these files, one of them is a backup file

After opening the backup file and searching for a password, Iβve got this

Iβve tried to login to the admin panel with these credentials, and It fails, so Iβve changed 2018 to 2019, and itβs worked.
When we access the admin panel we should search for any upload function to upload the reverse shell or any function which pings to another client, so we can open also reverse shell but nothing, so we returned to the Exploitation which we found it before βAuthenticatedβ and opened it

It required the Cookies
value

As you can see it create for us new user with root privileges
RCE & Root flag
We will use PsExec
to connect to the windows remote device

we will use metasploit
for this tasks

Select it and insert the credentials which we create before form the last exploitation
We will use this module because it will connect to the machine through
smb
port, and we have this port is open fromnmap
scan step

And then run

Now weβre root :)

Last updated