Skip to content

Commit 913cffd

Browse files
committed
[Rule Tuning] Security File Access via Common Utilities
1 parent 3726611 commit 913cffd

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

rules/linux/discovery_security_file_access_via_common_utility.toml

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

77
[rule]
88
author = ["Elastic"]
@@ -96,27 +96,36 @@ tags = [
9696
]
9797
timestamp_override = "event.ingested"
9898
type = "eql"
99-
10099
query = '''
101100
process where host.os.type == "linux" and event.type == "start" and
102-
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
103-
process.name in ("cat", "grep", "less", "more", "strings", "awk", "find", "xargs") and
104-
process.args like (
105-
"/etc/security/*", "/etc/pam.d/*", "/etc/login.defs", "/lib/security/*", "/lib64/security/*",
106-
"/usr/lib/security/*", "/usr/lib64/security/*", "/usr/lib/x86_64-linux-gnu/security/*",
107-
"/home/*/.aws/credentials", "/home/*/.aws/config", "/home/*/.config/gcloud/*credentials.json",
108-
"/home/*/.config/gcloud/configurations/config_default", "/home/*/.azure/accessTokens.json",
109-
"/home/*/.azure/azureProfile.json"
110-
) and
111-
not process.parent.name in ("wazuh-modulesd", "lynis")
101+
event.action in ("exec", "exec_event", "start", "ProcessRollup2") and
102+
process.name in ("cat", "less", "more", "strings", "find", "xargs") and
103+
process.parent.executable != null and
104+
process.args like (
105+
"/etc/security/*", "/etc/pam.d/*", "/etc/login.defs", "/lib/security/*", "/lib64/security/*",
106+
"/usr/lib/security/*", "/usr/lib64/security/*", "/usr/lib/x86_64-linux-gnu/security/*",
107+
"/home/*/.aws/credentials", "/home/*/.aws/config", "/home/*/.config/gcloud/*credentials.json",
108+
"/home/*/.config/gcloud/configurations/config_default", "/home/*/.azure/accessTokens.json",
109+
"/home/*/.azure/azureProfile.json"
110+
) and not (
111+
process.parent.name in ("wazuh-modulesd", "lynis") or
112+
process.command_line in ("cat /etc/login.defs" , "cat /home/asterisk/.aws/credentials") or
113+
?process.parent.command_line in (
114+
"/bin/sh /usr/sbin/lynis audit system --cronjob",
115+
"/usr/bin/find -L /etc/security/limits.conf /etc/security/limits.d -type f -exec /usr/bin/cat {} ;",
116+
"/usr/bin/find /etc/security/limits.conf /etc/security/limits.d -type f -exec /usr/bin/cat {} ;"
117+
) or
118+
?process.parent.args in ("/opt/imperva/ragent/bin/get_sys_resources.sh", "/usr/sbin/lynis", "./terra_linux.sh") or
119+
process.args == "/usr/bin/coreutils" or
120+
(process.parent.name == "pwsh" and process.parent.command_line like "*Evaluate-STIG*") or
121+
?process.parent.executable == "/usr/sap/audit_scripts/auto_audit_gral.sh"
122+
)
112123
'''
113124

114-
115125
[[rule.threat]]
116126
framework = "MITRE ATT&CK"
117127

118128
[rule.threat.tactic]
119129
id = "TA0007"
120130
name = "Discovery"
121131
reference = "https://attack.mitre.org/tactics/TA0007/"
122-

0 commit comments

Comments
 (0)