Skip to content

Conversation

@ShutdownRepo
Copy link
Member

Original PR on fortra/impacket: fortra#2059

Wired the argument -history to be applicable for dumping SAM hash history for both regsecrets.py and secretsdump.py.

Applicable to both remote and local operations with secretsdump.py

Copied the _history style seen in the NTDS with _history[num]. _history0 is also the current password/hash that's set and _history1 is the last password/hash set.

This was tested against Windows 10/11 Pro. Could probably be implemented for old-style hashes for Windows XP and Server 2003 but currently if -history is passed with secretsdump.py against older systems it will just not attempt to parse history.
[+] Skipping old-style history...

Local Secretsdump.py
localsecretsdumpy2

Remote Secretsdump.py:
secretsdump

Regsecrets.py:
regsecrets

Corresponding hashes confirmed with mimikatz:
mimikatz

@ShutdownRepo ShutdownRepo merged commit cdd1e08 into ThePorgs:main Dec 19, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants