Detection rules › Sigma

User Added To Admin Group Via DseditGroup

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/or add an account to the admin group, thus granting admin privileges.

Known false positives

  • Legitimate administration activities

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: User Added To Admin Group Via DseditGroup
id: 5d0fdb62-f225-42fb-8402-3dfe64da468a
status: test
description: Detects attempts to create and/or add an account to the admin group, thus granting admin privileges.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1078.003/T1078.003.md#atomic-test-5---add-a-newexisting-user-to-the-admin-group-using-dseditgroup-utility---macos
    - https://ss64.com/osx/dseditgroup.html
author: Sohan G (D4rkCiph3r)
date: 2023-08-22
tags:
    - attack.persistence
    - attack.initial-access
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1078.003
logsource:
    category: process_creation
    product: macos
detection:
    selection:
        Image|endswith: '/dseditgroup'
        CommandLine|contains|all:
            - ' -o edit ' # edit operation
            - ' -a ' # username
            - ' -t user'
            - 'admin' # Group name
    condition: selection
falsepositives:
    - Legitimate administration activities
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith: '/dseditgroup'
    CommandLine|contains|all:
        - ' -o edit '
        - ' -a '
        - ' -t user'
        - 'admin'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -a
  • -o edit
  • -t user
  • admin
field:"CommandLine" kind:match
Imageends_with
  • /dseditgroup
field:"Image" kind:ends_with value:"/dseditgroup"