kevmap

TechniquesT1222.002 › AN0999

AN0999 Analytic 0999

macOS · attack.mitre.org · ATT&CK Enterprise v19.2

<p>macOS permission and attribute manipulation behavioral chain: (1) Process execution of permission utilities (chmod, chown, chgrp) or macOS-specific tools (chflags) with suspicious parameters, (2) System Integrity Protection (SIP) bypass attempts through permission modifications, (3) File flags manipulation (uchg, schg, hidden) for evasion or persistence, (4) Extended attribute (xattr) modifications affecting security metadata, (5) Unified log correlation with file system events and subsequent access patterns, (6) Gatekeeper and code signing bypass through permission/attribute manipulation</p>
Detects
T1222.002 Linux and Mac Permissions
Part of
DET0351 Unix-like File Permission Manipulation Behavioral Chain Detection Strategy

Log sources and channels

Exactly as MITRE states them in x_mitre_log_source_references. Where a channel is vague, it is vague in the source; kevmap does not tidy it.

Log sourceChannelData component
macos:unifiedlogprocess execution events for chmod, chown, chflags with parameter analysis and target path examinationDC0032 Process Creation
fs:fseventsfile system events indicating permission, ownership, or extended attribute changes on critical paths. File system modification events with kFSEventStreamEventFlagItemChangeOwner, kFSEventStreamEventFlagItemXattrMod flagsDC0061 File Modification
OpenBSM:AuditTrailBSM audit events for file permission, ownership, and attribute modifications with user contextDC0059 File Metadata

Mutable elements

Parameters MITRE marks as environment-specific. These are the knobs you are expected to tune; they are why an analytic is not a rule.

FieldDescription
SIPProtectedPathsmacOS system paths protected by SIP that should never have permission modifications - maintain current list based on macOS version (/System, /usr, /bin, /sbin)
SuspiciousFileFlagschflags parameter combinations indicating potential evasive behavior - customize based on security requirements (uchg, schg, hidden, archived)
CriticalExtendedAttributesExtended attributes requiring monitoring for unauthorized removal or modification (com.apple.quarantine, com.apple.metadata, com.apple.FinderInfo)
GatekeeperBypassIndicatorsPatterns in permission/attribute changes that may indicate Gatekeeper bypass attempts
ApplicationBundleMonitoringScope of .app directory monitoring for internal permission modifications indicating bundle tampering
UnifiedLogRetentionPeriodLog retention period for correlating permission changes with subsequent access patterns - balance storage with detection capability
FSEventsFilteringThresholdFile system event filtering threshold to manage high-volume environments while maintaining detection coverage