Detectionmediumtest

Hidden User Creation

Detects creation of a hidden user account on macOS (UserID < 500) or with IsHidden option

Open in Detection LabConvert ruleBuild Package
Daniil Yugoslavskiy, oscd.communityCreated 2020-10-10Updated 2021-11-27b22a5b36-2431-493a-8be1-0bae56c28ef3macos
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 Logic4 selectors
detection:
    dscl_create:
        Image|endswith: '/dscl'
        CommandLine|contains: 'create'
    id_below_500:
        CommandLine|contains: UniqueID
        CommandLine|re: '([0-9]|[1-9][0-9]|[1-4][0-9]{2})'
    ishidden_option_declaration:
        CommandLine|contains: 'IsHidden'
    ishidden_option_confirmation:
        CommandLine|contains:
            - 'true'
            - 'yes'
            - '1'
    condition: dscl_create and id_below_500 or dscl_create and (ishidden_option_declaration and ishidden_option_confirmation)
False Positives

Legitimate administration activities

MITRE ATT&CK
Rule Metadata
Rule ID
b22a5b36-2431-493a-8be1-0bae56c28ef3
Status
test
Level
medium
Type
Detection
Created
2020-10-10
Modified
2021-11-27
Path
rules/macos/process_creation/proc_creation_macos_create_hidden_account.yml
Raw Tags
attack.stealthattack.t1564.002
View on GitHub