Initial Access (TA0001)(external, opens in a new tab or window)
text code block:sequence by host.id with maxspan = 5s [any where host.os.type == "windows" and (event.category : ("library", "driver") or (event.category == "process" and event.action : "Image loaded*")) and (?dll.name : "wmiutils.dll" or file.name : "wmiutils.dll") and process.name : ("wscript.exe", "cscript.exe")] [process where host.os.type == "windows" and event.type == "start" and process.parent.name : "wmiprvse.exe" and user.domain != "NT AUTHORITY" and (process.pe.original_file_name : ( "cscript.exe", "wscript.exe", "PowerShell.EXE", "Cmd.Exe", "MSHTA.EXE", "RUNDLL32.EXE", "REGSVR32.EXE", "MSBuild.exe", "InstallUtil.exe", "RegAsm.exe", "RegSvcs.exe", "msxsl.exe", "CONTROL.EXE", "EXPLORER.EXE", "Microsoft.Workflow.Compiler.exe", "msiexec.exe" ) or process.executable : ("C:\\Users\\*.exe", "C:\\ProgramData\\*.exe") ) ]
Install detection rules in Elastic Security
Detect Windows Script Interpreter Executing Process via WMI in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).