Credential Harvesting
After gaining elevated access in AD, credential harvesting extends your reach. LAPS passwords give local admin access to workstations, gMSA hashes give access to service account contexts, and NTDS gives every hash in the domain. Collect these in order of impact before any defensive action can remove your access.
LAPS passwords
LAPS stores auto-rotated local admin passwords in ms-MCS-AdmPwd. With sufficient ACL rights — which elevated accounts often have — you can read the current password for every LAPS-managed machine.
LDAP 10.10.10.10 389 DC01 Computer: WS01$ LAPS: xK9#mP2!vL LDAP 10.10.10.10 389 DC01 Computer: WS02$ LAPS: Tr8@nK4!pQ
gMSA passwords
Group Managed Service Accounts have auto-rotated passwords stored in msDS-ManagedPassword. The blob is only readable by accounts listed in msDS-GroupMSAMembership, but privileged accounts often have read access.
Account: svc-backup$ NTLM: a3b4c5d6e7f8a1b2c3d4e5f6a7b8c9d0
NTDS.dit: full domain hash dump
NTDS.dit contains every domain user's password hash. Extracting it requires Domain Admin. DCSync is the cleanest method — see DCSync and Domain Takeover. When DCSync is blocked, extract NTDS.dit from a shadow copy on the DC.
LSASS: local credentials from memory
LSASS stores NTLM hashes and Kerberos tickets for currently logged-in users. Dumping it gives credentials for active sessions. Particularly valuable on workstations where privileged users are logged in. Requires local admin or SYSTEM.
SMB 10.10.10.20 445 WS01 [+] jsmith:Password123! (NT: fc525c9683e8fe067095ba2ddc971889)
UserName : Administrator Domain : CORP NTLM : fc525c9683e8fe067095ba2ddc971889
To parse a minidump offline on Linux: pypykatz lsa minidump lsass.dmp
Credential search across the domain
Credentials frequently appear in LDAP attributes, SYSVOL scripts, and GPO files.
SMB 10.10.10.10 445 DC01 [+] Found GPP credentials SMB 10.10.10.10 445 DC01 Username: svc-deploy Password: Deploy2019!
GPP passwords are a classic find: Group Policy Preferences XML files in SYSVOL historically stored AES-encrypted passwords using a Microsoft-published key, making them trivially decryptable. Always check SYSVOL even in modern environments since old GPOs are rarely cleaned up.
With a full set of domain credentials the next step is persistence. See Golden and Silver Ticket Persistence and AD Account and ACL Persistence.
References
-
BloodyAD (GitHub)github.com/CravateRouge/bloodyAD (opens in new tab)
get search for LAPS, gMSA, and credential attribute queries
-
gMSADumper (GitHub)github.com/micahvandeusen/gMSADumper (opens in new tab)
Parses msDS-ManagedPassword blobs and outputs NT hashes
-
Impacket (GitHub)github.com/fortra/impacket (opens in new tab)
secretsdump for NTDS.dit offline extraction and DCSync
-
NetExec / nxc (GitHub)github.com/Pennyw0rth/NetExec (opens in new tab)
lsassy, gpp_password, gpp_autologin, laps modules
-
DSInternals (GitHub)github.com/MichaelGrafnetter/DSInternals (opens in new tab)
ConvertFrom-ManagedPasswordBlob for parsing gMSA password blobs on Windows
Was this helpful?
Your feedback helps improve this page.