Persistence via WMI Event Subscription
An adversary can use Windows Management Instrumentation (WMI) to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Adversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/12/04"
3integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
4maturity = "production"
5updated_date = "2024/10/10"
6min_stack_version = "8.13.0"
7min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
8
9[rule]
10author = ["Elastic"]
11description = """
12An adversary can use Windows Management Instrumentation (WMI) to install event filters, providers, consumers, and
13bindings that execute code when a defined event occurs. Adversaries may use the capabilities of WMI to subscribe to an
14event and execute arbitrary code when that event occurs, providing persistence on a system.
15"""
16from = "now-9m"
17index = [
18 "logs-endpoint.events.process-*",
19 "winlogbeat-*",
20 "logs-windows.forwarded*",
21 "logs-windows.sysmon_operational-*",
22 "endgame-*",
23 "logs-system.security*",
24 "logs-m365_defender.event-*",
25 "logs-sentinel_one_cloud_funnel.*",
26]
27language = "eql"
28license = "Elastic License v2"
29name = "Persistence via WMI Event Subscription"
30references = ["https://www.elastic.co/security-labs/hunting-for-persistence-using-elastic-security-part-1"]
31risk_score = 21
32rule_id = "9b6813a1-daf1-457e-b0e6-0bb4e55b8a4c"
33severity = "low"
34tags = [
35 "Domain: Endpoint",
36 "OS: Windows",
37 "Use Case: Threat Detection",
38 "Tactic: Persistence",
39 "Tactic: Execution",
40 "Data Source: Elastic Endgame",
41 "Data Source: Elastic Defend",
42 "Data Source: System",
43 "Data Source: Microsoft Defender for Endpoint",
44 "Data Source: Sysmon",
45 "Data Source: SentinelOne",
46]
47timestamp_override = "event.ingested"
48type = "eql"
49
50query = '''
51process where host.os.type == "windows" and event.type == "start" and
52 (process.name : "wmic.exe" or ?process.pe.original_file_name == "wmic.exe") and
53 process.args : "create" and
54 process.args : ("ActiveScriptEventConsumer", "CommandLineEventConsumer")
55'''
56
57
58[[rule.threat]]
59framework = "MITRE ATT&CK"
60[[rule.threat.technique]]
61id = "T1546"
62name = "Event Triggered Execution"
63reference = "https://attack.mitre.org/techniques/T1546/"
64[[rule.threat.technique.subtechnique]]
65id = "T1546.003"
66name = "Windows Management Instrumentation Event Subscription"
67reference = "https://attack.mitre.org/techniques/T1546/003/"
68
69
70
71[rule.threat.tactic]
72id = "TA0003"
73name = "Persistence"
74reference = "https://attack.mitre.org/tactics/TA0003/"
75[[rule.threat]]
76framework = "MITRE ATT&CK"
77[[rule.threat.technique]]
78id = "T1047"
79name = "Windows Management Instrumentation"
80reference = "https://attack.mitre.org/techniques/T1047/"
81
82
83[rule.threat.tactic]
84id = "TA0002"
85name = "Execution"
86reference = "https://attack.mitre.org/tactics/TA0002/"
References
Related rules
- New ActiveSyncAllowedDeviceID Added via PowerShell
- Execution via MSSQL xp_cmdshell Stored Procedure
- Persistence via TelemetryController Scheduled Task Hijack
- Potential Application Shimming via Sdbinst
- User Account Creation