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

Related rules

to-top