Skip to content

Commit 9142af3

Browse files
Merge branch 'main' into terrancedejesus/issue5501
2 parents a7a9422 + 066096f commit 9142af3

14 files changed

+146
-112
lines changed

rules/linux/collection_linux_clipboard_activity.toml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
[metadata]
22
creation_date = "2023/07/27"
3-
integration = ["endpoint", "auditd_manager"]
3+
integration = ["endpoint", "auditd_manager", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2025/01/15"
5+
updated_date = "2025/12/17"
66

77
[rule]
88
author = ["Elastic"]
99
description = """
10-
This rule monitors for the usage of the most common clipboard utilities on unix systems by an uncommon process group
11-
leader. Adversaries may collect data stored in the clipboard from users copying information within or between
12-
applications.
10+
This rule monitors for the usage of the most common clipboard utilities on unix systems by an uncommon process parent.
11+
Adversaries may collect data stored in the clipboard from users copying information within or between applications.
1312
"""
1413
from = "now-9m"
15-
index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
14+
index = [
15+
"logs-endpoint.events.process*",
16+
"logs-sentinel_one_cloud_funnel.*",
17+
"endgame-*",
18+
"auditbeat-*",
19+
"logs-auditd_manager.auditd-*",
20+
]
1621
language = "kuery"
1722
license = "Elastic License v2"
1823
name = "Linux Clipboard Activity Detected"
@@ -27,13 +32,14 @@ tags = [
2732
"Data Source: Elastic Defend",
2833
"Data Source: Elastic Endgame",
2934
"Data Source: Auditd Manager",
35+
"Data Source: SentinelOne",
3036
"Resources: Investigation Guide",
3137
]
3238
timestamp_override = "event.ingested"
3339
type = "new_terms"
3440
query = '''
3541
event.category:process and host.os.type:"linux" and event.type:"start" and
36-
event.action:("exec" or "exec_event" or "executed" or "process_started") and
42+
event.action:("exec" or "exec_event" or "executed" or "process_started" or "start") and
3743
process.name:("xclip" or "xsel" or "wl-clipboard" or "clipman" or "copyq") and
3844
not process.parent.name:("bwrap" or "micro")
3945
'''
@@ -88,8 +94,8 @@ reference = "https://attack.mitre.org/tactics/TA0009/"
8894

8995
[rule.new_terms]
9096
field = "new_terms_fields"
91-
value = ["host.id", "process.group_leader.executable"]
97+
value = ["agent.id", "process.parent.executable"]
9298

9399
[[rule.new_terms.history_window_start]]
94100
field = "history_window_start"
95-
value = "now-7d"
101+
value = "now-5d"

rules/linux/command_and_control_aws_cli_endpoint_url_used.toml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
[metadata]
22
creation_date = "2024/08/21"
3-
integration = ["endpoint", "crowdstrike"]
3+
integration = ["endpoint", "auditd_manager", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/10/17"
5+
updated_date = "2025/09/16"
66

77
[rule]
88
author = ["Elastic"]
99
description = """
10-
Detects the use of the AWS CLI with the `--endpoint-url` argument, which allows users to specify a custom endpoint URL for AWS services. This can be leveraged by adversaries to redirect API requests to non-standard or malicious endpoints, potentially bypassing typical security controls and logging mechanisms. This behavior may indicate an attempt to interact with unauthorized or compromised infrastructure, exfiltrate data, or perform other malicious activities under the guise of legitimate AWS operations.
10+
Detects the use of the AWS CLI with the "--endpoint-url" argument, which allows users to specify a custom endpoint URL
11+
for AWS services. This can be leveraged by adversaries to redirect API requests to non-standard or malicious endpoints,
12+
potentially bypassing typical security controls and logging mechanisms. This behavior may indicate an attempt to interact
13+
with unauthorized or compromised infrastructure, exfiltrate data, or perform other malicious activities under the guise
14+
of legitimate AWS operations.
1115
"""
1216
from = "now-9m"
13-
index = ["logs-endpoint.events.process-*", "logs-crowdstrike.fdr*"]
17+
index = [
18+
"logs-crowdstrike.fdr*",
19+
"logs-endpoint.events.process*",
20+
"logs-sentinel_one_cloud_funnel.*",
21+
"endgame-*",
22+
"auditbeat-*",
23+
"logs-auditd_manager.auditd-*",
24+
]
1425
language = "kuery"
1526
license = "Elastic License v2"
1627
name = "AWS CLI Command with Custom Endpoint URL"
@@ -21,18 +32,23 @@ risk_score = 47
2132
rule_id = "349276c0-5fcf-11ef-b1a9-f661ea17fbce"
2233
severity = "medium"
2334
tags = [
24-
"Data Source: Elastic Defend",
25-
"Domain: Endpoint",
26-
"OS: Linux",
27-
"Use Case: Threat Detection",
28-
"Tactic: Command and Control",
29-
"Resources: Investigation Guide",
30-
"Data Source: Crowdstrike",
35+
"Domain: Endpoint",
36+
"OS: Linux",
37+
"Use Case: Threat Detection",
38+
"Tactic: Command and Control",
39+
"Resources: Investigation Guide",
40+
"Data Source: Elastic Defend",
41+
"Data Source: Elastic Endgame",
42+
"Data Source: Auditd Manager",
43+
"Data Source: Crowdstrike",
44+
"Data Source: SentinelOne",
3145
]
3246
type = "new_terms"
3347
timestamp_override = "event.ingested"
3448
query = '''
35-
host.os.type: "linux" and event.category: "process" and process.name: "aws" and process.args: "--endpoint-url"
49+
host.os.type:"linux" and event.category:"process" and
50+
event.action:("exec" or "exec_event" or "executed" or "process_started" or "ProcessRollup2") and
51+
process.name:"aws" and process.args:"--endpoint-url"
3652
'''
3753
note = """## Triage and analysis
3854
@@ -72,21 +88,21 @@ The AWS CLI allows users to interact with AWS services via command-line, offerin
7288

7389
[[rule.threat]]
7490
framework = "MITRE ATT&CK"
91+
7592
[[rule.threat.technique]]
7693
id = "T1102"
7794
name = "Web Service"
7895
reference = "https://attack.mitre.org/techniques/T1102/"
7996

80-
8197
[rule.threat.tactic]
8298
id = "TA0011"
8399
name = "Command and Control"
84100
reference = "https://attack.mitre.org/tactics/TA0011/"
85101

86-
87102
[rule.new_terms]
88103
field = "new_terms_fields"
89-
value = ["user.name"]
104+
value = ["host.id"]
105+
90106
[[rule.new_terms.history_window_start]]
91107
field = "history_window_start"
92-
value = "now-10d"
108+
value = "now-3d"

rules/linux/command_and_control_cat_network_activity.toml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2023/09/04"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2025/02/04"
5+
updated_date = "2025/09/16"
66

77
[transform]
88
[[transform.osquery]]
@@ -29,7 +29,6 @@ query = "SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.u
2929
label = "Osquery - Retrieve Process Info"
3030
query = "SELECT name, cmdline, parent, path, uid FROM processes"
3131

32-
3332
[rule]
3433
author = ["Elastic"]
3534
description = """
@@ -138,42 +137,42 @@ tags = [
138137
"Resources: Investigation Guide",
139138
]
140139
type = "eql"
141-
142140
query = '''
143-
sequence by host.id, process.entity_id with maxspan=1s
141+
sequence by host.id, process.entity_id with maxspan=3s
144142
[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
145143
process.name == "cat" and process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")]
146144
[network where host.os.type == "linux" and event.action in ("connection_attempted", "disconnect_received") and
147-
process.name == "cat" and not (destination.ip == null or destination.ip == "0.0.0.0" or cidrmatch(
148-
destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
149-
"192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
150-
"192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
151-
"192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
152-
"FF00::/8"
145+
process.name == "cat" and not (
146+
destination.ip == null or destination.ip == "0.0.0.0" or cidrmatch(
147+
destination.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.0.0/29",
148+
"192.0.0.8/32", "192.0.0.9/32", "192.0.0.10/32", "192.0.0.170/32", "192.0.0.171/32", "192.0.2.0/24",
149+
"192.31.196.0/24", "192.52.193.0/24", "192.168.0.0/16", "192.88.99.0/24", "224.0.0.0/4", "100.64.0.0/10",
150+
"192.175.48.0/24","198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4", "::1", "FE80::/10",
151+
"FF00::/8"
153152
)
154153
)]
155154
'''
156155

157-
158156
[[rule.threat]]
159157
framework = "MITRE ATT&CK"
160158

161159
[rule.threat.tactic]
162160
id = "TA0011"
163161
name = "Command and Control"
164162
reference = "https://attack.mitre.org/tactics/TA0011/"
163+
165164
[[rule.threat]]
166165
framework = "MITRE ATT&CK"
167166

168167
[rule.threat.tactic]
169168
id = "TA0005"
170169
name = "Defense Evasion"
171170
reference = "https://attack.mitre.org/tactics/TA0005/"
171+
172172
[[rule.threat]]
173173
framework = "MITRE ATT&CK"
174174

175175
[rule.threat.tactic]
176176
id = "TA0010"
177177
name = "Exfiltration"
178178
reference = "https://attack.mitre.org/tactics/TA0010/"
179-

rules/linux/command_and_control_curl_socks_proxy_detected.toml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
creation_date = "2024/11/04"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2025/02/04"
5+
updated_date = "2025/09/16"
66

77
[rule]
88
author = ["Elastic"]
99
description = """
10-
This rule detects the use of the `curl` command-line tool with SOCKS proxy options, launched from an unusual parent
11-
process. Attackers may use `curl` to establish a SOCKS proxy connection to bypass network restrictions and exfiltrate
10+
This rule detects the use of the "curl" command-line tool with SOCKS proxy options, launched from an unusual parent
11+
process. Attackers may use "curl" to establish a SOCKS proxy connection to bypass network restrictions and exfiltrate
1212
data or communicate with C2 servers.
1313
"""
1414
from = "now-9m"
1515
index = ["logs-endpoint.events.process*"]
1616
language = "eql"
1717
license = "Elastic License v2"
1818
name = "Curl SOCKS Proxy Activity from Unusual Parent"
19-
risk_score = 21
19+
risk_score = 47
2020
rule_id = "734239fe-eda8-48c0-bca8-9e3dafd81a88"
2121
setup = """## Setup
2222
@@ -56,7 +56,7 @@ In order to capture this behavior, this rule requires a specific configuration o
5656
After saving the integration change, the Elastic Agents running this policy will be updated and the rule will function properly.
5757
For more information on capturing environment variables refer to the [helper guide](https://www.elastic.co/guide/en/security/current/environment-variable-capture.html).
5858
"""
59-
severity = "low"
59+
severity = "medium"
6060
tags = [
6161
"Domain: Endpoint",
6262
"OS: Linux",
@@ -71,13 +71,18 @@ query = '''
7171
process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
7272
process.name == "curl" and (
7373
process.parent.executable like (
74-
"/dev/shm/*", "/tmp/*", "/var/tmp/*", "/var/run/*", "/root/*", "/boot/*", "/var/www/html/*", "/opt/.*"
74+
"/dev/shm/*", "/tmp/*", "/var/tmp/*", "/var/run/*", "/root/*", "/boot/*", "/var/www/*", "/opt/.*",
75+
"/home/*"
7576
) or
76-
process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish")
77+
process.parent.name in ("bash", "dash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") or
78+
process.parent.name like ".*"
7779
) and (
7880
process.args like ("--socks5-hostname", "--proxy", "--preproxy", "socks5*") or
7981
process.args == "-x" or
80-
process.env_vars like ("http_proxy=socks5h://*", "HTTPS_PROXY=socks5h://*", "ALL_PROXY=socks5h://*")
82+
process.env_vars like~ ("http_proxy=socks5h://*", "HTTPS_PROXY=socks5h://*", "ALL_PROXY=socks5h://*")
83+
) and not (
84+
process.parent.args == "/opt/rudder/share/commands/agent-run" or
85+
process.args == "http://localhost:8080/rudder/api/status"
8186
)
8287
'''
8388
note = """## Triage and analysis

rules/linux/command_and_control_git_repo_or_file_download_to_sus_dir.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2025/04/25"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2025/07/07"
5+
updated_date = "2025/09/16"
66

77
[rule]
88
author = ["Elastic"]
@@ -12,7 +12,7 @@ the creation of files in suspicious directories such as /tmp, /var/tmp, or /dev/
1212
attempt to download a payload, exploit or tool.
1313
"""
1414
from = "now-9m"
15-
index = ["logs-endpoint.events.*"]
15+
index = ["logs-endpoint.events.process*", "logs-endpoint.events.file*"]
1616
language = "eql"
1717
license = "Elastic License v2"
1818
name = "Git Repository or File Download to Suspicious Directory"
@@ -106,6 +106,9 @@ sequence by process.entity_id, host.id with maxspan=10s
106106
[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and (
107107
(process.name == "git" and process.args == "clone") or
108108
(process.name in ("wget", "curl") and process.command_line like~ "*github*")
109+
) and not (
110+
process.parent.name in ("git", "cmake") or
111+
process.parent.args like "/root/.ansible/tmp/ansible*"
109112
)]
110113
[file where host.os.type == "linux" and event.type == "creation" and file.path like ("/tmp/*", "/var/tmp/*", "/dev/shm/*")]
111114
'''

rules/linux/command_and_control_ip_forwarding_activity.toml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/11/04"
33
integration = ["endpoint", "sentinel_one_cloud_funnel", "crowdstrike"]
44
maturity = "production"
5-
updated_date = "2025/10/17"
5+
updated_date = "2025/12/17"
66

77
[rule]
88
author = ["Elastic"]
@@ -67,7 +67,6 @@ tags = [
6767
]
6868
timestamp_override = "event.ingested"
6969
type = "eql"
70-
7170
query = '''
7271
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "start", "exec_event", "ProcessRollup2") and
7372
?process.parent.executable != null and process.command_line like (
@@ -80,20 +79,25 @@ process where host.os.type == "linux" and event.type == "start" and event.action
8079
process.command_line like "*echo *"
8180
)
8281
) and
83-
not process.parent.name like~ ("privsep-helper", "platform-python*", "init.ipv6-global", "wsl-bootstrap")
82+
not (
83+
process.parent.name like~ ("privsep-helper", "platform-python*", "init.ipv6-global", "wsl-bootstrap") or
84+
?process.parent.executable == "/usr/sbin/sshd" or
85+
?process.parent.args in (
86+
"/usr/lib/pritunl/usr/bin/pritunl", "/usr/bin/dockerd-rootless.sh", "/etc/rc.d/init.d/network", "/etc/rc0.d/K90network"
87+
) or
88+
?process.parent.args like "/etc/untangle/post-network-hook.d/*"
89+
)
8490
'''
8591

86-
8792
[[rule.threat]]
8893
framework = "MITRE ATT&CK"
94+
8995
[[rule.threat.technique]]
9096
id = "T1572"
9197
name = "Protocol Tunneling"
9298
reference = "https://attack.mitre.org/techniques/T1572/"
9399

94-
95100
[rule.threat.tactic]
96101
id = "TA0011"
97102
name = "Command and Control"
98103
reference = "https://attack.mitre.org/tactics/TA0011/"
99-

rules/linux/command_and_control_linux_chisel_client_activity.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2023/08/23"
33
integration = ["endpoint"]
44
maturity = "production"
5-
updated_date = "2025/02/04"
5+
updated_date = "2025/12/17"
66

77
[transform]
88
[[transform.osquery]]
@@ -29,7 +29,6 @@ query = "SELECT pid, username, name FROM processes p JOIN users u ON u.uid = p.u
2929
label = "Osquery - Retrieve Process Info"
3030
query = "SELECT name, cmdline, parent, path, uid FROM processes"
3131

32-
3332
[rule]
3433
author = ["Elastic"]
3534
description = """
@@ -146,18 +145,19 @@ tags = [
146145
"Resources: Investigation Guide",
147146
]
148147
type = "eql"
149-
150148
query = '''
151149
sequence by host.id, process.entity_id with maxspan=3s
152150
[process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and
153-
process.args == "client" and process.args : ("R*", "*:*", "*socks*", "*.*") and process.args_count >= 4 and
151+
process.args == "client" and process.args : ("R*", "*:*", "*socks*") and process.args_count >= 4 and
154152
process.parent.name in ("bash", "dash", "ash", "sh", "tcsh", "csh", "zsh", "ksh", "fish") and
155153
not process.name in ("velociraptor", "nbemmcmd", "redis-cli", "ipa")]
156154
[network where host.os.type == "linux" and event.action == "connection_attempted" and event.type == "start" and
157155
destination.ip != null and destination.ip != "127.0.0.1" and destination.ip != "::1" and
158156
not process.name : (
159157
"python*", "php*", "perl", "ruby", "lua*", "openssl", "nc", "netcat", "ncat", "telnet", "awk", "java", "telnet",
160-
"ftp", "socat", "curl", "wget", "dpkg", "docker", "dockerd", "yum", "apt", "rpm", "dnf", "ssh", "sshd")]
158+
"ftp", "socat", "curl", "wget", "dpkg", "docker", "dockerd", "yum", "apt", "rpm", "dnf", "ssh", "sshd", "kubectl*",
159+
"clickhouse"
160+
)]
161161
'''
162162

163163
[[rule.threat]]

0 commit comments

Comments
 (0)