Windows Script Interpreter Executing Process via WMI
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.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/11/27"
3integration = ["endpoint", "windows"]
4maturity = "production"
5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
6min_stack_version = "8.3.0"
7updated_date = "2023/06/22"
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies use of the built-in Windows script interpreters (cscript.exe or wscript.exe) being used to execute a process
13via Windows Management Instrumentation (WMI). This may be indicative of malicious activity.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*", "endgame-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Windows Script Interpreter Executing Process via WMI"
20risk_score = 47
21rule_id = "b64b183e-1a76-422d-9179-7b389513e74d"
22severity = "medium"
23tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Initial Access", "Tactic: Execution", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
24type = "eql"
25
26query = '''
27sequence by host.id with maxspan = 5s
28 [any where host.os.type == "windows" and
29 (event.category : ("library", "driver") or (event.category == "process" and event.action : "Image loaded*")) and
30 (dll.name : "wmiutils.dll" or file.name : "wmiutils.dll") and process.name : ("wscript.exe", "cscript.exe")]
31 [process where host.os.type == "windows" and event.type == "start" and
32 process.parent.name : "wmiprvse.exe" and
33 user.domain != "NT AUTHORITY" and
34 (process.pe.original_file_name :
35 (
36 "cscript.exe",
37 "wscript.exe",
38 "PowerShell.EXE",
39 "Cmd.Exe",
40 "MSHTA.EXE",
41 "RUNDLL32.EXE",
42 "REGSVR32.EXE",
43 "MSBuild.exe",
44 "InstallUtil.exe",
45 "RegAsm.exe",
46 "RegSvcs.exe",
47 "msxsl.exe",
48 "CONTROL.EXE",
49 "EXPLORER.EXE",
50 "Microsoft.Workflow.Compiler.exe",
51 "msiexec.exe"
52 ) or
53 process.executable : ("C:\\Users\\*.exe", "C:\\ProgramData\\*.exe")
54 )
55 ]
56'''
57
58
59[[rule.threat]]
60framework = "MITRE ATT&CK"
61[[rule.threat.technique]]
62id = "T1566"
63name = "Phishing"
64reference = "https://attack.mitre.org/techniques/T1566/"
65[[rule.threat.technique.subtechnique]]
66id = "T1566.001"
67name = "Spearphishing Attachment"
68reference = "https://attack.mitre.org/techniques/T1566/001/"
69
70
71
72[rule.threat.tactic]
73id = "TA0001"
74name = "Initial Access"
75reference = "https://attack.mitre.org/tactics/TA0001/"
76[[rule.threat]]
77framework = "MITRE ATT&CK"
78[[rule.threat.technique]]
79id = "T1047"
80name = "Windows Management Instrumentation"
81reference = "https://attack.mitre.org/techniques/T1047/"
82
83
84[rule.threat.tactic]
85id = "TA0002"
86name = "Execution"
87reference = "https://attack.mitre.org/tactics/TA0002/"
Related rules
- Suspicious MS Office Child Process
- Command Execution via SolarWinds Process
- Command Shell Activity Started via RunDLL32
- Conhost Spawned By Suspicious Parent Process
- Enumeration Command Spawned via WMIPrvSE