Windows Script Interpreter Executing Process via WMIedit

Identifies use of the built-in Windows script interpreters (cscript.exe or wscript.exe) being used to execute a process via Windows Management Instrumentation (WMI). This may be indicative of malicious activity.

Rule type: eql

Rule indices:

  • winlogbeat-*
  • logs-windows.sysmon_operational-*
  • endgame-*

Severity: medium

Risk score: 47

Runs every: 5m

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References: None


  • Domain: Endpoint
  • OS: Windows
  • Use Case: Threat Detection
  • Tactic: Initial Access
  • Tactic: Execution
  • Data Source: Elastic Endgame
  • Data Source: Elastic Defend
  • Data Source: Sysmon

Version: 109

Rule authors:

  • Elastic

Rule license: Elastic License v2

Rule queryedit

sequence by with maxspan = 5s
    [any where host.os.type == "windows" and
     (event.category : ("library", "driver") or (event.category == "process" and event.action : "Image loaded*")) and
     (? : "wmiutils.dll" or : "wmiutils.dll") and : ("wscript.exe", "cscript.exe")]
    [process where host.os.type == "windows" and event.type == "start" and : "wmiprvse.exe" and
     user.domain != "NT AUTHORITY" and
     ( :
        ) or
      process.executable : ("C:\\Users\\*.exe", "C:\\ProgramData\\*.exe")