Detection rules › Sigma

PowerShell SAM Copy

Severity
high
Author
Florian Roth (Nextron Systems)
Source
upstream

Detects suspicious PowerShell scripts accessing SAM hives

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1003.002 OS Credential Dumping: Security Account Manager

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.

Stages and Predicates

Stage 1: all of selection_1

CommandLine|contains: 'System32\config\sam'
CommandLine|contains: '\HarddiskVolumeShadowCopy'

Stage 2: all of selection_2

or:
CommandLine|contains: '.File]::Copy('
CommandLine|contains: Copy-Item
CommandLine|contains: 'copy $_.'
CommandLine|contains: 'cp $_.'
CommandLine|contains: 'cpi $_.'

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
  • .File]::Copy(
  • Copy-Item
  • System32\config\sam
  • \HarddiskVolumeShadowCopy
  • copy $_.
  • cp $_.
  • cpi $_.