- Tactic
- Stealth
- Platforms
- Linux, macOS
- Version
- 2.0
- Created
- 27 March 2025
- Last modified
- 12 May 2026
- Contributors
- Sharmine Low, Group-IB; Rouven Bissinger (SySS GmbH); RoseSecurity
Adversaries may abuse extended attributes (xattrs) on macOS and Linux to hide their malicious data in order to evade detection. Extended attributes are key-value pairs of file and directory metadata used by both macOS and Linux. They are not visible through standard tools like Finder, ls, or cat and require utilities such as xattr (macOS) or getfattr (Linux) for inspection. Operating systems and applications use xattrs for tagging, integrity checks, and access control. On Linux, xattrs are organized into namespaces such as user. (user permissions), trusted. (root permissions), security., and system., each with specific permissions. On macOS, xattrs are flat strings without namespace prefixes, commonly prefixed with com.apple.* (e.g., com.apple.quarantine, com.apple.metadata:_kMDItemUserTags) and used by system features like Gatekeeper and Spotlight.[1]
Offense vs defense T1564.014
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.
Extended Attributes detection strategy DET0406
MITRE names one behaviour worth catching for this technique and breaks it into 2 analytics, one per platform. Each carries the log sources it needs and the fields you tune per environment.
Detection Strategy for Extended Attributes Abuse
AN1135 · Linux
Abuse of extended attributes (xattrs) to embed hidden payloads into legitimate files. Defender perspective: detect anomalous use of setfattr or getfattr commands, or direct syscalls (setxattr, getxattr) where attributes are unusually large or contain encoded data. Behavior chain includes: (1) execution of setfattr with suspicious namespaces (user., trusted.), (2) file metadata modification inconsistent with file size/hash, and (3) subsequent process execution reading attributes followed by decoding activity.
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 |
|---|---|---|
| File MetadataDC0059 | auditd:SYSCALL | setxattr or getxattr system call |
| Command ExecutionDC0064 | auditd:EXECVE | execution of setfattr or getfattr commands |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| XattrNamespaces | Namespaces monitored for suspicious activity (user., trusted., security.). Organizations may tune to reduce noise from benign use. |
| PayloadSizeThreshold | Size of xattr values above which they should be considered anomalous (e.g., >1KB). |
| CorrelationWindow | Time window to correlate xattr modification with process execution from the same file. |
AN1136 · macOS
Abuse of extended attributes (xattrs) to hide payloads in com.apple.* or custom keys. Defender perspective: monitor suspicious use of xattr command with -w (write) and -p (print) flags, especially when followed by execution of interpreters like bash, Python, or osascript. Behavior chain includes: (1) suspicious file modification with new com.apple.* attributes, (2) attribute content inconsistent with expected metadata tags (e.g., high entropy), (3) subsequent process execution correlated with extraction of the attribute.
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 |
|---|---|---|
| File MetadataDC0059 | macos:unifiedlog | extended attribute write or modification |
| Command ExecutionDC0064 | macos:unifiedlog | xattr utility execution with -w or -p flags |
Tunable fields
MITRE calls these the analytic’s mutable elements: the thresholds and filters you set for your own environment.
| Field | What you tune |
|---|---|
| WatchedXattrKeys | Specific xattr keys to monitor (e.g., com.apple.quarantine, com.apple.ResourceFork, unknown custom keys). |
| EntropyThreshold | High entropy attribute values may indicate encoded or encrypted payloads. |
| ProcessContext | Expected legitimate applications interacting with xattrs (Finder, Spotlight) to help reduce false positives. |
During artifact review, packaging, or deployment stages, scan extended attributes alongside file contents to detect hidden payloads, obfuscated data, or suspicious attribute keys that may indicate malicious behavior.