Detection rules › Sigma

Potential SAM Database Dump

Status
test
Severity
high
Log source
product windows, category file_event
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the creation of files that look like exports of the local SAM (Security Account Manager)

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: Potential SAM Database Dump
id: 4e87b8e2-2ee9-4b2a-a715-4727d297ece0
status: test
description: Detects the creation of files that look like exports of the local SAM (Security Account Manager)
references:
    - https://github.com/search?q=CVE-2021-36934
    - https://web.archive.org/web/20210725081645/https://github.com/cube0x0/CVE-2021-36934
    - https://www.google.com/search?q=%22reg.exe+save%22+sam
    - https://github.com/HuskyHacks/ShadowSteal
    - https://github.com/FireFart/hivenightmare
author: Florian Roth (Nextron Systems)
date: 2022-02-11
modified: 2023-01-05
tags:
    - attack.credential-access
    - attack.t1003.002
logsource:
    product: windows
    category: file_event
detection:
    selection:
        - TargetFilename|endswith:
              - '\Temp\sam'
              - '\sam.sav'
              - '\Intel\sam'
              - '\sam.hive'
              - '\Perflogs\sam'
              - '\ProgramData\sam'
              - '\Users\Public\sam'
              - '\AppData\Local\sam'
              - '\AppData\Roaming\sam'
              - '_ShadowSteal.zip'       # https://github.com/HuskyHacks/ShadowSteal
              - '\Documents\SAM.export'  # https://github.com/n3tsurge/CVE-2021-36934/
              - ':\sam'
        - TargetFilename|contains:
              - '\hive_sam_'             # https://github.com/FireFart/hivenightmare
              - '\sam.save'
              - '\sam.export'
              - '\~reg_sam.save'
              - '\sam_backup'
              - '\sam.bck'
              - '\sam.backup'
    condition: selection
falsepositives:
    - Rare cases of administrative activity
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    - TargetFilename|endswith:
          - '\Temp\sam'
          - '\sam.sav'
          - '\Intel\sam'
          - '\sam.hive'
          - '\Perflogs\sam'
          - '\ProgramData\sam'
          - '\Users\Public\sam'
          - '\AppData\Local\sam'
          - '\AppData\Roaming\sam'
          - '_ShadowSteal.zip'
          - '\Documents\SAM.export'
          - ':\sam'
    - TargetFilename|contains:
          - '\hive_sam_'
          - '\sam.save'
          - '\sam.export'
          - '\~reg_sam.save'
          - '\sam_backup'
          - '\sam.bck'
          - '\sam.backup'

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
TargetFilenameends_with
  • :\sam
  • \AppData\Local\sam
  • \AppData\Roaming\sam
  • \Documents\SAM.export
  • \Intel\sam
  • \Perflogs\sam
  • \ProgramData\sam
  • \Temp\sam
  • \Users\Public\sam
  • \sam.hive
  • \sam.sav
  • _ShadowSteal.zip
TargetFilenamematch
  • \hive_sam_ corpus 2 (sigma 2)
  • \sam.backup
  • \sam.bck
  • \sam.export
  • \sam.save corpus 2 (sigma 2)
  • \sam_backup
  • \~reg_sam.save