Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions detection_rules/etc/non-ecs-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
"Target.process.name": "keyword",
"process.Ext.api.name": "keyword"
},
"logs-endpoint.events.api-*": {
"process.Ext.api.parameters.consumer_type": "keyword",
"process.Ext.api.name": "keyword"
},
"logs-endpoint.events.file-*": {
"file.Ext.header_bytes": "keyword",
"file.Ext.windows.zone_identifier": "long"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "detection_rules"
version = "0.3.6"
version = "0.3.7"
description = "Detection Rules is the home for rules used by Elastic Security. This repository is used for the development, maintenance, testing, validation, and release of rules for Elastic Security’s Detection Engine."
readme = "README.md"
requires-python = ">=3.12"
Expand Down
21 changes: 14 additions & 7 deletions rules/windows/persistence_sysmon_wmi_event_subscription.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
creation_date = "2023/02/02"
integration = ["windows"]
integration = ["windows", "endpoint"]
maturity = "production"
updated_date = "2024/10/15"
min_stack_version = "8.14.0"
min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
updated_date = "2024/12/23"
min_stack_version = "8.15.0"
min_stack_comments = "Elastic Defend WMI events were added in Elastic Defend 8.15.0."

[rule]
author = ["Elastic"]
Expand All @@ -13,7 +13,7 @@ Detects the creation of a WMI Event Subscription. Attackers can abuse this mecha
SYSTEM privileges.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-windows.sysmon_operational-*"]
index = ["winlogbeat-*", "logs-windows.sysmon_operational-*", "logs-endpoint.events.api-*"]
language = "eql"
license = "Elastic License v2"
name = "Suspicious WMI Event Subscription Created"
Expand All @@ -30,13 +30,20 @@ tags = [
"Use Case: Threat Detection",
"Tactic: Persistence",
"Data Source: Sysmon",
"Data Source: Elastic Defend"
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
any where event.dataset == "windows.sysmon_operational" and event.code == "21" and
winlog.event_data.Operation : "Created" and winlog.event_data.Consumer : ("*subscription:CommandLineEventConsumer*", "*subscription:ActiveScriptEventConsumer*")
any where
(
(event.dataset == "windows.sysmon_operational" and event.code == "21" and
winlog.event_data.Operation : "Created" and winlog.event_data.Consumer : ("*subscription:CommandLineEventConsumer*", "*subscription:ActiveScriptEventConsumer*")) or

(event.dataset == "endpoint.events.api" and event.provider == "Microsoft-Windows-WMI-Activity" and process.Ext.api.name == "IWbemServices::PutInstance" and
process.Ext.api.parameters.consumer_type in ("ActiveScriptEventConsumer", "CommandLineEventConsumer"))
)
'''


Expand Down
Loading