SELECT * FROM events WHERE devicetype=12 AND LOWER("Parent Process Path") LIKE '%\wbem\wmiprvse.exe' AND (((LOWER("Process Path") LIKE '%\certutil.exe' OR LOWER("Process Path") LIKE '%\cscript.exe' OR LOWER("Process Path") LIKE '%\mshta.exe' OR LOWER("Process Path") LIKE '%\msiexec.exe' OR LOWER("Process Path") LIKE '%\regsvr32.exe' OR LOWER("Process Path") LIKE '%\rundll32.exe' OR LOWER("Process Path") LIKE '%\verclsid.exe' OR LOWER("Process Path") LIKE '%\wscript.exe') OR (LOWER("Process Name") LIKE '%\certutil.exe' OR LOWER("Process Name") LIKE '%\cscript.exe' OR LOWER("Process Name") LIKE '%\mshta.exe' OR LOWER("Process Name") LIKE '%\msiexec.exe' OR LOWER("Process Name") LIKE '%\regsvr32.exe' OR LOWER("Process Name") LIKE '%\rundll32.exe' OR LOWER("Process Name") LIKE '%\verclsid.exe' OR LOWER("Process Name") LIKE '%\wscript.exe')) OR ((LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\cmd.exe') AND (LOWER(Command) LIKE '%cscript%' OR LOWER(Command) LIKE '%mshta%' OR LOWER(Command) LIKE '%powershell%' OR LOWER(Command) LIKE '%pwsh%' OR LOWER(Command) LIKE '%regsvr32%' OR LOWER(Command) LIKE '%rundll32%' OR LOWER(Command) LIKE '%wscript%'))) AND (NOT(((LOWER("Process Path") LIKE '%\werfault.exe' OR LOWER("Process Name") LIKE '%\werfault.exe') OR (LOWER("Process Path") LIKE '%\wmiprvse.exe' OR LOWER("Process Name") LIKE '%\wmiprvse.exe') OR ((LOWER("Process Path") LIKE '%\msiexec.exe' OR LOWER("Process Name") LIKE '%\msiexec.exe') AND LOWER(Command) LIKE '%/i %'))))