Skip to content

Commit

Permalink
[Rule Tuning] 3rd Party EDR Compatibility - 14 (elastic#4039)
Browse files Browse the repository at this point in the history
* [Rule Tuning] 3rd Party EDR Compatibility - 14

* min_stack for merge, bump updated_date
  • Loading branch information
w0rk3r authored Oct 11, 2024
1 parent 07c4535 commit 10a8cef
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 75 deletions.
18 changes: 7 additions & 11 deletions rules/windows/persistence_ms_office_addins_file.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
[metadata]
creation_date = "2020/10/16"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[rule]
author = ["Elastic"]
description = "Detects attempts to establish persistence on an endpoint by abusing Microsoft Office add-ins."
from = "now-9m"
index = ["logs-endpoint.events.file-*", "winlogbeat-*", "logs-windows.sysmon_operational-*", "endgame-*"]
index = ["logs-endpoint.events.file-*", "winlogbeat-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
language = "eql"
license = "Elastic License v2"
name = "Persistence via Microsoft Office AddIns"
references = ["https://labs.withsecure.com/publications/add-in-opportunities-for-office-persistence"]
risk_score = 73
rule_id = "f44fa4b6-524c-4e87-8d9e-a32599e4fb7c"
setup = """## Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
`event.ingested` to @timestamp.
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
"""
severity = "high"
tags = [
"Domain: Endpoint",
Expand All @@ -32,6 +26,8 @@ tags = [
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
Expand Down
18 changes: 7 additions & 11 deletions rules/windows/persistence_ms_outlook_vba_template.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[metadata]
creation_date = "2020/11/23"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[rule]
author = ["Elastic"]
description = "Detects attempts to establish persistence on an endpoint by installing a rogue Microsoft Outlook VBA Template."
false_positives = ["A legitimate VBA for Outlook is usually configured interactively via OUTLOOK.EXE."]
from = "now-9m"
index = ["logs-endpoint.events.file-*", "winlogbeat-*", "logs-windows.sysmon_operational-*", "endgame-*"]
index = ["logs-endpoint.events.file-*", "winlogbeat-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
language = "eql"
license = "Elastic License v2"
name = "Persistence via Microsoft Outlook VBA"
Expand All @@ -19,14 +21,6 @@ references = [
]
risk_score = 47
rule_id = "397945f3-d39a-4e6f-8bcb-9656c2031438"
setup = """## Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
`event.ingested` to @timestamp.
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
"""
severity = "medium"
tags = [
"Domain: Endpoint",
Expand All @@ -36,6 +30,8 @@ tags = [
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
Expand Down
11 changes: 8 additions & 3 deletions rules/windows/persistence_msoffice_startup_registry.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[metadata]
creation_date = "2023/08/22"
integration = ["endpoint"]
integration = ["endpoint", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[rule]
author = ["Elastic"]
Expand All @@ -12,7 +14,7 @@ specify a DLL which will be executed every time an MS Office application is star
persistence on a compromised host.
"""
from = "now-9m"
index = ["logs-endpoint.events.registry-*"]
index = ["logs-endpoint.events.registry-*", "logs-m365_defender.event-*", "endgame-*", "logs-sentinel_one_cloud_funnel.*"]
language = "eql"
license = "Elastic License v2"
name = "Office Test Registry Persistence"
Expand All @@ -29,6 +31,9 @@ tags = [
"Tactic: Persistence",
"Tactic: Defense Evasion",
"Data Source: Elastic Defend",
"Data Source: Elastic Endgame",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
Expand Down
14 changes: 10 additions & 4 deletions rules/windows/persistence_netsh_helper_dll.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[metadata]
creation_date = "2023/08/29"
integration = ["endpoint"]
integration = ["endpoint", "m365_defender", "sentinel_one_cloud_funnel", "windows"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[rule]
author = ["Elastic"]
Expand All @@ -12,7 +14,7 @@ functionality. Attackers may abuse this mechanism to execute malicious payloads
which can be done by administrators or a scheduled task.
"""
from = "now-9m"
index = ["logs-endpoint.events.registry-*", "endgame-*"]
index = ["logs-endpoint.events.registry-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*", "logs-windows.sysmon_operational-*"]
language = "eql"
license = "Elastic License v2"
name = "Netsh Helper DLL"
Expand All @@ -26,6 +28,9 @@ tags = [
"Tactic: Persistence",
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: SentinelOne",
"Data Source: Sysmon",
]
timestamp_override = "event.ingested"
type = "eql"
Expand All @@ -34,7 +39,8 @@ query = '''
registry where host.os.type == "windows" and event.type == "change" and
registry.path : (
"HKLM\\Software\\Microsoft\\netsh\\*",
"\\REGISTRY\\MACHINE\\Software\\Microsoft\\netsh\\*"
"\\REGISTRY\\MACHINE\\Software\\Microsoft\\netsh\\*",
"MACHINE\\Software\\Microsoft\\netsh\\*"
)
'''

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[metadata]
creation_date = "2020/12/15"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[rule]
author = ["Elastic"]
Expand All @@ -15,9 +17,12 @@ from = "now-9m"
index = [
"logs-endpoint.events.process-*",
"winlogbeat-*",
"logs-windows.*",
"logs-windows.forwarded*",
"logs-windows.sysmon_operational-*",
"endgame-*",
"logs-system.security*",
"logs-m365_defender.event-*",
"logs-sentinel_one_cloud_funnel.*",
]
language = "eql"
license = "Elastic License v2"
Expand All @@ -28,14 +33,6 @@ references = [
]
risk_score = 47
rule_id = "ce64d965-6cb0-466d-b74f-8d2c76f47f05"
setup = """## Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
`event.ingested` to @timestamp.
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
"""
severity = "medium"
tags = [
"Domain: Endpoint",
Expand All @@ -46,6 +43,9 @@ tags = [
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: System",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: Sysmon",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
Expand Down
10 changes: 7 additions & 3 deletions rules/windows/persistence_powershell_profiles.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[metadata]
creation_date = "2022/10/13"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[transform]
[[transform.osquery]]
Expand Down Expand Up @@ -38,7 +40,7 @@ PowerShell starts to customize the user environment, which can be abused by atta
PowerShell is common.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*"]
index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
language = "eql"
license = "Elastic License v2"
name = "Persistence via PowerShell profile"
Expand Down Expand Up @@ -111,6 +113,8 @@ tags = [
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[metadata]
creation_date = "2020/02/18"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "m365_defender"]
maturity = "production"
updated_date = "2024/05/21"
updated_date = "2024/10/10"

[transform]
[[transform.osquery]]
Expand Down Expand Up @@ -38,7 +38,7 @@ adversary can modify the way these programs are launched to get a command prompt
system.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "endgame-*"]
index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*"]
language = "eql"
license = "Elastic License v2"
name = "Potential Modification of Accessibility Binaries"
Expand Down Expand Up @@ -99,14 +99,6 @@ This rule looks for the execution of supposed accessibility binaries that don't
references = ["https://www.elastic.co/blog/practical-security-engineering-stateful-detection"]
risk_score = 73
rule_id = "7405ddf1-6c8e-41ce-818f-48bea6bcaed8"
setup = """## Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
`event.ingested` to @timestamp.
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
"""
severity = "high"
tags = [
"Domain: Endpoint",
Expand All @@ -117,6 +109,7 @@ tags = [
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender for Endpoint",
]
timestamp_override = "event.ingested"
type = "eql"
Expand Down
14 changes: 10 additions & 4 deletions rules/windows/persistence_services_registry.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[metadata]
creation_date = "2020/11/18"
integration = ["endpoint"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/08/07"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[rule]
author = ["Elastic"]
Expand All @@ -12,7 +14,7 @@ could be an indication of an adversary attempting to stealthily persist through
modification of an existing service.
"""
from = "now-9m"
index = ["logs-endpoint.events.registry-*", "endgame-*", "logs-windows.sysmon_operational-*", "winlogbeat-*"]
index = ["logs-endpoint.events.registry-*", "endgame-*", "logs-windows.sysmon_operational-*", "winlogbeat-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
language = "eql"
license = "Elastic License v2"
name = "Unusual Persistence via Services Registry"
Expand All @@ -28,6 +30,8 @@ tags = [
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
Expand All @@ -39,7 +43,9 @@ registry where host.os.type == "windows" and event.type == "change" and
"HKLM\\SYSTEM\\ControlSet*\\Services\\*\\ServiceDLL",
"HKLM\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath",
"\\REGISTRY\\MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ServiceDLL",
"\\REGISTRY\\MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath"
"\\REGISTRY\\MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath",
"MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ServiceDLL",
"MACHINE\\SYSTEM\\ControlSet*\\Services\\*\\ImagePath"
) and not registry.data.strings : (
"?:\\windows\\system32\\Drivers\\*.sys",
"\\SystemRoot\\System32\\drivers\\*.sys",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[metadata]
creation_date = "2020/11/18"
integration = ["endpoint", "windows"]
integration = ["endpoint", "windows", "m365_defender", "sentinel_one_cloud_funnel"]
maturity = "production"
updated_date = "2024/09/23"
updated_date = "2024/10/10"
min_stack_version = "8.13.0"
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."

[transform]
[[transform.osquery]]
Expand Down Expand Up @@ -37,7 +39,7 @@ Identifies files written to or modified in the startup folder by commonly abused
technique to maintain persistence.
"""
from = "now-9m"
index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*"]
index = ["winlogbeat-*", "logs-endpoint.events.file-*", "logs-windows.sysmon_operational-*", "endgame-*", "logs-m365_defender.event-*", "logs-sentinel_one_cloud_funnel.*"]
language = "eql"
license = "Elastic License v2"
name = "Startup Persistence by a Suspicious Process"
Expand Down Expand Up @@ -103,14 +105,6 @@ references = [
]
risk_score = 47
rule_id = "440e2db4-bc7f-4c96-a068-65b78da59bde"
setup = """## Setup
If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
`event.ingested` to @timestamp.
For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
"""
severity = "medium"
tags = [
"Domain: Endpoint",
Expand All @@ -121,6 +115,8 @@ tags = [
"Data Source: Elastic Endgame",
"Data Source: Elastic Defend",
"Data Source: Sysmon",
"Data Source: Microsoft Defender for Endpoint",
"Data Source: SentinelOne",
]
timestamp_override = "event.ingested"
type = "eql"
Expand Down
Loading

0 comments on commit 10a8cef

Please sign in to comment.