Skip to content

Commit a448784

Browse files
Rule Tuning File Permission Modification in Writable Directory (#2961)
(cherry picked from commit 6527eb0)
1 parent 1350ee7 commit a448784

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

rules/linux/defense_evasion_file_mod_writable_dir.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ integration = ["endpoint"]
44
maturity = "production"
55
min_stack_comments = "New fields added: required_fields, related_integrations, setup"
66
min_stack_version = "8.3.0"
7-
updated_date = "2023/06/22"
7+
updated_date = "2023/07/25"
88

99
[rule]
1010
author = ["Elastic"]
@@ -20,21 +20,22 @@ false_positives = [
2020
]
2121
from = "now-9m"
2222
index = ["auditbeat-*", "logs-endpoint.events.*"]
23-
language = "kuery"
23+
language = "eql"
2424
license = "Elastic License v2"
2525
name = "File Permission Modification in Writable Directory"
2626
risk_score = 21
2727
rule_id = "9f9a2a82-93a8-4b1a-8778-1780895626d4"
2828
severity = "low"
2929
tags = ["Domain: Endpoint", "OS: Linux", "Use Case: Threat Detection", "Tactic: Defense Evasion"]
3030
timestamp_override = "event.ingested"
31-
type = "query"
31+
type = "eql"
3232

3333
query = '''
34-
event.category:process and host.os.type:linux and event.type:(start or process_started) and
35-
process.name:(chmod or chown or chattr or chgrp) and
36-
process.working_directory:(/tmp or /var/tmp or /dev/shm) and
37-
not user.name:root
34+
process where host.os.type == "linux" and event.type == "start"and
35+
process.name in ("chmod", "chown", "chattr", "chgrp") and
36+
process.working_directory in ("/tmp", "/var/tmp", "/dev/shm") and
37+
not process.parent.name in ("update-motd-updates-available") and
38+
not user.name == "root"
3839
'''
3940

4041

0 commit comments

Comments
 (0)