Timelapse
Overview
A Windows machine releases at 03/26/22 and features:
Active Directory
SMB Shares
LAPS
LDAP
Crack Encrypted ZIP and PKCS12
WinRM Certificate-based Authentication
PowerShell History
Reconnaissance
General Information
Host name
dc01.timelapse.htb
Domain name
timelapse.htb
WinRM over https got a expired TLS certificate
Port Scanning
TCP
Stealthy scanned
Opened ports 53, 88(Kerberos), 135, 139, 389, 5986(WinRM/HTTPs)...
Revealing this is a DC, Domain Controller
Domain
timelapse.htb0
UDP, Top-500
53, 123, 389
LDAP
Null bind test fails
SMB
Got some shares on target
On the
\\dc01.timelapse.htb\Shares
foundfolder
HelpDesk
containingLAPS
related documentfolder
Dev
contains a encrypted filewinrm_backup.zip
SYSVOL
andNETLOGON
got access denied
Initial Access
Crack ZIP encryption
Use
zip2john
get the encrypted zip file hash
Crack the hash by
john
and get passwordsupremelegacy
Crack PKCS12
Unzip the zip file get a file
legacyy_dev_auth.pfx
stringlegacyy@timelapse.htb
Which is protected by a passphrase
Crack by
crackpkcs12
WinRM
We can use this file authenticating with the target over WinRM
Extract the private key from the
.pfx
file
Enumeration
Current User
timelapse\legacyy
Privileges
SeMachineAccountPrivilege
SeIncreaseWorkingSetPrivilege
Groups
Remote Management Users
Pre-Windows 2000 Compatible Access
TIMELAPSE\Development
Active Directory
Compuer Accounts
DC01, DB01, WEB01, DEV01
Users
LAPS
Check for the LAPS password attribute ms-mcs-admpwd
Privilege Escalation
By list files recursive, found the PowerShell history
Alternatively, run the command
Get-PSReadlineOption
And we get the password for user
svc_deploy
who is the member of the
LAPS_Readers
group
We can read the local administrator password by
Reference
Last updated