Detection rules › Sigma

User added to a group via commandline

Severity
high
Log source
category process_creation, product windows
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker attempts to escalate privilege by adding a user to a group via commandline.

Known false positives

  • Pentest
  • Administrator activity
  • Splunk UF agent installation

MITRE ATT&CK coverage

TacticTechniques
Persistence

Telemetry coverage

Rule body

title: User added to a group via commandline
description: Detects scenarios where an attacker attempts to escalate privilege by adding a user to a group via commandline.
references:
- https://blogs.jpcert.or.jp/en/2016/01/windows-commands-abused-by-attackers.html
- https://attack.mitre.org/software/S0039/
tags:
- attack.persistence
- attack.t1098 # account manipulation
author: mdecrevoisier
logsource:
  product: windows
  category: process_creation
detection:
  selection: # Full command example: 'net localgroup "Remote Desktop Users" /Add DefaultAccount'
    NewProcessName|endswith:
      - \net1.exe
      - \net.exe
    CommandLine|contains:
      - group
      - localgroup
    CommandLine|contains: add
  condition: selection
falsepositives:
- Pentest
- Administrator activity
- Splunk UF agent installation
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
  NewProcessName|endswith:
    - \net1.exe
    - \net.exe
  CommandLine|contains:
    - group
    - localgroup
  CommandLine|contains: add

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • add corpus 34 (sigma 26, splunk 4, chronicle 2, kusto 2)
field:"CommandLine" kind:match value:"add"
NewProcessNameends_with
  • \net.exe corpus 49 (sigma 49)
  • \net1.exe corpus 47 (sigma 47)
field:"Image" kind:ends_with