Linux auditd: Detect chattr -i removing immutable file attribute
Flags Linux processes using chattr to remove the immutable (-i) file attribute via auditd execve telemetry.
- Product
- linux
- Service
- auditd
- Author
- Jakob Weinzettl, oscd.community (SigmaHQ), DRL 1.1
- Published
- 2019-09-23
- Updated
- 2026-07-31
ATT&CK techniques
Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule matches executions of chattr that include the -i option, which removes the immutable file attribute. Attackers use this to modify or replace files that were protected to resist tampering, which can enable defense impairment or persistence workflows. It relies on auditd EXECVE telemetry capturing command-line arguments containing both 'chattr' and '-i'.
Reporting behind it
Changelog
v3- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "Linux auditd: Detect chattr -i removing immutable file attribute"
id: 5678d1bf-bb79-4d7f-ac0f-9b0c93681d1f
status: test
description: This rule matches executions of chattr that include the -i option, which removes the immutable file attribute. Attackers use this to modify or replace files that were protected to resist tampering, which can enable defense impairment or persistence workflows. It relies on auditd EXECVE telemetry capturing command-line arguments containing both 'chattr' and '-i'.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1222.002/T1222.002.md
- https://github.com/SigmaHQ/sigma/blob/master/rules/linux/auditd/execve/lnx_auditd_chattr_immutable_removal.yml
author: Jakob Weinzettl, oscd.community, Huntrule Team
date: 2019-09-23
modified: 2022-11-26
tags:
- attack.defense-impairment
- attack.t1222.002
logsource:
product: linux
service: auditd
detection:
selection:
type: EXECVE
a0|contains: chattr
a1|contains: -i
condition: selection
falsepositives:
- Administrator interacting with immutable files (e.g. for instance backups).
level: medium
simulation:
- type: atomic-red-team
name: Remove immutable file attribute
technique: T1222.002
atomic_guid: e7469fe2-ad41-4382-8965-99b94dd3c13f
license: DRL-1.1
related:
- id: a5b977d6-8a81-4475-91b9-49dbfcd941f7
type: derived