Detection rules › Sigma

User Added To Admin Group Via Sysadminctl

Status
test
Severity
medium
Log source
category process_creation, product macos
Author
Sohan G (D4rkCiph3r)
Source
github.com/SigmaHQ/sigma

Detects attempts to create and add an account to the admin group via "sysadminctl"

Known false positives

  • Legitimate administration activities

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: User Added To Admin Group Via Sysadminctl
id: 652c098d-dc11-4ba6-8566-c20e89042f2b
related:
    - id: 0c1ffcf9-efa9-436e-ab68-23a9496ebf5b
      type: obsolete
status: test
description: Detects attempts to create and add an account to the admin group via "sysadminctl"
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1078.003/T1078.003.md#atomic-test-3---create-local-account-with-admin-privileges-using-sysadminctl-utility---macos
    - https://ss64.com/osx/sysadminctl.html
author: Sohan G (D4rkCiph3r)
date: 2023-03-19
tags:
    - attack.persistence
    - attack.initial-access
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1078.003
logsource:
    category: process_creation
    product: macos
detection:
    selection:
        # Creates and adds new user to admin group
        Image|endswith: '/sysadminctl'
        CommandLine|contains|all:
            - ' -addUser '
            - ' -admin '
    condition: selection
falsepositives:
    - Legitimate administration activities
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith: '/sysadminctl'
    CommandLine|contains|all:
        - ' -addUser '
        - ' -admin '

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -addUser
  • -admin
field:"CommandLine" kind:match
Imageends_with
  • /sysadminctl
field:"Image" kind:ends_with value:"/sysadminctl"