SMB guest access exposes a password-protected ZIP containing a PFX certificate.
Cracking both gives a WinRM foothold as legacyy. PowerShell history reveals
svc_deploy credentials — a member of LAPS_Readers — enabling direct Administrator
password retrieval from Active Directory.
OS
Windows Server 2019
Role
Domain Controller
IP
10.129.227.113
User flag
297fd26a…
Root flag
6eafa24f…
Techniques
SMB · PFX · LAPS · WinRM
User Flag
297fd26a1fxxxxxxxxxxxxxxxxxxxxxx
Root Flag
6eafa24ffaxxxxxxxxxxxxxxxxxxxxxx
SMB guest
→
winrm_backup.zip
→
PFX crack
→
legacyy (WinRM)
→
PS History → svc_deploy
→
LAPS_Readers
→
Administrator
01Reconnaissance — Nmap
Full TCP scan with service detection. Port layout immediately signals a Domain Controller: Kerberos (88), LDAP (389/3268), SMB (445) — and crucially WinRM over SSL on port 5986 rather than the usual 5985.
nmap full scan
$nmap-sC -sV -p- --min-rate5000-oNnmap_full.txt10.129.227.113PORT STATE SERVICE53/tcp open domain Simple DNS Plus88/tcp open kerberos-sec Microsoft Windows Kerberos389/tcp open ldap Active Directory LDAP (Domain: timelapse.htb)445/tcp open microsoft-ds?5986/tcp open ssl/wsmans? <-- WinRM over SSL| ssl-cert: Subject: commonName=dc01.timelapse.htb9389/tcp open mc-nmf .NET Message Framingclock-skew: mean: 8h00m02s <-- sync if Kerberos auth needed
takeawayPort 5986 (WinRM/HTTPS) is open — certificate or credential-based login is possible. LAPS documentation in SMB confirms LAPS is deployed on this DC.
02SMB Enumeration — Guest Access
Test for null/guest SMB access. The Shares share is readable without credentials.
Browse the Shares share with smbclient. Two subdirectories:
Dev/ — contains winrm_backup.zip
HelpDesk/ — contains LAPS installer and documentation (breadcrumb toward privesc)
smbclient
$smbclient//10.129.227.113/Sharessmb: \>cd Dev
smb: \Dev\> ls winrm_backup.zip A 2611smb: \Dev\>get winrm_backup.zip
smb: \>cd HelpDesk
smb: \HelpDesk\>ls LAPS.x64.msi LAPS_Datasheet.docx LAPS_OperationsGuide.docx LAPS_TechnicalSpecification.docx
LAPS noteLAPS stores randomised local admin passwords as the AD computer attribute ms-Mcs-AdmPwd. If we find a user with read permission on that attribute, we get the Administrator password.
03Cracking the ZIP — zip2john
The ZIP is password-protected. Extract the hash with zip2john and crack with rockyou.
Check group membership — TIMELAPSE\Development stands out:
whoami /groups
BUILTIN\Remote Management Users EnabledTIMELAPSE\Development EnabledMandatory Label\Medium Plus Mandatory Level
06Privilege Escalation — PowerShell History
Always check the PSReadLine history file early. It logs every command run in previous PowerShell sessions and is a frequent source of credentials on Windows boxes.
how LAPS worksLAPS automatically rotates the local Administrator password on domain-joined machines and stores it as ms-Mcs-AdmPwd on the computer object in AD. Members of LAPS_Readers can read it via a single Get-ADComputer call.
08Root Flag — Administrator via LAPS
Use the retrieved LAPS password to authenticate directly as the local Administrator over WinRM. The root flag is in the TRX user's desktop — a quirk of this box's setup.
01 — hash everythingZIP and PFX containers have independent passwords. Always run zip2john / pfx2john and try rockyou before moving on.
02 — check PS history immediatelyConsoleHost_history.txt under PSReadLine is one of the first things to check post-foothold on any Windows box. Credentials in session history are extremely common.
03 — LAPS_Readers = game overIf a compromised account is in LAPS_Readers, a single AD query retrieves the local Administrator password. Always enumerate group memberships and check LAPS exposure.