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.htbDomain name
timelapse.htbWinRM 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\Sharesfoundfolder
HelpDeskcontainingLAPSrelated documentfolder
Devcontains a encrypted filewinrm_backup.zipSYSVOLandNETLOGONgot access denied
Initial Access
Crack ZIP encryption
Use
zip2johnget the encrypted zip file hash
Crack the hash by
johnand get passwordsupremelegacy
Crack PKCS12
Unzip the zip file get a file
legacyy_dev_auth.pfxstringlegacyy@timelapse.htbWhich 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
.pfxfile
Enumeration
Current User
timelapse\legacyyPrivileges
SeMachineAccountPrivilegeSeIncreaseWorkingSetPrivilege
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-PSReadlineOptionAnd we get the password for user
svc_deploywho is the member of the
LAPS_Readersgroup
We can read the local administrator password by
Reference
Last updated