Has used udev for persistence.1
- Tactics
- Persistence, Privilege Escalation
- Platform
- Linux
- Version
- 1.0
- Created
- 26 September 2024
- Last modified
- 24 October 2025
- Contributors
- Eduardo González Hernández (@codexlynx); Eder Pérez Ignacio, @ch4ik0; Wirapong Petshagun; @grahamhelton3; Ruben Groenewoud (@RFGroenewoud)
Adversaries may maintain persistence through executing malicious content triggered using udev rules. Udev is the Linux kernel device manager that dynamically manages device nodes, handles access to pseudo-device files in the /dev directory, and responds to hardware events, such as when external devices like hard drives or keyboards are plugged in or removed. Udev uses rule files with match keys to specify the conditions a hardware event must meet and action keys to define the actions that should follow. Root permissions are required to create, modify, or delete rule files located in /etc/udev/rules.d/, /run/udev/rules.d/, /usr/lib/udev/rules.d/, /usr/local/lib/udev/rules.d/, and /lib/udev/rules.d/. Rule priority is determined by both directory and by the digit prefix in the rule filename.[1][2]
Udev Rules MITRE reference T1546.017
1 software entry is documented implementing this technique. MITRE files each as a tool or as malware; newest first, then by how many groups carry them.
All 1 software entries for this technique
Offense vs defense T1546.017
Is defensive coverage keeping up with adversary use? Eight counts, each ranked against all 697 ATT&CK techniques. Attack sits left, defense right, so a shape leaning left means adversaries are better documented here than defenders are equipped. Hover any spoke for its percentile and the share of techniques that have more. The timeline below shows when each side arrived.
Udev Rules detection strategy DET0375
MITRE names one behaviour worth catching for this technique and breaks it into 1 analytic, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detection Strategy for T1546.017 - Udev Rules (Linux)
AN1056 · Linux
Monitor for creation or modification of udev rules files in key directories (/etc/udev/rules.d/, /lib/udev/rules.d/, /usr/lib/udev/rules.d/). Look for RUN+= or IMPORT keys invoking suspicious binaries or scripts. Correlate this with process execution from systemd-udevd context, and file writes near udev reload/restart events. Combine this with unexpected background process spawning from udevd-related forks.
Log sources
The data this analytic draws on. You do not need every component — each one you already collect covers part of it. Each links to its ATT&CK record.
| Data component | Name | Channel |
|---|---|---|
| Process CreationDC0032 | auditd:SYSCALL | execve |
| File ModificationDC0061 | auditd:SYSCALL | chmod, write, create, open |
| Command ExecutionDC0064 | auditd:CONFIG_CHANGE | udev rule reload or trigger command executed |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| UdevRulePath | Path to udev rules (may vary by distro or user configuration) |
| SuspiciousRunPattern | Regex or string pattern to flag suspicious command executions in RUN+= |
| TimeWindow | Max interval between rule change and execution to correlate activity |
| ParentProcess | Expected parent of RUN-invoked commands (e.g., systemd-udevd) |