Detectionmediumtest
Hidden Flag Set On File/Directory Via Chflags - MacOS
Detects the execution of the "chflags" utility with the "hidden" flag, in order to hide files on MacOS. When a file or directory has this hidden flag set, it becomes invisible to the default file listing commands and in graphical file browsers.
Log Source
macOSProcess Creation
ProductmacOS← raw: macos
CategoryProcess Creation← raw: process_creation
Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.
Detection Logic
Detection Logic1 selector
detection:
selection:
Image|endswith: '/chflags'
CommandLine|contains: 'hidden '
condition: selectionFalse Positives
Legitimate usage of chflags by administrators and users.
MITRE ATT&CK
Rule Metadata
Rule ID
3b2c1059-ae5f-40b6-b5d4-6106d3ac20fe
Status
test
Level
medium
Type
Detection
Created
2024-08-21
Author
Path
rules/macos/process_creation/proc_creation_macos_chflags_hidden_flag.yml
Raw Tags
attack.credential-accessattack.command-and-controlattack.stealthattack.t1218attack.t1564.004attack.t1552.001attack.t1105