macOS Local User Account Creation via dscl or sysadminctl
Flags macOS commands (dscl create or sysadminctl addUser) that add local user accounts for persistence.
- Product
- macos
- Category
- process_creation
- Author
- Alejandro Ortuno, oscd.community (SigmaHQ), DRL 1.1
- Published
- 2020-10-06
- Updated
- 2026-07-31
ATT&CK techniques
PersistenceRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule matches process executions on macOS where dscl is invoked with a create operation or sysadminctl is invoked to add a user. Creating local accounts can provide attacker-controlled persistence without relying on persistent remote access tooling. The detection relies on process creation telemetry, specifically the executable path endings and command-line substrings indicating account creation.
Reporting behind it
- github.comhttps://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1136.001/T1136.001.md
- ss64.comhttps://ss64.com/osx/sysadminctl.html
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_create_account.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: macOS Local User Account Creation via dscl or sysadminctl
id: d32b9986-24dc-4ebc-80e9-d40b7e81e8ab
status: test
description: This rule matches process executions on macOS where dscl is invoked with a create operation or sysadminctl is invoked to add a user. Creating local accounts can provide attacker-controlled persistence without relying on persistent remote access tooling. The detection relies on process creation telemetry, specifically the executable path endings and command-line substrings indicating account creation.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1136.001/T1136.001.md
- https://ss64.com/osx/sysadminctl.html
- https://github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_create_account.yml
author: Alejandro Ortuno, oscd.community, Huntrule Team
date: 2020-10-06
modified: 2023-02-18
tags:
- attack.t1136.001
- attack.persistence
logsource:
category: process_creation
product: macos
detection:
selection_dscl:
Image|endswith: /dscl
CommandLine|contains: create
selection_sysadminctl:
Image|endswith: /sysadminctl
CommandLine|contains: addUser
condition: 1 of selection_*
falsepositives:
- Legitimate administration activities
level: low
license: DRL-1.1
related:
- id: 51719bf5-e4fd-4e44-8ba8-b830e7ac0731
type: derived