Skip to content

Commit e66bca7

Browse files
w0rk3rAegrah
andauthored
[Rule Tuning] Linux 3rd Party EDR Support - Crowdstrike and S1 - 7 (#4349)
* [Rule Tuning] Linux 3rd Party EDR Support - Crowdstrike and S1 - 7 * Update rules/linux/discovery_process_capabilities.toml Co-authored-by: Ruben Groenewoud <[email protected]> --------- Co-authored-by: Ruben Groenewoud <[email protected]>
1 parent cc889e3 commit e66bca7

10 files changed

+121
-79
lines changed

rules/linux/discovery_process_capabilities.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2024/01/09"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2024/11/07"
5+
updated_date = "2025/01/07"
66

77
[rule]
88
author = ["Elastic"]
@@ -11,7 +11,7 @@ Identifies recursive process capability enumeration of the entire filesystem thr
1111
may manipulate identified capabilities to gain root privileges.
1212
"""
1313
from = "now-9m"
14-
index = ["logs-endpoint.events.*", "endgame-*"]
14+
index = ["logs-endpoint.events.*", "endgame-*", "logs-crowdstrike.fdr*"]
1515
language = "eql"
1616
license = "Elastic License v2"
1717
name = "Process Capability Enumeration"
@@ -51,14 +51,16 @@ tags = [
5151
"Tactic: Discovery",
5252
"Data Source: Elastic Defend",
5353
"Data Source: Elastic Endgame",
54+
"Data Source: Crowdstrike",
5455
]
5556
timestamp_override = "event.ingested"
5657
type = "eql"
5758

5859
query = '''
59-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
60-
process.name == "getcap" and process.args == "-r" and process.args == "/" and process.args_count == 3 and
61-
user.id != "0"
60+
process where host.os.type == "linux" and event.type == "start" and
61+
event.action in ("exec", "exec_event", "ProcessRollup2") and
62+
process.name == "getcap" and process.args == "-r" and process.args == "/" and
63+
process.args_count == 3 and user.id != "0"
6264
'''
6365

6466

rules/linux/discovery_security_file_access_via_common_utility.toml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2024/11/04"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/11/04"
5+
min_stack_version = "8.13.0"
6+
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
7+
updated_date = "2025/01/07"
68

79
[rule]
810
author = ["Elastic"]
@@ -11,7 +13,7 @@ This rule detects sensitive security file access via common utilities on Linux s
1113
from sensitive files using common utilities to gather information about the system and its security configuration.
1214
"""
1315
from = "now-9m"
14-
index = ["logs-endpoint.events.*"]
16+
index = ["logs-endpoint.events.*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*", "endgame-*"]
1517
language = "eql"
1618
license = "Elastic License v2"
1719
name = "Security File Access via Common Utilities"
@@ -48,20 +50,24 @@ tags = [
4850
"OS: Linux",
4951
"Use Case: Threat Detection",
5052
"Tactic: Discovery",
51-
"Data Source: Elastic Defend"
53+
"Data Source: Elastic Defend",
54+
"Data Source: Crowdstrike",
55+
"Data Source: SentinelOne",
56+
"Data Source: Elastic Endgame"
5257
]
5358
timestamp_override = "event.ingested"
5459
type = "eql"
5560
query = '''
56-
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
57-
process.name in ("cat", "grep", "less", "more", "strings", "awk", "find", "xargs") and
58-
process.args like (
59-
"/etc/security/*", "/etc/pam.d/*", "/etc/login.defs", "/lib/security/*", "/lib64/security/*",
60-
"/usr/lib/security/*", "/usr/lib64/security/*", "/usr/lib/x86_64-linux-gnu/security/*",
61-
"/home/*/.aws/credentials", "/home/*/.aws/config", "/home/*/.config/gcloud/*credentials.json",
62-
"/home/*/.config/gcloud/configurations/config_default", "/home/*/.azure/accessTokens.json",
63-
"/home/*/.azure/azureProfile.json"
64-
)
61+
process where host.os.type == "linux" and event.type == "start" and
62+
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
63+
process.name in ("cat", "grep", "less", "more", "strings", "awk", "find", "xargs") and
64+
process.args like (
65+
"/etc/security/*", "/etc/pam.d/*", "/etc/login.defs", "/lib/security/*", "/lib64/security/*",
66+
"/usr/lib/security/*", "/usr/lib64/security/*", "/usr/lib/x86_64-linux-gnu/security/*",
67+
"/home/*/.aws/credentials", "/home/*/.aws/config", "/home/*/.config/gcloud/*credentials.json",
68+
"/home/*/.config/gcloud/configurations/config_default", "/home/*/.azure/accessTokens.json",
69+
"/home/*/.azure/azureProfile.json"
70+
)
6571
'''
6672

6773
[[rule.threat]]

rules/linux/discovery_sudo_allowed_command_enumeration.toml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2023/08/30"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/10/17"
5+
min_stack_version = "8.13.0"
6+
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
7+
updated_date = "2025/01/07"
68

79
[rule]
810
author = ["Elastic"]
@@ -12,7 +14,7 @@ the invoking user. Attackers may execute this command to enumerate commands allo
1214
permissions, potentially allowing to escalate privileges to root.
1315
"""
1416
from = "now-9m"
15-
index = ["logs-endpoint.events.*"]
17+
index = ["logs-endpoint.events.*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*", "endgame-*"]
1618
language = "eql"
1719
license = "Elastic License v2"
1820
name = "Sudo Command Enumeration Detected"
@@ -50,14 +52,17 @@ tags = [
5052
"Use Case: Threat Detection",
5153
"Tactic: Discovery",
5254
"Data Source: Elastic Defend",
55+
"Data Source: Crowdstrike",
56+
"Data Source: SentinelOne",
57+
"Data Source: Elastic Endgame",
5358
]
5459
timestamp_override = "event.ingested"
5560
type = "eql"
5661
query = '''
57-
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
58-
process.name == "sudo" and process.args == "-l" and process.args_count == 2 and
59-
process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
60-
not process.args == "dpkg"
62+
process where host.os.type == "linux" and event.type == "start" and
63+
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and process.name == "sudo" and process.args == "-l" and
64+
process.args_count == 2 and process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
65+
not process.args == "dpkg"
6166
'''
6267

6368
[[rule.threat]]

rules/linux/discovery_suspicious_memory_grep_activity.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2024/02/05"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/10/18"
5+
min_stack_version = "8.13.0"
6+
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
7+
updated_date = "2025/01/07"
68

79
[rule]
810
author = ["Elastic"]
@@ -12,7 +14,7 @@ specific process, detailing the memory segments, permissions, and what files are
1214
read a process's memory map to identify memory addresses for code injection or process hijacking.
1315
"""
1416
from = "now-9m"
15-
index = ["logs-endpoint.events.*", "endgame-*"]
17+
index = ["logs-endpoint.events.*", "endgame-*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*"]
1618
language = "eql"
1719
license = "Elastic License v2"
1820
name = "Suspicious Memory grep Activity"
@@ -27,12 +29,15 @@ tags = [
2729
"Tactic: Discovery",
2830
"Data Source: Elastic Defend",
2931
"Data Source: Elastic Endgame",
32+
"Data Source: Crowdstrike",
33+
"Data Source: SentinelOne",
3034
]
3135
timestamp_override = "event.ingested"
3236
type = "eql"
3337
query = '''
34-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
35-
process.name in ("grep", "egrep", "fgrep", "rgrep") and process.args in ("[stack]", "[vdso]", "[heap]")
38+
process where host.os.type == "linux" and event.type == "start" and
39+
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
40+
process.name in ("grep", "egrep", "fgrep", "rgrep") and process.args in ("[stack]", "[vdso]", "[heap]")
3641
'''
3742

3843
[[rule.threat]]

rules/linux/discovery_suspicious_which_command_execution.toml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2023/08/30"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/10/17"
5+
min_stack_version = "8.13.0"
6+
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
7+
updated_date = "2025/01/07"
68

79
[rule]
810
author = ["Elastic"]
@@ -12,7 +14,7 @@ leverage the which command to enumerate the system for useful installed utilitie
1214
system to escalate privileges or move latteraly across the network.
1315
"""
1416
from = "now-9m"
15-
index = ["logs-endpoint.events.*", "endgame-*"]
17+
index = ["logs-endpoint.events.*", "endgame-*", "logs-sentinel_one_cloud_funnel.*"]
1618
language = "eql"
1719
license = "Elastic License v2"
1820
name = "Suspicious which Enumeration"
@@ -26,16 +28,18 @@ tags = [
2628
"Tactic: Discovery",
2729
"Data Source: Elastic Defend",
2830
"Data Source: Elastic Endgame",
31+
"Data Source: SentinelOne",
2932
]
3033
timestamp_override = "event.ingested"
3134
type = "eql"
3235
query = '''
33-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
34-
process.name == "which" and process.args_count >= 10 and not (
35-
process.parent.name == "jem" or
36-
process.parent.executable like ("/vz/root/*", "/var/lib/docker/*") or
37-
process.args == "--tty-only"
38-
)
36+
process where host.os.type == "linux" and event.type == "start" and
37+
event.action in ("exec", "exec_event", "start") and
38+
process.name == "which" and process.args_count >= 10 and not (
39+
process.parent.name == "jem" or
40+
process.parent.executable like ("/vz/root/*", "/var/lib/docker/*") or
41+
process.args == "--tty-only"
42+
)
3943
4044
/* potential tuning if rule would turn out to be noisy
4145
and process.args in ("nmap", "nc", "ncat", "netcat", nc.traditional", "gcc", "g++", "socat") and

rules/linux/discovery_yum_dnf_plugin_detection.toml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2024/06/25"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/09/23"
5+
min_stack_version = "8.13.0"
6+
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
7+
updated_date = "2025/01/07"
68

79
[rule]
810
author = ["Elastic"]
@@ -12,7 +14,7 @@ to search for YUM/DNF configurations and/or plugins with an enabled state. This
1214
attempting to establish persistence in a YUM or DNF plugin.
1315
"""
1416
from = "now-9m"
15-
index = ["logs-endpoint.events.*", "endgame-*"]
17+
index = ["logs-endpoint.events.*", "endgame-*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*"]
1618
language = "eql"
1719
license = "Elastic License v2"
1820
name = "Yum/DNF Plugin Status Discovery"
@@ -52,16 +54,19 @@ tags = [
5254
"Tactic: Discovery",
5355
"Data Source: Elastic Defend",
5456
"Data Source: Elastic Endgame",
57+
"Data Source: Crowdstrike",
58+
"Data Source: SentinelOne",
5559
]
5660
timestamp_override = "event.ingested"
5761
type = "eql"
5862

5963
query = '''
60-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
61-
process.name == "grep" and process.args : "plugins*" and process.args : (
62-
"/etc/yum.conf", "/usr/lib/yum-plugins/*", "/etc/yum/pluginconf.d/*",
63-
"/usr/lib/python*/site-packages/dnf-plugins/*", "/etc/dnf/plugins/*", "/etc/dnf/dnf.conf"
64-
)
64+
process where host.os.type == "linux" and event.type == "start" and
65+
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
66+
process.name == "grep" and process.args : "plugins*" and process.args : (
67+
"/etc/yum.conf", "/usr/lib/yum-plugins/*", "/etc/yum/pluginconf.d/*",
68+
"/usr/lib/python*/site-packages/dnf-plugins/*", "/etc/dnf/plugins/*", "/etc/dnf/dnf.conf"
69+
)
6570
'''
6671

6772

rules/linux/execution_cupsd_foomatic_rip_file_creation.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2024/09/27"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/09/30"
5+
min_stack_version = "8.13.0"
6+
min_stack_comments = "Breaking change at 8.13.0 for SentinelOne Integration."
7+
updated_date = "2025/01/07"
68

79
[rule]
810
author = ["Elastic"]
@@ -14,7 +16,7 @@ and foomatic-rip, allowing remote unauthenticated attackers to manipulate IPP UR
1416
crafted UDP packets or network spoofing. This can result in arbitrary command execution when a print job is initiated.
1517
"""
1618
from = "now-9m"
17-
index = ["logs-endpoint.events.*"]
19+
index = ["logs-endpoint.events.*", "logs-sentinel_one_cloud_funnel.*"]
1820
language = "eql"
1921
license = "Elastic License v2"
2022
name = "File Creation by Cups or Foomatic-rip Child"
@@ -104,11 +106,12 @@ tags = [
104106
"Use Case: Vulnerability",
105107
"Tactic: Execution",
106108
"Data Source: Elastic Defend",
109+
"Data Source: SentinelOne",
107110
]
108111
type = "eql"
109112
query = '''
110113
sequence by host.id with maxspan=10s
111-
[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
114+
[process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start") and
112115
process.parent.name == "foomatic-rip" and
113116
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")] by process.entity_id
114117
[file where host.os.type == "linux" and event.type != "deletion" and

rules/linux/execution_cupsd_foomatic_rip_lp_user_execution.toml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/09/27"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2024/10/17"
5+
updated_date = "2025/01/07"
66

77
[rule]
88
author = ["Elastic"]
@@ -15,7 +15,7 @@ through crafted UDP packets or network spoofing. This can result in arbitrary co
1515
initiated.
1616
"""
1717
from = "now-9m"
18-
index = ["logs-endpoint.events.*"]
18+
index = ["logs-endpoint.events.*", "endgame-*"]
1919
language = "eql"
2020
license = "Elastic License v2"
2121
name = "Printer User (lp) Shell Execution"
@@ -105,19 +105,21 @@ tags = [
105105
"Use Case: Vulnerability",
106106
"Tactic: Execution",
107107
"Data Source: Elastic Defend",
108+
"Data Source: Elastic Endgame",
108109
]
109110
timestamp_override = "event.ingested"
110111
type = "eql"
111112
query = '''
112-
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and user.name == "lp" and
113-
process.parent.name in ("cupsd", "foomatic-rip", "bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
114-
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and not (
115-
process.command_line like (
116-
"*/tmp/foomatic-*", "*-sDEVICE=ps2write*", "*printf*", "/bin/sh -e -c cat", "/bin/bash -c cat",
117-
"/bin/bash -e -c cat"
118-
) or
119-
process.args like "gs*"
120-
)
113+
process where host.os.type == "linux" and event.type == "start" and
114+
event.action in ("exec", "exec_event") and user.name == "lp" and
115+
process.parent.name in ("cupsd", "foomatic-rip", "bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
116+
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and not (
117+
process.command_line like (
118+
"*/tmp/foomatic-*", "*-sDEVICE=ps2write*", "*printf*", "/bin/sh -e -c cat", "/bin/bash -c cat",
119+
"/bin/bash -e -c cat"
120+
) or
121+
process.args like "gs*"
122+
)
121123
'''
122124

123125
[[rule.threat]]

0 commit comments

Comments
 (0)