Sensitive Credential File Modified By Unexpected Process (DirtyClone Page Cache Corruption) - STRICT
SIGMA detection rule by Adama ASSIONGBON (SOC & CTI Consultant), https://linkedin.com/in/adama-assiongbon-9029893a · Unknown
Detects a write to a sensitive credential file (/etc/passwd, /etc/shadow, /etc/group, /etc/gshadow, /etc/sudoers) by a process other than a known password/user management tool, consistent with the confirmed-impact stage of CVE-2026-43503 (DirtyClone) page cache corruption, where the kernel bug allows writing to a file opened read-only. SOC L1 should verify the source, affected host, user, process or request fields, timing, and related activity.
La règle signale un comportement potentiellement suspect. Le SOC L1 doit vérifier la source, l’hôte affecté, l’utilisateur, les champs de processus ou de requête, la chronologie et les activités associées.
title: Sensitive Credential File Modified By Unexpected Process (DirtyClone Page Cache Corruption) - STRICT
id: b72f67cc-f910-45f6-a61d-35d4c61b5050
related:
- id: d6018715-e42e-430f-9253-6c59104a00bd
type: similar
- id: bbf699ba-8d38-4cfe-907a-45063e7eea32
type: similar
status: experimental
description: |
Detects a write to a sensitive credential file (/etc/passwd, /etc/shadow, /etc/group, /etc/gshadow, /etc/sudoers) by a process other than a known password/user management tool, consistent with the confirmed-impact stage of CVE-2026-43503 (DirtyClone) page cache corruption, where the kernel bug allows writing to a file opened read-only. SOC L1 should verify the source, affected host, user, process or request fields, timing, and related activity.
La règle signale un comportement potentiellement suspect. Le SOC L1 doit vérifier la source, l’hôte affecté, l’utilisateur, les champs de processus ou de requête, la chronologie et les activités associées.
references:
- https://github.com/entra1337/DirtyClone
- https://github.com/entra1337/DirtyClone/blob/main/dirtyclone.py
author: Adama ASSIONGBON (SOC & CTI Consultant), https://linkedin.com/in/adama-assiongbon-9029893a
date: 2026-07-30
logsource:
product: linux
category: file_event
definition: >
Linux file modification telemetry from auditd (watch rules on write/rename for the
listed paths), Sysmon for Linux, or EDR/FIM. Required fields: TargetFilename and Image.
This rule is independent of process_creation telemetry and of any iptables/ip command
execution, it fires purely on the resulting file state change.
detection:
selection_sensitive_file:
TargetFilename:
- '/etc/passwd'
- '/etc/shadow'
- '/etc/gshadow'
- '/etc/group'
- '/etc/sudoers'
selection_sensitive_file_sudoers_d:
TargetFilename|startswith: '/etc/sudoers.d/'
filter_main_legitimate_writer:
Image:
- '/usr/bin/passwd'
- '/usr/bin/chpasswd'
- '/usr/sbin/chpasswd'
- '/usr/bin/vipw'
- '/usr/sbin/vipw'
- '/usr/bin/vigr'
- '/usr/sbin/vigr'
- '/usr/sbin/useradd'
- '/usr/sbin/userdel'
- '/usr/sbin/usermod'
- '/usr/sbin/groupadd'
- '/usr/sbin/groupdel'
- '/usr/sbin/groupmod'
- '/usr/sbin/visudo'
- '/usr/bin/visudo'
- '/usr/lib/systemd/systemd-sysusers'
- '/usr/bin/systemd-sysusers'
- '/usr/sbin/pwconv'
- '/usr/sbin/pwunconv'
- '/usr/sbin/grpconv'
- '/usr/sbin/grpunconv'
- '/usr/sbin/newusers'
- '/usr/bin/gpasswd'
- '/usr/bin/chsh'
- '/usr/bin/chfn'
condition: (selection_sensitive_file or selection_sensitive_file_sudoers_d) and not filter_main_legitimate_writer
fields:
- Hostname
- User
- Image
- ParentImage
- CommandLine
- TargetFilename
- CurrentDirectory
falsepositives:
- Distribution or vendor tools not on the allowlist that legitimately manage local accounts (authconfig, realm, sssd tools, cloud-init) - tune per distribution
- Configuration management agents (Ansible, Puppet, Chef, Salt) applying user/group state directly instead of through allowlisted tools - verify the underlying module and add its interpreter/module path if confirmed legitimate
- Package manager post-install scripts (dpkg, rpm) modifying /etc/group during package installation
- Immutable or non-FHS distributions (NixOS, Snap-confined tools, Flatpak) where the legitimate passwd/useradd binary lives at a non-standard absolute path (e.g. /nix/store/<hash>-shadow-<ver>/bin/passwd) - this WILL alert by design since the allowlist uses fixed absolute paths, add the site-specific store paths after verification rather than switching to a name-only match
- Emergency manual edits to a sensitive file by root using a text editor (vi, vim, nano) during incident recovery or misconfiguration repair - intentionally NOT allowlisted, since allowlisting any general-purpose editor would let an attacker use that same editor to defeat this rule entirely; triage these as a manual, expected, low-frequency FP instead
level: critical
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1068
- attack.t1136
- cve.2026-43503