Dumping LSA secrets: a story about task decorrelation
The author found that an EDR blocked standard LSA secrets dumping tools like NetExec and reg save, but allowed reg export. By exporting the SAM, SECURITY, and SYSTEM hives, importing them into a local VM, and re-saving them with reg save, they could dump the hives. They also retrieved the boot key by reading registry key class values, either via a custom binary or by printing the registry hive to PDF, and then decrypted the secrets offline.
Published on sensepost.com
While doing an internal assessment, I was able to compromise multiple computers and servers but wasn’t able to dump the LSA secrets because of a particular EDR being installed and pretty aggressive against me.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the EDR only monitored specific actions (like reg save and remote registry access) and did not correlate the combination of reg export, local re-import, and offline decryption.
Impact
An attacker with administrative access could dump LSA secrets despite the EDR, potentially leading to credential theft.
What the attacker needed
Administrative access to the target; ability to run reg export; a local Windows VM; ability to run a custom binary or print registry
The fix
The text does not describe a fix; it suggests EDR correlation and class-value protection could help.
How it was found
- Export the SAM, SECURITY, and SYSTEM hives using reg export.
- Import the exported .reg files into a local Windows VM under HKCU\HELLO.
- Use reg save to save the imported hives as .hive files.
- Retrieve the boot key by reading the class values of four registry keys (JD, Skew1, GBG, Data) using a custom binary or by printing the registry hive to PDF.
- Run secretsdump with the saved hives and the boot key to decrypt the secrets.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
LSA secrets are passwords and other sensitive data stored by Windows. Security tools often block attempts to read them. The author found a way to read them in smaller steps that the security tool did not block.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.