Detection rules › Splunk
Linux Auditd File Permission Modification Via Chmod
The following analytic detects suspicious file permission modifications using the chmod command, which may indicate an attacker attempting to alter access controls on critical files or directories. Such modifications can be used to grant unauthorized users elevated privileges or to conceal malicious activities by restricting legitimate access. By monitoring for unusual or unauthorized chmod usage, this analytic helps identify potential security breaches, allowing security teams to respond promptly to prevent privilege escalation, data tampering, or other unauthorized actions on the system.
Known false positives
- Administrator or network operator can use this application for automation purposes. Please update the filter macros to remove false positives.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| Linux | auditd PROCTITLE record: Process Title info |
Rule body
name: Linux Auditd File Permission Modification Via Chmod
id: 5f1d2ea7-eec0-4790-8b24-6875312ad492
version: 15
creation_date: '2024-08-12'
modification_date: '2026-05-13'
author: "Teoderick Contreras, Splunk, Ivar Nygård"
status: production
type: Anomaly
description: The following analytic detects suspicious file permission modifications using the `chmod` command, which may indicate an attacker attempting to alter access controls on critical files or directories. Such modifications can be used to grant unauthorized users elevated privileges or to conceal malicious activities by restricting legitimate access. By monitoring for unusual or unauthorized `chmod` usage, this analytic helps identify potential security breaches, allowing security teams to respond promptly to prevent privilege escalation, data tampering, or other unauthorized actions on the system.
data_source:
- Linux Auditd Proctitle
search: "`linux_auditd` proctitle=\"*chmod*\" AND proctitle IN (\"* 777 *\", \"* 755 *\", \"*+*x*\", \"* 754 *\")\n | rename host as dest\n | stats count min(_time) as firstTime max(_time) as lastTime\n BY proctitle dest\n | `security_content_ctime(firstTime)`\n | `security_content_ctime(lastTime)`\n | `linux_auditd_file_permission_modification_via_chmod_filter`"
how_to_implement: To implement this detection, the process begins by ingesting auditd data, that consists of SYSCALL, TYPE, EXECVE and PROCTITLE events, which captures command-line executions and process details on Unix/Linux systems. These logs should be ingested and processed using Splunk Add-on for Unix and Linux (https://splunkbase.splunk.com/app/833), which is essential for correctly parsing and categorizing the data. The next step involves normalizing the field names to match the field names set by the Splunk Common Information Model (CIM) to ensure consistency across different data sources and enhance the efficiency of data modeling. This approach enables effective monitoring and detection of linux endpoints where auditd is deployed
known_false_positives: Administrator or network operator can use this application for automation purposes. Please update the filter macros to remove false positives.
references:
- https://www.splunk.com/en_us/blog/security/deep-dive-on-persistence-privilege-escalation-technique-and-detection-in-linux-platform.html
intermediate_findings:
entities:
- field: dest
type: system
score: 20
message: A $proctitle$ event occurred on host $dest$ to modify file permissions using the "chmod" command.
analytic_story:
- Linux Persistence Techniques
- Compromised Linux Host
- China-Nexus Threat Activity
- Linux Living Off The Land
- XorDDos
- Salt Typhoon
- Linux Privilege Escalation
- Axios Supply Chain Post Compromise
asset_type: Endpoint
mitre_attack_id:
- T1222.002
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`linux_auditd` proctitle="*chmod*" AND proctitle IN ("* 777 *", "* 755 *", "*+*x*", "* 754 *")
Stage 2: rename
| rename host as dest
Stage 3: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY proctitle dest
Stage 4: search
| `security_content_ctime(firstTime)`
Stage 5: search
| `security_content_ctime(lastTime)`
Stage 6: search
| `linux_auditd_file_permission_modification_via_chmod_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
proctitle | eq |
| field:"proctitle" kind:eq |
proctitle | in |
| field:"proctitle" kind:in |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"auditd" |