Skip to content

Add wmimultitool.py: WMI multitool via DCOM - #8

Merged
aconite33 merged 4 commits into
masterfrom
feature/wmi-multitool
Aug 15, 2026
Merged

Add wmimultitool.py: WMI multitool via DCOM#8
aconite33 merged 4 commits into
masterfrom
feature/wmi-multitool

Conversation

@aconite33

@aconite33 aconite33 commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Adds wmimultitool.py to examples/ — a comprehensive WMI multitool that performs remote Windows operations via DCOM without spawning any process on the target. 11 modules, 40+ actions.

Modules

Module Namespace Description
reg root/default Registry operations via StdRegProv (query, add, delete, createkey)
service root/cimv2 Win32_Service management (list, start, stop, status)
process root/cimv2 Win32_Process listing and termination by PID
enum root/cimv2 System enumeration: sysinfo, users, groups, shares, disks, network, startup, hotfix, sessions, env, bios
defender Microsoft/Windows/Defender Defender status, exclusion management (add/remove path/process/extension)
av SecurityCenter2 AV/antispyware/firewall product detection with productState decoding
eventlog root/cimv2 Event log list, filtered read, and clear via Win32_NTEventLogFile
net StandardCimv2 TCP/UDP connections + DNS cache (netstat equivalent, no netstat.exe)
rdp cimv2/TerminalServices Remote Desktop enable/disable/status
file root/cimv2 File search, ls, copy, delete via CIM_DataFile (mandatory drive+path filter)
share root/cimv2 Network share creation and deletion

Key design points

  • Namespace routing via NAMESPACE_MAP — each module connects to the correct WMI namespace
  • Follows impacket conventions: Fortra license header, subparser CLI, run(remoteName, remoteHost) pattern, try/finally DCOM cleanup
  • Full auth support: -hashes, -k, -aesKey, -keytab, -target-ip, -dc-ip
  • Safety: file search requires -drive and -path filters (unfiltered CIM_DataFile hangs the target)

Test plan

  • Verify help output at all levels (-h for each module and sub-action)
  • Test registry: wmimultitool.py user:pass@host reg query -keyName 'HKLM\SOFTWARE\Microsoft'
  • Test service: wmimultitool.py user:pass@host service list
  • Test process: wmimultitool.py user:pass@host process list
  • Test enum: wmimultitool.py user:pass@host enum sysinfo
  • Test defender: wmimultitool.py user:pass@host defender status
  • Test av: wmimultitool.py user:pass@host av list
  • Test eventlog: wmimultitool.py user:pass@host eventlog list
  • Test net: wmimultitool.py user:pass@host net tcp
  • Test rdp: wmimultitool.py user:pass@host rdp status
  • Test file: wmimultitool.py user:pass@host file search -drive C: -path '\Windows\System32\' -ext dll
  • Test share: wmimultitool.py user:pass@host share create -name TEST -path C:\Temp
  • Test with Kerberos: wmimultitool.py -k -no-pass host enum sysinfo

…d enumeration via DCOM

Consolidates multiple WMI operations into a single tool that performs all
actions via DCOM without spawning processes on the target. Includes four
modules: reg (StdRegProv registry ops), service (Win32_Service management),
process (Win32_Process listing/termination), and enum (system enumeration
for sysinfo, users, groups, shares, disks, and network adapters).
Add 7 new modules (defender, av, eventlog, net, rdp, file, share) and 5 new
enum sub-actions (startup, hotfix, sessions, env, bios). All operations use
DCOM/WMI only with no subprocess spawned on the target.

New modules:
- defender: Defender status, exclusion management (add/remove path/process/ext)
- av: Security product detection via SecurityCenter2 (AV, antispyware, firewall)
- eventlog: Event log list, read (filtered), and clear via Win32_NTEventLogFile
- net: TCP/UDP connections and DNS cache via StandardCimv2 (netstat equivalent)
- rdp: Remote Desktop enable/disable/status via TerminalServices namespace
- file: File search, ls, copy, delete via CIM_DataFile (mandatory drive+path filter)
- share: Network share create/delete via Win32_Share

Refactored namespace routing to use NAMESPACE_MAP for clean multi-namespace
support across root/default, root/cimv2, SecurityCenter2, StandardCimv2,
Microsoft/Windows/Defender, and cimv2/TerminalServices.
- Win32_NTEventLogFile property is 'LogfileName' not 'LogFileName'
- RDP: use ExecQuery to get TerminalServiceSetting instance for method
  calls instead of singleton path which may not work via DCOM
Call Win32_Process.GetOwner() on each process instance to show
DOMAIN\User in the output. Requires Handle in the SELECT for
WMI dynamic method dispatch to work.
@aconite33
aconite33 merged commit d2bfedc into master Aug 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant