Skip to content

Commit c804869

Browse files
w0rk3rtradebot-elastic
authored andcommitted
[Rule Tuning] Windows 3rd Party EDR Compatibility - Part 14 (#5029)
* [Rule Tuning] Windows 3rd Party EDR Compatibility - Part 14 * Apply suggestions from code review Co-authored-by: Samirbous <[email protected]> --------- Co-authored-by: Samirbous <[email protected]> (cherry picked from commit 86dd350)
1 parent 5740cc4 commit c804869

5 files changed

+52
-52
lines changed

rules/windows/persistence_suspicious_scheduled_task_runtime.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[metadata]
22
creation_date = "2020/11/19"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "windows"]
44
maturity = "production"
5-
updated_date = "2025/04/07"
5+
updated_date = "2025/08/26"
66

77
[rule]
88
author = ["Elastic"]
99
description = "Identifies execution of a suspicious program via scheduled tasks by looking at process lineage and command line usage."
1010
false_positives = ["Legitimate scheduled tasks running third party software."]
1111
from = "now-9m"
12-
index = ["logs-endpoint.events.process-*"]
12+
index = ["logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*"]
1313
language = "eql"
1414
license = "Elastic License v2"
1515
name = "Suspicious Execution via Scheduled Task"
@@ -62,6 +62,7 @@ tags = [
6262
"Tactic: Execution",
6363
"Data Source: Elastic Defend",
6464
"Resources: Investigation Guide",
65+
"Data Source: Sysmon",
6566
]
6667
timestamp_override = "event.ingested"
6768
type = "eql"

rules/windows/persistence_suspicious_service_created_registry.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/11/23"
3-
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
3+
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/08/26"
66

77
[rule]
88
author = ["Elastic"]
@@ -18,6 +18,7 @@ index = [
1818
"winlogbeat-*",
1919
"logs-m365_defender.event-*",
2020
"logs-sentinel_one_cloud_funnel.*",
21+
"logs-crowdstrike.fdr*",
2122
]
2223
language = "eql"
2324
license = "Elastic License v2"
@@ -71,6 +72,7 @@ tags = [
7172
"Data Source: Sysmon",
7273
"Data Source: Microsoft Defender for Endpoint",
7374
"Data Source: SentinelOne",
75+
"Data Source: Crowdstrike",
7476
"Resources: Investigation Guide",
7577
]
7678
timestamp_override = "event.ingested"
@@ -79,10 +81,7 @@ type = "eql"
7981
query = '''
8082
registry where host.os.type == "windows" and event.type == "change" and
8183
registry.value : "ImagePath" and
82-
registry.path : (
83-
"HKLM\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath",
84-
"\\REGISTRY\\MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath"
85-
) and
84+
registry.path : "*\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath" and
8685
/* add suspicious registry ImagePath values here */
8786
registry.data.strings : ("%COMSPEC%*", "*\\.\\pipe\\*")
8887
'''

rules/windows/persistence_time_provider_mod.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2021/01/19"
3-
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
3+
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/08/26"
66

77
[transform]
88
[[transform.osquery]]
@@ -46,6 +46,7 @@ index = [
4646
"winlogbeat-*",
4747
"logs-m365_defender.event-*",
4848
"logs-sentinel_one_cloud_funnel.*",
49+
"logs-crowdstrike.fdr*",
4950
]
5051
language = "eql"
5152
license = "Elastic License v2"
@@ -115,22 +116,19 @@ tags = [
115116
"Data Source: Sysmon",
116117
"Data Source: Microsoft Defender for Endpoint",
117118
"Data Source: SentinelOne",
119+
"Data Source: Crowdstrike",
118120
"Resources: Investigation Guide",
119121
]
120122
timestamp_override = "event.ingested"
121123
type = "eql"
122124

