Detection rules › Sigma

Local group membership change

Status
experimental
Severity
high
Log source
product windows, category ['ps_module', 'ps_classic_script', 'ps_script']
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects if a member is added to a local group via PowerShell.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1098 Account Manipulation

Event coverage

Rule body yaml

title: Local group membership change
description: Detects if a member is added to a local group via PowerShell.
references:
- 
tags:
- attack.persistence
- attack.t1098 # account manipulation
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category:
    - ps_module
    - ps_classic_script
    - ps_script
detection: # Add-LocalGroupMember -Group "Administrators" -Member "Admin02",
  selection1_powershell_native:
    EventID: 800
    EventData|contains|all:
      - 'Add-LocalGroupMember'
      - '-Group'
      - '-Member'

  selection2_powershell_modern:
    EventID: 4103
      - 'Add-LocalGroupMember'
      - '-Group'
      - '-Member'
  
  selection3_powershell_block:
    EventID: 4104
    ScriptBlockText|contains|all:
      - 'Add-LocalGroupMember'
      - '-Group'
      - '-Member'

  condition: 1 of selection*
falsepositives:
- Pentest
- Administrator activity
- Splunk UF agent installation
level: high

Stages and Predicates

Stage 0: condition

1 of selection*

Stage 1: selection1_powershell_native

selection1_powershell_native:
  EventID: 800
  EventData|contains|all:
    - 'Add-LocalGroupMember'
    - '-Group'
    - '-Member'

Stage 2: selection2_powershell_modern

selection2_powershell_modern:
  EventID: 4103
    - 'Add-LocalGroupMember'
    - '-Group'
    - '-Member'

Stage 3: selection3_powershell_block

selection3_powershell_block:
  EventID: 4104
  ScriptBlockText|contains|all:
    - 'Add-LocalGroupMember'
    - '-Group'
    - '-Member'

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
EventDatamatch
  • -Group
  • -Member
  • Add-LocalGroupMember
ScriptBlockTextmatch
  • -Group
  • -Member
  • Add-LocalGroupMember