Skip to content

Commit fec00d8

Browse files
Aegrahtradebot-elastic
authored andcommitted
[Rule Tuning] Remote File Creation in World Writeable Directory (#5304)
* [Rule Tuning] Remote File Creation in World Writeable Directory * Update lateral_movement_remote_file_creation_world_writeable_dir.toml (cherry picked from commit fe642a8)
1 parent dc51190 commit fec00d8

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

rules/linux/lateral_movement_remote_file_creation_world_writeable_dir.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -13,7 +13,7 @@ be an indicator of an attacker attempting to move laterally within a network.
1313
"""
1414
from = "now-9m"
1515
index = ["logs-endpoint.events.file*", "auditbeat-*"]
16-
language = "eql"
16+
language = "kuery"
1717
license = "Elastic License v2"
1818
name = "Remote File Creation in World Writeable Directory"
1919
note = """ ## Triage and analysis
@@ -101,11 +101,12 @@ tags = [
101101
"Resources: Investigation Guide",
102102
]
103103
timestamp_override = "event.ingested"
104-
type = "eql"
104+
type = "new_terms"
105105
query = '''
106-
file where host.os.type == "linux" and event.action == "creation" and
107-
process.name in ("scp", "sshd", "ssh", "ftp", "sftp", "vsftpd", "sftp-server", "rsync") and
108-
file.path like~ ("/tmp*", "/var/tmp*", "/dev/shm/*", "/home/.*") and user.id != "0"
106+
event.category:file and host.os.type:linux and event.action:creation and
107+
process.name:(ftp or rsync or scp or sftp or sftp-server or ssh or sshd or vsftpd) and
108+
file.path:((/dev/shm/* or /tmp* or /var/tmp*) and not (/tmp/ansible-tmp-* or /var/tmp/ansible-tmp-*)) and
109+
not user.id:0
109110
'''
110111

111112
[[rule.threat]]
@@ -130,3 +131,11 @@ reference = "https://attack.mitre.org/techniques/T1570/"
130131
id = "TA0008"
131132
name = "Lateral Movement"
132133
reference = "https://attack.mitre.org/tactics/TA0008/"
134+
135+
[rule.new_terms]
136+
field = "new_terms_fields"
137+
value = ["process.executable", "host.id"]
138+
139+
[[rule.new_terms.history_window_start]]
140+
field = "history_window_start"
141+
value = "now-7d"

0 commit comments

Comments
 (0)