HTB: ServMon
← Back to the log
October 26, 2026·Johnytiger

HTB: ServMon

ServMon starts with anonymous FTP and an LFI in the NVMS-1000 app on port 80. We read a passwords file off Nathan's desktop through the LFI, spray the creds over SSH and log in as Nadine for the user flag. NSClient++ is listening on 8443 behind the firewall, so we tunnel in over SSH, pull the admin password from the config, upload a script through the REST API and execute it to land a SYSTEM shell and grab root.

securityctfwriteuphacktheboxwindowslfinvmsnsclientssh tunnelingprivilege escalation

Looking at our nmap scan we see we have anonymous FTP on 21, SSH on 22, and an app on port 80.

The nmap scan showing anonymous FTP on 21, SSH on 22 and an app on port 80

Let's go straight to port 80 and check out what's being served there.

The NVMS-1000 login page served on port 80

It's NVMS-1000 and its login page. Looking this up shows us there's an LFI (local file inclusion) vulnerability in this app (exploit-db.com/exploits/47774). Let's try and hit it. We'll launch Burp and capture a request.

Capturing the request in Burp and confirming the LFI vulnerability

We have LFI, great. Let's enumerate and see what we can find. We'll run this through Burp Intruder with a list of directories to check.

Running the LFI through Burp Intruder against a list of directories

We get a few hits but checking through them we don't find much. Let's note this vulnerability down and go ahead and check out the FTP.

Browsing the anonymous FTP share

Looking into the FTP we find two users, Nadine and Nathan. Let's note them down, enumerate, and download whatever they have in their directories.

A note on the share mentioning a passwords file on Nathans desktop

One of the notes suggests that Nathan has a Passwords.txt file on his desktop. Let's try to hit that through our LFI.

Requesting the Passwords file on Nathans desktop through the LFI

/../../../../../../../../../../../../Users/Nathan/Desktop/Passwords.txt

The LFI returning the contents of the passwords file

We get a hit! Let's note these down in a passwords list and spray them on the system. We'll use netexec over SSH and see what we get.

nxc ssh 10.129.227.77 -u users.txt -p passwords.txt --continue-on-success

netexec spraying the recovered passwords over SSH and getting a hit

We get a hit! Alright, let's log in as Nadine.

Logging in over SSH as Nadine

Great, let's search the desktop and see if we find the user.txt flag.

The user flag on Nadines desktop, blurred

We got it. Now let's check our privileges and what's running on the system. Looking back at our nmap scan we saw that NSClient++ is running on 8443, but we aren't able to hit it from the outside.

The nmap scan showing NSClient listening on port 8443

Let's create a tunnel since we have SSH access.

ssh -L 8443:127.0.0.1:8443 nadine@10.129.227.77

The NSClient web interface reached through an SSH tunnel

Seems a little broken but at least we can still navigate through it. Clicking around does absolutely nothing, so doing a little research we find out that this app has a REST API, maybe we can control it that way.

Researching the NSClient REST API

OK, we can upload a payload and get a reverse shell if we have the admin password for the app, so let's go check the config files for it.

type "C:\Program Files\NSClient++\nsclient.ini"

Reading the admin password out of the nsclient config file

Great, we have the password. Now let's build that payload and ship it over. Looking up the vulnerability, we need to make sure external scripts are enabled.

Checking that external scripts are enabled in NSClient

Which we apparently do.

Confirming external scripts are turned on

Alright, let's hit it. Our evil.bat just kicks back a reverse shell to a netcat listener we've got waiting, and we upload it through the API.

curl -s -k -u admin:ew2x6SsGTxjRwXOT -X PUT \
  "https://127.0.0.1:8443/api/v1/scripts/ext/evil.bat" \
  --data-binary @evil.bat

Uploading a batch script through the NSClient REST API

It uploaded! Now let's try to execute it.

curl -s -k -u admin:ew2x6SsGTxjRwXOT \
  "https://127.0.0.1:8443/api/v1/queries/evil/commands/execute?time=30s"

Executing the script and catching a shell running as SYSTEM

We are in, and our listener catches a shell running as nt authority\system. Heading over to the administrator's desktop we can go ahead and grab the root.txt flag.

The root flag on the administrator desktop, blurred

And that's ServMon. Anonymous FTP leaking notes, an LFI to read a password file off a user's desktop, those creds reused on SSH for the user flag, and a firewalled NSClient++ that we tunneled into and abused through its REST API to go from a low-priv user straight to SYSTEM.

End of transmissionAll posts
Drive
Johnytiger
HTB: ServMon · Johnytiger