feat(smb): add sswmi (WMI shadow snapshot) dump method to --sam/--lsa/--ntds - #1370
Open
hakimonr wants to merge 2 commits into
Open
feat(smb): add sswmi (WMI shadow snapshot) dump method to --sam/--lsa/--ntds#1370hakimonr wants to merge 2 commits into
hakimonr wants to merge 2 commits into
Conversation
…/--ntds Create a remote Shadow Snapshot via WMI (Win32_ShadowCopy) and download SAM, SYSTEM and SECURITY (and optionally NTDS.dit) over SMB from the snapshot, then parse locally. No code execution on the target, which makes this method usable in EDR-protected environments where reg save, service creation or vssadmin are blocked. - --sam/--lsa/--ntds accept the new 'sswmi' choice - --sswmi-volume selects the remote volume (default C:\) - combined flags share a single snapshot - reuses impacket RemoteOperations.createSSandDownloadWMI (already in the pinned impacket revision, no dependency change)
hakimonr
requested review from
Marshall-Hallenbeck,
NeffIsBack,
mpgn and
zblurx
as code owners
August 20, 2026 09:43
|
It looks like the PR template may not have been filled out. The following sections appear to be missing:
Please edit your PR description to include them. The template helps reviewers understand and test your changes. Thanks! |
Member
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.
Description
Adds
sswmias a new dump method for--sam,--lsaand--ntdson the SMB protocol, plus--sswmi-volumeto pick the remote volume. Closes #1360.The idea came from an engagement where the current methods (regdump/secdump/vss) were all blocked by the EDR, while
impacket-secretsdump -use-remoteSSWMIwent through without any alert. That method creates a shadow snapshot via WMI (Win32_ShadowCopy) and downloads the hives over SMB — no code execution on the target. impacket already ships this (RemoteOperations.createSSandDownloadWMI) in the version NetExec pins, so no new dependency is required.AI assistance: the implementation was drafted with help from DeepSeek V4 Flash (current version). The code was reviewed, tested and validated by me against a live target (details in the Setup guide below).
Technique reference: impacket's
-use-remoteSSWMI(https://github.com/fortra/impacket/blob/master/examples/secretsdump.py) and the underlyingRemoteOperations.createSSandDownloadWMI(https://github.com/fortra/impacket/blob/master/impacket/examples/secretsdump.py).Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
Tested against a Windows 10 IoT Enterprise LTSC target (DESKTOP-J6FIUBI) from a Kali Linux box (Python 3.13), with a local admin account (
Pwn3d!).What is needed to reproduce:
LocalAccountTokenFilterPolicy = 1underHKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System(this is a common requirement for remote admin tools, not specific to this change)Commands used:
Screenshots (if appropriate):
Example output from the live test:
Checklist:
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
poetry run ruff check ., use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)