Skip to content

Commit 7df17c4

Browse files
Merge branch 'main' into maintenance-update-all-tokens
2 parents eeaae65 + 6b0b988 commit 7df17c4

13 files changed

+173
-104
lines changed

rules/linux/persistence_linux_user_added_to_privileged_group.toml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2023/02/13"
3-
integration = ["endpoint", "auditd_manager"]
3+
integration = ["endpoint", "auditd_manager", "crowdstrike", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/10/24"
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/08"
68

79
[transform]
810
[[transform.osquery]]
@@ -29,7 +31,7 @@ Identifies attempts to add a user to a privileged group. Attackers may add users
2931
establish persistence on a system.
3032
"""
3133
from = "now-9m"
32-
index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
34+
index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*"]
3335
language = "eql"
3436
license = "Elastic License v2"
3537
name = "Linux User Added to Privileged Group"
@@ -117,18 +119,21 @@ tags = [
117119
"Resources: Investigation Guide",
118120
"Data Source: Elastic Defend",
119121
"Data Source: Auditd Manager",
122+
"Data Source: Crowdstrike",
123+
"Data Source: SentinelOne",
120124
]
121125
timestamp_override = "event.ingested"
122126
type = "eql"
123127
query = '''
124-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started")
125-
and process.args in (
126-
"root", "admin", "wheel", "staff", "sudo","disk", "video", "shadow", "lxc", "lxd"
127-
) and
128-
(
129-
process.name in ("usermod", "adduser") or
130-
(process.name == "gpasswd" and process.args in ("-a", "--add", "-M", "--members"))
131-
)
128+
process where host.os.type == "linux" and event.type == "start" and
129+
event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
130+
process.args in (
131+
"root", "admin", "wheel", "staff", "sudo","disk", "video", "shadow", "lxc", "lxd"
132+
) and
133+
(
134+
process.name in ("usermod", "adduser") or
135+
(process.name == "gpasswd" and process.args in ("-a", "--add", "-M", "--members"))
136+
)
132137
'''
133138

134139
[[rule.threat]]

rules/linux/persistence_message_of_the_day_execution.toml

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2023/02/28"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/05/31"
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/08"
68

79
[transform]
810
[[transform.osquery]]
@@ -41,7 +43,7 @@ a backdoor script or command. This rule detects the execution of potentially mal
4143
utility.
4244
"""
4345
from = "now-9m"
44-
index = ["logs-endpoint.events.process*", "endgame-*"]
46+
index = ["logs-endpoint.events.process*", "endgame-*", "logs-sentinel_one_cloud_funnel.*"]
4547
language = "eql"
4648
license = "Elastic License v2"
4749
name = "Process Spawned from Message-of-the-Day (MOTD)"
@@ -142,42 +144,60 @@ tags = [
142144
"Data Source: Elastic Endgame",
143145
"Resources: Investigation Guide",
144146
"Data Source: Elastic Defend",
147+
"Data Source: SentinelOne",
145148
]
146149
timestamp_override = "event.ingested"
147150
type = "eql"
148151
query = '''
149-
process where event.type == "start" and host.os.type == "linux" and event.action : ("exec", "exec_event") and
150-
process.parent.executable : "/etc/update-motd.d/*" and (
151-
(process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and (
152-
(process.args : ("-i", "-l")) or (process.parent.name == "socat" and process.parent.args : "*exec*"))) or
153-
(process.name : ("nc", "ncat", "netcat", "nc.openbsd") and process.args_count >= 3 and
154-
not process.args : ("-*z*", "-*l*")) or
155-
(process.name : "python*" and process.args : "-c" and process.args : (
156-
"*import*pty*spawn*", "*import*subprocess*call*"
157-
)) or
158-
(process.name : "perl*" and process.args : "-e" and process.args : "*socket*" and process.args : (
159-
"*exec*", "*system*"
160-
)) or
161-
(process.name : "ruby*" and process.args : ("-e", "-rsocket") and process.args : (
162-
"*TCPSocket.new*", "*TCPSocket.open*"
163-
)) or
164-
(process.name : "lua*" and process.args : "-e" and process.args : "*socket.tcp*" and process.args : (
165-
"*io.popen*", "*os.execute*"
166-
)) or
167-
(process.name : "php*" and process.args : "-r" and process.args : "*fsockopen*" and process.args : "*/bin/*sh*") or
168-
(process.name : ("awk", "gawk", "mawk", "nawk") and process.args : "*/inet/tcp/*") or
169-
(process.name in ("openssl", "telnet")) or
170-
(process.args : (
171-
"./*", "/boot/*", "/dev/shm/*", "/etc/cron.*/*", "/etc/init.d/*", "/etc/update-motd.d/*", "/run/*", "/srv/*",
172-
"/tmp/*", "/var/tmp/*", "/var/log/*", "/opt/*"
173-
) and process.args_count == 1
152+
process where event.type == "start" and host.os.type == "linux" and event.action : ("exec", "exec_event", "start") and
153+
process.parent.executable : "/etc/update-motd.d/*" and
154+
(
155+
(
156+
process.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
157+
(
158+
process.args : ("-i", "-l") or
159+
(process.parent.name == "socat" and process.parent.args : "*exec*")
160+
)
161+
) or
162+
(
163+
process.name : ("nc", "ncat", "netcat", "nc.openbsd") and process.args_count >= 3 and
164+
not process.args : ("-*z*", "-*l*")
165+
) or
166+
(
167+
process.name : "python*" and process.args : "-c" and process.args : (
168+
"*import*pty*spawn*", "*import*subprocess*call*"
169+
)
170+
) or
171+
(
172+
process.name : "perl*" and process.args : "-e" and process.args : "*socket*" and process.args : (
173+
"*exec*", "*system*"
174+
)
175+
) or
176+
(
177+
process.name : "ruby*" and process.args : ("-e", "-rsocket") and process.args : (
178+
"*TCPSocket.new*", "*TCPSocket.open*"
179+
)
180+
) or
181+
(
182+
process.name : "lua*" and process.args : "-e" and process.args : "*socket.tcp*" and process.args : (
183+
"*io.popen*", "*os.execute*"
184+
)
185+
) or
186+
(process.name : "php*" and process.args : "-r" and process.args : "*fsockopen*" and process.args : "*/bin/*sh*") or
187+
(process.name : ("awk", "gawk", "mawk", "nawk") and process.args : "*/inet/tcp/*") or
188+
(process.name in ("openssl", "telnet")) or
189+
(
190+
process.args : (
191+
"./*", "/boot/*", "/dev/shm/*", "/etc/cron.*/*", "/etc/init.d/*", "/etc/update-motd.d/*", "/run/*", "/srv/*",
192+
"/tmp/*", "/var/tmp/*", "/var/log/*", "/opt/*"
193+
) and process.args_count == 1
194+
)
195+
) and
196+
not (
197+
process.parent.args == "--force" or
198+
process.args in ("/usr/games/lolcat", "/usr/bin/screenfetch") or
199+
process.parent.name == "system-crash-notification"
174200
)
175-
) and
176-
not (
177-
process.parent.args == "--force" or
178-
process.args in ("/usr/games/lolcat", "/usr/bin/screenfetch") or
179-
process.parent.name == "system-crash-notification"
180-
)
181201
'''
182202

183203
[[rule.threat]]

rules/linux/persistence_potential_persistence_script_executable_bit_set.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/06/03"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "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/08"
68

79
[rule]
810
author = ["Elastic"]
@@ -13,7 +15,7 @@ environment. Adversaries may create these scripts to execute malicious code at s
1315
persistence onto the system.
1416
"""
1517
from = "now-9m"
16-
index = ["logs-endpoint.events.process*", "endgame-*"]
18+
index = ["logs-endpoint.events.process*", "endgame-*", "logs-sentinel_one_cloud_funnel.*"]
1719
language = "eql"
1820
license = "Elastic License v2"
1921
name = "Executable Bit Set for Potential Persistence Script"
@@ -58,12 +60,13 @@ tags = [
5860
"Tactic: Persistence",
5961
"Data Source: Elastic Endgame",
6062
"Data Source: Elastic Defend",
63+
"Data Source: SentinelOne",
6164
]
6265
timestamp_override = "event.ingested"
6366
type = "eql"
6467

6568
query = '''
66-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
69+
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start") and
6770
process.args : (
6871
// Misc.
6972
"/etc/rc.local", "/etc/rc.common", "/etc/rc.d/rc.local", "/etc/init.d/*", "/etc/update-motd.d/*",

rules/linux/persistence_process_capability_set_via_setcap.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2024/06/03"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/06/03"
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/08"
68

79
[rule]
810
author = ["Elastic"]
@@ -13,7 +15,7 @@ by attackers to establish persistence by creating a backdoor, or escalate privil
1315
system.
1416
"""
1517
from = "now-9m"
16-
index = ["logs-endpoint.events.process*", "endgame-*"]
18+
index = ["logs-endpoint.events.process*", "endgame-*", "logs-sentinel_one_cloud_funnel.*"]
1719
language = "eql"
1820
license = "Elastic License v2"
1921
name = "Process Capability Set via setcap Utility"
@@ -53,12 +55,13 @@ tags = [
5355
"Tactic: Persistence",
5456
"Tactic: Privilege Escalation",
5557
"Data Source: Elastic Endgame",
56-
"Data Source: Elastic Defend"
58+
"Data Source: Elastic Defend",
59+
"Data Source: SentinelOne"
5760
]
5861
timestamp_override = "event.ingested"
5962
type = "eql"
6063
query = '''
61-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
64+
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start") and
6265
process.name == "setcap" and not (
6366
process.parent.executable == null or
6467
process.parent.executable : ("/var/lib/dpkg/*", "/var/lib/docker/*", "/tmp/newroot/*", "/var/tmp/newroot/*") or

rules/linux/persistence_setuid_setgid_capability_set.toml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2023/09/05"
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/08"
68

79
[transform]
810
[[transform.osquery]]
@@ -39,7 +41,7 @@ file owner or group. Threat actors can exploit these attributes to achieve persi
3941
allowing them to maintain control over a compromised system with elevated permissions.
4042
"""
4143
from = "now-9m"
42-
index = ["logs-endpoint.events.*", "endgame-*"]
44+
index = ["logs-endpoint.events.*", "endgame-*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*"]
4345
language = "eql"
4446
license = "Elastic License v2"
4547
name = "Setcap setuid/setgid Capability Set"
@@ -138,15 +140,18 @@ tags = [
138140
"Tactic: Persistence",
139141
"Data Source: Elastic Defend",
140142
"Data Source: Elastic Endgame",
143+
"Data Source: Crowdstrike",
144+
"Data Source: SentinelOne",
141145
]
142146
timestamp_override = "event.ingested"
143147
type = "eql"
144148
query = '''
145-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event") and
146-
process.name == "setcap" and process.args : "cap_set?id+ep" and not (
147-
process.parent.name in ("jem", "vzctl") or
148-
process.args like "/usr/bin/new?idmap"
149-
)
149+
process where host.os.type == "linux" and event.type == "start" and
150+
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
151+
process.name == "setcap" and process.args : "cap_set?id+ep" and not (
152+
process.parent.name in ("jem", "vzctl") or
153+
process.args like "/usr/bin/new?idmap"
154+
)
150155
'''
151156

152157
[[rule.threat]]

rules/linux/persistence_simple_web_server_creation.toml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2024/12/17"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/12/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/08"
68

79
[rule]
810
author = ["Elastic"]
@@ -12,7 +14,7 @@ simple HTTP web servers to establish persistence on a compromised system by uplo
1214
to the server web root, allowing them to regain remote access to the system if lost.
1315
"""
1416
from = "now-9m"
15-
index = ["logs-endpoint.events.process*"]
17+
index = ["logs-endpoint.events.process*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*", "endgame-*"]
1618
language = "eql"
1719
license = "Elastic License v2"
1820
name = "Simple HTTP Web Server Creation"
@@ -52,14 +54,19 @@ tags = [
5254
"Tactic: Execution",
5355
"Tactic: Command and Control",
5456
"Data Source: Elastic Defend",
57+
"Data Source: Crowdstrike",
58+
"Data Source: SentinelOne",
59+
"Data Source: Elastic Endgame",
5560
]
5661
timestamp_override = "event.ingested"
5762
type = "eql"
5863
query = '''
59-
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and (
60-
(process.name regex~ """php?[0-9]?\.?[0-9]{0,2}""" and process.args == "-S") or
61-
(process.name like "python*" and process.args in ("--cgi", "CGIHTTPServer"))
62-
)
64+
process where host.os.type == "linux" and event.type == "start" and
65+
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
66+
(
67+
(process.name regex~ """php?[0-9]?\.?[0-9]{0,2}""" and process.args == "-S") or
68+
(process.name like "python*" and process.args in ("--cgi", "CGIHTTPServer"))
69+
)
6370
'''
6471

6572
[[rule.threat]]

rules/linux/privilege_escalation_chown_chmod_unauthorized_file_read.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[metadata]
22
creation_date = "2023/07/28"
3-
integration = ["endpoint", "auditd_manager"]
3+
integration = ["endpoint", "auditd_manager", "crowdstrike", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
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/08"
68

79
[rule]
810
author = ["Elastic"]
@@ -13,7 +15,7 @@ commands or input containing wildcards (e.g., *, ?, []) to execute unintended op
1315
tricking the system into interpreting the wildcard characters in unexpected ways.
1416
"""
1517
from = "now-9m"
16-
index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
18+
index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*", "logs-crowdstrike.fdr*", "logs-sentinel_one_cloud_funnel.*"]
1719
language = "eql"
1820
license = "Elastic License v2"
1921
name = "Potential Unauthorized Access via Wildcard Injection Detected"
@@ -55,13 +57,16 @@ tags = [
5557
"Data Source: Elastic Endgame",
5658
"Data Source: Elastic Defend",
5759
"Data Source: Auditd Manager",
60+
"Data Source: Crowdstrike",
61+
"Data Source: SentinelOne",
5862
]
5963
timestamp_override = "event.ingested"
6064
type = "eql"
6165

6266
query = '''
63-
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started")
64-
and process.name in ("chown", "chmod") and process.args == "-R" and process.args : "--reference=*"
67+
process where host.os.type == "linux" and event.type == "start" and
68+
event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
69+
process.name in ("chown", "chmod") and process.args == "-R" and process.args : "--reference=*"
6570
'''
6671

6772

0 commit comments

Comments
 (0)