Detection rules › Sigma

Local System Accounts Discovery - MacOs

Status
test
Severity
low
Log source
product macos, category process_creation
Author
Alejandro Ortuno, oscd.community
Source
github.com/SigmaHQ/sigma

Detects enumeration of local systeam accounts on MacOS

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
ESFexecProcess Execution (Notify)

Rule body yaml

title: Local System Accounts Discovery - MacOs
id: ddf36b67-e872-4507-ab2e-46bda21b842c
status: test
description: Detects enumeration of local systeam accounts on MacOS
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1087.001/T1087.001.md
author: Alejandro Ortuno, oscd.community
date: 2020-10-08
modified: 2022-11-27
tags:
    - attack.discovery
    - attack.t1087.001
logsource:
    category: process_creation
    product: macos
detection:
    selection_1:
        Image|endswith: '/dscl'
        CommandLine|contains|all:
            - 'list'
            - '/users'
    selection_2:
        Image|endswith: '/dscacheutil'
        CommandLine|contains|all:
            - '-q'
            - 'user'
    selection_3:
        CommandLine|contains: '''x:0:'''
    selection_4:
        Image|endswith: '/cat'
        CommandLine|contains:
            - '/etc/passwd'
            - '/etc/sudoers'
    selection_5:
        Image|endswith: '/id'
    selection_6:
        Image|endswith: '/lsof'
        CommandLine|contains: '-u'
    condition: 1 of selection*
falsepositives:
    - Legitimate administration activities
level: low

Stages and Predicates

Stage 0: condition

1 of selection*

Stage 1: selection_1

selection_1:
    Image|endswith: '/dscl'
    CommandLine|contains|all:
        - 'list'
        - '/users'

Stage 2: selection_2

selection_2:
    Image|endswith: '/dscacheutil'
    CommandLine|contains|all:
        - '-q'
        - 'user'

Stage 3: selection_3

selection_3:
    CommandLine|contains: '''x:0:'''

Stage 4: selection_4

selection_4:
    Image|endswith: '/cat'
    CommandLine|contains:
        - '/etc/passwd'
        - '/etc/sudoers'

Stage 5: selection_5

selection_5:
    Image|endswith: '/id'

Stage 6: selection_6

selection_6:
    Image|endswith: '/lsof'
    CommandLine|contains: '-u'

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.

FieldKindValues
CommandLinematch
  • 'x:0:'
  • -q
  • -u
  • /etc/passwd
  • /etc/sudoers
  • /users
  • list
  • user
Imageends_with
  • /cat
  • /dscacheutil
  • /dscl
  • /id
  • /lsof