You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IWbemServices_ExecMethod api can not be monitored in win7 #79
WMI hooks are explicitly enabled by the CoCreateInstance hook when this api is called passing a CLSID related to the WbemLocator object. Take a look to:
In the Post:: section of the hook you'll find the call ole_enable_hooks(clsid)
ole_enabled_hooks compares the clsid argument with the interesting ones
Enable __wmi__ hooks if the target clsid is interesting
If you're not finding the IWbemServices_ExecMethod calls you should:
Ensure that the IWbemLocator related CLSIDs are correct (check the reg key HKCR/WbemScripting.SWbemLocator/CLSID in your VM)
Ensure that the CoCreateInstance is marked as special in its Signature:: section
Ensure that the WMI related hooks are marked as special too
The reason for the special marking of the above hooks is that if you're running Office 2010 the call chain should be:
vbe6_Invoke
CoCreateInstance
IWbemServices_ExecMethod
2 and 3 are likely happening as a result of the first call, so if you don't mark them as special the monitor won't hook.
About Special marking the doc says:
Special:
Mark this API signature as special. Special API signatures are always executed, also when the monitor is already inside another hook. E.g., when executing the system() function we still want to follow the CreateProcessInternalW() function calls in order to catch the process identifier(s) of the child process(es), allowing the monitor to inject into said child process(es).
Activity
doomedraven commentedon Jan 7, 2020
here is the hook if you want to try to fix it https://github.com/cuckoosandbox/monitor/blob/7c5854fae12e1f01f56eab2db4008148c790cc7a/sigs/wmi.rst#iwbemservices_execmethod
qux-bbb commentedon Feb 4, 2020
I compiled a debug version of monitor and resubmitted the sample. In windows xp, I can find this record:
That is normal. But it can not be found in windows 7.
I do not known whether the problem is in wmi.rst's hook. I will try to find the key point.
baxitaurus commentedon Jan 14, 2021
WMI hooks are explicitly enabled by the
CoCreateInstancehook when this api is called passing a CLSID related to theWbemLocatorobject. Take a look to:and
The execution flow is:
CoCreateInstance(clsid)called and hookedPost::section of the hook you'll find the callole_enable_hooks(clsid)ole_enabled_hookscompares the clsid argument with the interesting ones__wmi__hooks if the target clsid is interestingIf you're not finding the
IWbemServices_ExecMethodcalls you should:IWbemLocatorrelated CLSIDs are correct (check the reg keyHKCR/WbemScripting.SWbemLocator/CLSIDin your VM)CoCreateInstanceis marked as special in itsSignature::sectionThe reason for the special marking of the above hooks is that if you're running Office 2010 the call chain should be:
vbe6_InvokeCoCreateInstanceIWbemServices_ExecMethod2 and 3 are likely happening as a result of the first call, so if you don't mark them as special the monitor won't hook.
About
Specialmarking the doc says:qux-bbb commentedon Jan 17, 2021
@baxitaurus Thanks.
This value is for Windows XP:
In Windows 7 x64, It should be:
I try to change the win7's reg item value to xp's:
{76A64158-CB41-11D1-8B02-00600806D9B6}to{4590F811-1D3A-11D0-891F-00AA004B2E24}, but it shows:However I'm already an administrator. I'm stuck here.