Repository navigation
[SECRETSDUMP] - NTDS.dit Dumping with Shadow Snapshot Method via WMI (No Code Execution) - #2021
Merged
alexisbalbachan merged 5 commits intoSep 25, 2025
Conversation
added 4 commits
August 10, 2025 19:02
alexisbalbachan
requested changes
Sep 16, 2025
alexisbalbachan
left a comment
Collaborator
There was a problem hiding this comment.
Hi, i've been testing this new method and it looks really good, there are some interactions with other flags that need to be reviewed:
-just-dc-userdoes not work with this method so we need to add a check for that (it already exists: here for the-use-vssflag)-resumefile: Same, it only works for DRSUAPI and there's also a check for that (for the-use-vssflag here)
Extending those checks to also account for the new flag should be enough, then i'll proceed to merge this PR
Contributor
Author
|
Hello @alexisbalbachan, Nice! Understood, I'll work on it. Thanks for your comments. |
Contributor
Author
|
Hi @alexisbalbachan , Adding the checks that you commented plus the requirement of specifying -use-remoteSSWMI when using -use-remoteSSWMI-NTDS. Here are some snapshots.
|
Collaborator
|
Thank you for the changes, everything looks good, merging this PR. |
alexisbalbachan
approved these changes
Sep 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

NTDS.dit Dumping with Shadow Snapshot Method via WMI (No Code Execution)
This method is essentially the same that was implemented in #1719 but also for NTDS.dit.
This PR adds a new flag, -use-remoteSSWMI-NTDS. When this flag is specified (among with specifyng to use this method, -use-remoteSSWMI) secretsdump will download NTDS.dit apart from SAM, SYSTEM and SECURITY. Then, offline, all of them will be parsed and domain credentials will be also dumped.
As a reminder of the workflow of this technique:
Here is an example of an execution.
Here is the relevant part of the help about these flags.
More on this can be read here: https://labs.itresit.es/2025/06/11/remote-windows-credential-dump-with-shadow-snapshots-exploitation-and-detection/
Also, a detection PoC can be found here: https://github.com/I3IT/Detect.Remote.ShadowSnapshot.Dump
Also the options previously implemented have been renamed to clearer names:
IMPORTANT NOTE
When reading directly from disk NTDS.dit it can be in a inconsistent state. For example, when a new user or modifications have been made and they have not been "merged" yet from the transactions logs.
If when using this method you encounter an error during the parsing of ntds.dit and password are not dumped you should try repairing the ESE database using
Esentutl /repair(https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh875504(v=ws.11)). After that, the NTDS database should be fixed and ready to be dumped locally. In a testing environment it would be enough rebooting the DC.