Hidden User Creation
A Sigma rule for process creation on macOS, by Daniil Yugoslavskiy, oscd.community.
medium 1 ATT&CK technique
What it looks for
detection:
dscl_create:
CommandLine|contains: 'create'
Image|endswith: '/dscl'
id_below_500:
CommandLine|contains: 'UniqueID'
CommandLine|re: '([0-9]|[1-9][0-9]|[1-4][0-9]{2})'
ishidden_option_confirmation:
CommandLine|contains:
- 'true'
- 'yes'
- '1'
ishidden_option_declaration:
CommandLine|contains: 'IsHidden'
condition: dscl_create and id_below_500 or dscl_create and (ishidden_option_declaration and ishidden_option_confirmation)
The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by Daniil Yugoslavskiy, oscd.community, under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.
None of the everyday examples and documented commands on CmdID’s program pages trips it. To see whether a command line does, paste it into CmdID.
ATT&CK
T1564.002Hide Artifacts: Hidden Users