Detection rules › Sigma

Local domain group enumeration

Status
experimental
Severity
high
Time window
15m
Log source
product windows, service security
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker attempts to enumerate domain local groups with tools like CME (--local-groups).

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Local domain group enumeration
description: Detects scenarios where an attacker attempts to enumerate domain local groups with tools like CME (--local-groups).
correlation: correlate TargetLogonId from ID 4624 with SubjectLogonId from ID 4661 to identify the source of the enumeration.
requirements: extended rights auditing enabled (https://www.manageengine.com/products/active-directory-audit/active-directory-auditing-configuration-guide-configure-object-level-auditing-manually.html)
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0007-Discovery/T1069-Permission%20Groups%20Discovery
- https://hideandsec.sh/books/cheatsheets/page/crackmapexec
- https://www.infosecmatter.com/crackmapexec-module-library/
- https://docs.microsoft.com/en-us/windows/win32/adschema/extended-rights?redirectedfrom=MSDN
tags:
- attack.discovery
- attack.t1069.001
- attack.t1087.001
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4661
    ProcessName|endswith: '\lsass.exe'
    ObjectServer: 'Security Account Manager'
    ObjectType: SAM_ALIAS
    ObjectName|startswith:
      - S-1-5-32- # refers to builtin domain local groups
      - S-1-5-21- # refers to others domain local groups
  filter:
    SubjectUserName|endswith: '$'
  condition: selection and not filter | count(Computer) by IpAddress > 30
  timeframe: 15m
falsepositives:
- Administrator activity
level: high

Stages and Predicates

Stage 0: condition

selection and not filter | count(Computer) by IpAddress > 30

Stage 1: selection

selection:
  EventID: 4661
  ProcessName|endswith: '\lsass.exe'
  ObjectServer: 'Security Account Manager'
  ObjectType: SAM_ALIAS
  ObjectName|startswith:
    - S-1-5-32-
    - S-1-5-21-
Threshold
> 30

Stage 2: not filter

filter:
  SubjectUserName|endswith: '$'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
SubjectUserNameends_with$

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
ObjectNamestarts_with
  • S-1-5-21- corpus 5 (sigma 5)
  • S-1-5-32- corpus 3 (sigma 3)
ObjectServereq
  • Security Account Manager corpus 7 (sigma 7)
ObjectTypeeq
  • SAM_ALIAS
ProcessNameends_with
  • \lsass.exe corpus 7 (sigma 7)