Suspicious Cmd Execution via WMI

Identifies suspicious command execution (cmd) via Windows Management Instrumentation (WMI) on a remote host. This could be indicative of adversary lateral movement.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/10/19"
 3integration = ["endpoint", "windows", "system"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies suspicious command execution (cmd) via Windows Management Instrumentation (WMI) on a remote host. This could
11be indicative of adversary lateral movement.
12"""
13from = "now-9m"
14index = [
15    "logs-endpoint.events.process-*",
16    "winlogbeat-*",
17    "logs-windows.*",
18    "endgame-*",
19    "logs-system.security*",
20]
21language = "eql"
22license = "Elastic License v2"
23name = "Suspicious Cmd Execution via WMI"
24risk_score = 47
25rule_id = "12f07955-1674-44f7-86b5-c35da0a6f41a"
26setup = """## Setup
27
28If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
29events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
30Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
31`event.ingested` to @timestamp.
32For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
33"""
34severity = "medium"
35tags = [
36    "Domain: Endpoint",
37    "OS: Windows",
38    "Use Case: Threat Detection",
39    "Tactic: Execution",
40    "Data Source: Elastic Endgame",
41    "Data Source: Elastic Defend",
42]
43timestamp_override = "event.ingested"
44type = "eql"
45
46query = '''
47process where host.os.type == "windows" and event.type == "start" and
48 process.parent.name : "WmiPrvSE.exe" and process.name : "cmd.exe" and
49 process.args : "\\\\127.0.0.1\\*" and process.args : ("2>&1", "1>")
50'''
51
52
53[[rule.threat]]
54framework = "MITRE ATT&CK"
55[[rule.threat.technique]]
56id = "T1047"
57name = "Windows Management Instrumentation"
58reference = "https://attack.mitre.org/techniques/T1047/"
59
60[[rule.threat.technique]]
61id = "T1059"
62name = "Command and Scripting Interpreter"
63reference = "https://attack.mitre.org/techniques/T1059/"
64[[rule.threat.technique.subtechnique]]
65id = "T1059.003"
66name = "Windows Command Shell"
67reference = "https://attack.mitre.org/techniques/T1059/003/"
68
69
70
71[rule.threat.tactic]
72id = "TA0002"
73name = "Execution"
74reference = "https://attack.mitre.org/tactics/TA0002/"

Related rules

to-top