Skip to content

Commit 152ba6a

Browse files
Aegrahtradebot-elastic
authored andcommitted
[Rule Tuning] File Deletion via Shred (#5381)
* [Rule Tuning] File Deletion via Shred * ++ * Update integrations and query for file deletion rule (cherry picked from commit 4a042d1)
1 parent 49b6468 commit 152ba6a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

rules/linux/defense_evasion_file_deletion_via_shred.toml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/04/27"
3-
integration = ["endpoint", "crowdstrike", "sentinel_one_cloud_funnel"]
3+
integration = ["auditd_manager", "crowdstrike", "endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2025/03/20"
5+
updated_date = "2025/12/01"
66

77
[rule]
88
author = ["Elastic"]
@@ -13,10 +13,12 @@ remove them at the end as part of the post-intrusion cleanup process.
1313
"""
1414
from = "now-9m"
1515
index = [
16+
"auditbeat-*",
1617
"endgame-*",
1718
"logs-crowdstrike.fdr*",
1819
"logs-endpoint.events.process*",
1920
"logs-sentinel_one_cloud_funnel.*",
21+
"logs-auditd_manager.auditd-*",
2022
]
2123
language = "eql"
2224
license = "Elastic License v2"
@@ -88,6 +90,7 @@ tags = [
8890
"OS: Linux",
8991
"Use Case: Threat Detection",
9092
"Tactic: Defense Evasion",
93+
"Data Source: Auditd Manager",
9194
"Data Source: Elastic Defend",
9295
"Data Source: Elastic Endgame",
9396
"Data Source: Crowdstrike",
@@ -98,9 +101,13 @@ timestamp_override = "event.ingested"
98101
type = "eql"
99102

100103
query = '''
101-
process where host.os.type == "linux" and event.type == "start" and process.name == "shred" and process.args in (
102-
"-u", "--remove", "-z", "--zero"
103-
) and not process.parent.name == "logrotate"
104+
process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2", "executed", "process_started") and
105+
process.name == "shred" and (
106+
// Any short-flag cluster containing at least one of u/z, and containing no extra "-" after the first one
107+
process.args regex~ "-[^-]*[uz][^-]*" or
108+
process.args in ("--remove", "--zero")
109+
) and
110+
not process.parent.name == "logrotate"
104111
'''
105112

106113

0 commit comments

Comments
 (0)