Suspicious WMI Event Subscription Created

Detects the creation of a WMI Event Subscription. Attackers can abuse this mechanism for persistence or to elevate to SYSTEM privileges.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/02/02"
 3integration = ["windows"]
 4maturity = "production"
 5updated_date = "2024/10/15"
 6min_stack_version = "8.14.0"
 7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Detects the creation of a WMI Event Subscription. Attackers can abuse this mechanism for persistence or to elevate to
13SYSTEM privileges.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-windows.sysmon_operational-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Suspicious WMI Event Subscription Created"
20references = [
21    "https://www.blackhat.com/docs/us-15/materials/us-15-Graeber-Abusing-Windows-Management-Instrumentation-WMI-To-Build-A-Persistent%20Asynchronous-And-Fileless-Backdoor-wp.pdf",
22    "https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96",
23]
24risk_score = 47
25rule_id = "e72f87d0-a70e-4f8d-8443-a6407bc34643"
26severity = "medium"
27tags = [
28    "Domain: Endpoint",
29    "OS: Windows",
30    "Use Case: Threat Detection",
31    "Tactic: Persistence",
32    "Data Source: Sysmon",
33]
34timestamp_override = "event.ingested"
35type = "eql"
36
37query = '''
38any where event.dataset == "windows.sysmon_operational" and event.code == "21" and
39    winlog.event_data.Operation : "Created" and winlog.event_data.Consumer : ("*subscription:CommandLineEventConsumer*", "*subscription:ActiveScriptEventConsumer*")
40'''
41
42
43[[rule.threat]]
44framework = "MITRE ATT&CK"
45[[rule.threat.technique]]
46id = "T1546"
47name = "Event Triggered Execution"
48reference = "https://attack.mitre.org/techniques/T1546/"
49[[rule.threat.technique.subtechnique]]
50id = "T1546.003"
51name = "Windows Management Instrumentation Event Subscription"
52reference = "https://attack.mitre.org/techniques/T1546/003/"
53
54
55
56[rule.threat.tactic]
57id = "TA0003"
58name = "Persistence"
59reference = "https://attack.mitre.org/tactics/TA0003/"

References

Related rules

to-top