Detection rules › Sigma
Hidden User Creation
Detects creation of a hidden user account on macOS (UserID < 500) or with IsHidden option
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | T1564.002 Hide Artifacts: Hidden Users |
Event coverage
| Provider | Event | Title |
|---|---|---|
| ESF | exec | Process Execution (Notify) |
Rule body yaml
title: Hidden User Creation
id: b22a5b36-2431-493a-8be1-0bae56c28ef3
status: test
description: Detects creation of a hidden user account on macOS (UserID < 500) or with IsHidden option
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.002/T1564.002.md
author: Daniil Yugoslavskiy, oscd.community
date: 2020-10-10
modified: 2021-11-27
tags:
- attack.stealth
- attack.t1564.002
logsource:
category: process_creation
product: macos
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)
falsepositives:
- Legitimate administration activities
level: medium
Stages and Predicates
Stage 0: condition
dscl_create and id_below_500 or dscl_create and (ishidden_option_declaration and ishidden_option_confirmation)Stage 1: dscl_create
dscl_create:
Image|endswith: '/dscl'
CommandLine|contains: 'create'
Stage 2: id_below_500
id_below_500:
CommandLine|contains: UniqueID
CommandLine|re: '([0-9]|[1-9][0-9]|[1-4][0-9]{2})'
Stage 3: dscl_create
dscl_create:
Image|endswith: '/dscl'
CommandLine|contains: 'create'
Stage 4: ishidden_option_declaration
ishidden_option_declaration:
CommandLine|contains: 'IsHidden'
Stage 5: ishidden_option_confirmation
ishidden_option_confirmation:
CommandLine|contains:
- 'true'
- 'yes'
- '1'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|
CommandLine | regex_match |
|
Image | ends_with |
|