impacket icon indicating copy to clipboard operation
impacket copied to clipboard

Implement PutClass and DeleteClass for WMI

Open NtAlexio2 opened this issue 1 year ago • 7 comments

This PR adds two most wanted PutClass and DeleteClass functions to wmi.py (issue #1186, this Reddit link, wmiexec-Pro project, ...) which unlocks many new features for wmi in future. The PR also includes:

  • Add ObjectFlags constants referenced in MS-WMIO (2.2.6 ObjectFlags) to wmi.py file. It helps to easy debugging and code maintenance.
  • Bug fix in CLASS_AND_METHODS_PART class to handle empty class names.

NtAlexio2 avatar Sep 03 '24 07:09 NtAlexio2

@anadrianmanrique Some updates on this PR. Please check <3

NtAlexio2 avatar Jul 13 '25 10:07 NtAlexio2

Wow, this is awesome!!!!

XiaoliChan avatar Sep 15 '25 09:09 XiaoliChan

@anadrianmanrique When you get a chance, please review this PR — I’m pretty excited about these changes, they should make a real difference on WMI! 💪

NtAlexio2 avatar Oct 10 '25 20:10 NtAlexio2

@NtAlexio2 thanks, yes, this PR has been already prioritized to be reviewed/tested in the context of 0.14-dev

anadrianmanrique avatar Oct 15 '25 21:10 anadrianmanrique

@NtAlexio2 BTW, could you add the test case in https://github.com/fortra/impacket/blob/master/tests/SMB_RPC/test_wmi.py ?

XiaoliChan avatar Oct 16 '25 03:10 XiaoliChan

Hi @NtAlexio2, as @XiaoliChan pointed out, would it be possible to add tests cases coverage?

anadrianmanrique avatar Nov 06 '25 13:11 anadrianmanrique

sure, I'll fix that asap

NtAlexio2 avatar Nov 08 '25 14:11 NtAlexio2