123125
query = '''
124126
registry where host.os.type == "windows" and event.type == "change" and
125-
registry.path: (
126-
"HKLM\\SYSTEM\\*ControlSet*\\Services\\W32Time\\TimeProviders\\*",
127-
"\\REGISTRY\\MACHINE\\SYSTEM\\*ControlSet*\\Services\\W32Time\\TimeProviders\\*",
128-
"MACHINE\\SYSTEM\\*ControlSet*\\Services\\W32Time\\TimeProviders\\*"
129-
) and
127+
registry.path: "*\\SYSTEM\\*ControlSet*\\Services\\W32Time\\TimeProviders\\*" and
130128
registry.data.strings:"*.dll" and
131129
not
132130
(
133-
process.executable : "?:\\Windows\\System32\\msiexec.exe" and
131+
process.executable : ("?:\\Windows\\System32\\msiexec.exe", "\\Device\\HarddiskVolume*\\Windows\\System32\\msiexec.exe") and
134132
registry.data.strings : "?:\\Program Files\\VMware\\VMware Tools\\vmwTimeProvider\\vmwTimeProvider.dll"
135133
) and
136134
not registry.data.strings : "C:\\Windows\\SYSTEM32\\w32time.DLL"

rules/windows/persistence_via_hidden_run_key_valuename.toml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/11/15"
3-
integration = ["endpoint", "windows"]
3+
integration = ["endpoint", "windows", "crowdstrike", "sentinel_one_cloud_funnel", "m365_defender"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/08/26"
66

77
[rule]
88
author = ["Elastic"]
@@ -11,7 +11,15 @@ Identifies a persistence mechanism that utilizes the NtSetValueKey native API to
1111
registry key. An adversary may use this method to hide from system utilities such as the Registry Editor (regedit).
1212
"""
1313
from = "now-9m"
14-
index = ["logs-endpoint.events.registry-*", "winlogbeat-*", "logs-windows.sysmon_operational-*", "endgame-*"]
14+
index = [
15+
"logs-endpoint.events.registry-*",
16+
"winlogbeat-*",
17+
"logs-windows.sysmon_operational-*",
18+
"endgame-*",
19+
"logs-crowdstrike.fdr*",
20+
"logs-sentinel_one_cloud_funnel.*",
21+
"logs-m365_defender.event-*",
22+
]
1523
language = "eql"
1624
license = "Elastic License v2"
1725
name = "Persistence via Hidden Run Key Detected"
@@ -56,14 +64,6 @@ references = [
5664
]
5765
risk_score = 73
5866
rule_id = "a9b05c3b-b304-4bf9-970d-acdfaef2944c"
59-
setup = """## Setup
60-
61-
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
62-
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
63-
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
64-
`event.ingested` to @timestamp.
65-
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
66-
"""
6767
severity = "high"
6868
tags = [
6969
"Domain: Endpoint",
@@ -72,29 +72,26 @@ tags = [
7272
"Tactic: Persistence",
7373
"Tactic: Defense Evasion",
7474
"Tactic: Execution",
75+
"Resources: Investigation Guide",
7576
"Data Source: Elastic Endgame",
7677
"Data Source: Elastic Defend",
7778
"Data Source: Sysmon",
78-
"Resources: Investigation Guide",
79+
"Data Source: Crowdstrike",
80+
"Data Source: SentinelOne",
81+
"Data Source: Microsoft Defender for Endpoint",
7982
]
8083
timestamp_override = "event.ingested"
8184
type = "eql"
8285

8386
query = '''
8487
/* Registry Path ends with backslash */
8588
registry where host.os.type == "windows" and event.type == "change" and length(registry.data.strings) > 0 and
86-
registry.path : ("HKEY_USERS\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\",
87-
"HKU\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\",
88-
"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\",
89-
"HKLM\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run\\",
90-
"HKEY_USERS\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\\",
91-
"HKU\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\\",
92-
"\\REGISTRY\\MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\\",
93-
"\\REGISTRY\\USER\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\",
94-
"\\REGISTRY\\MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\",
95-
"\\REGISTRY\\MACHINE\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run\\",
96-
"\\REGISTRY\\USER\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\\",
97-
"\\REGISTRY\\MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\\")
89+
registry.path : "*\\Run\\" and
90+
registry.path : (
91+
"*\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\",
92+
"*\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run\\",
93+
"*\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\Run\\"
94+
)
9895
'''
9996

10097

rules/windows/persistence_via_lsa_security_support_provider_registry.toml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/11/18"
3-
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
3+
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/08/26"
66

77
[rule]
88
author = ["Elastic"]
@@ -18,6 +18,7 @@ index = [
1818
"endgame-*",
1919
"logs-m365_defender.event-*",
2020
"logs-sentinel_one_cloud_funnel.*",
21+
"logs-crowdstrike.fdr*",
2122
]
2223
language = "eql"
2324
license = "Elastic License v2"
@@ -71,22 +72,26 @@ tags = [
7172
"Data Source: Sysmon",
7273
"Data Source: Microsoft Defender for Endpoint",
7374
"Data Source: SentinelOne",
75+
"Data Source: Crowdstrike",
7476
"Resources: Investigation Guide",
7577
]
7678
timestamp_override = "event.ingested"
7779
type = "eql"
7880

7981
query = '''
8082
registry where host.os.type == "windows" and event.type == "change" and
81-
registry.path : (
82-
"HKLM\\SYSTEM\\*ControlSet*\\Control\\Lsa\\Security Packages*",
83-
"HKLM\\SYSTEM\\*ControlSet*\\Control\\Lsa\\OSConfig\\Security Packages*",
84-
"\\REGISTRY\\MACHINE\\SYSTEM\\*ControlSet*\\Control\\Lsa\\Security Packages*",
85-
"\\REGISTRY\\MACHINE\\SYSTEM\\*ControlSet*\\Control\\Lsa\\OSConfig\\Security Packages*",
86-
"MACHINE\\SYSTEM\\*ControlSet*\\Control\\Lsa\\Security Packages*",
87-
"MACHINE\\SYSTEM\\*ControlSet*\\Control\\Lsa\\OSConfig\\Security Packages*"
88-
) and
89-
not process.executable : ("C:\\Windows\\System32\\msiexec.exe", "C:\\Windows\\SysWOW64\\msiexec.exe")
83+
registry.value : "Security Packages" and
84+
registry.path : (
85+
"*\\SYSTEM\\*ControlSet*\\Control\\Lsa\\Security Packages",
86+
"*\\SYSTEM\\*ControlSet*\\Control\\Lsa\\OSConfig\\Security Packages"
87+
) and
88+
not process.executable : (
89+
"C:\\Windows\\System32\\msiexec.exe",
90+
"C:\\Windows\\SysWOW64\\msiexec.exe",
91+
/* Crowdstrike specific exclusion as it uses NT Object paths */
92+
"\\Device\\HarddiskVolume*\\Windows\\System32\\msiexec.exe",
93+
"\\Device\\HarddiskVolume*\\Windows\\SysWOW64\\msiexec.exe"
94+
)
9095
'''
9196

9297

0 commit comments

Comments
 (0)