macOS Local User Account Creation via dscl or sysadminctl

Flags macOS commands (dscl create or sysadminctl addUser) that add local user accounts for persistence.

FreeReviewedSigma · Low · v2
Product
macos
Category
process_creation
Author
Alejandro Ortuno, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-06
Updated
2026-07-31
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