← Back to SOC feed Coverage →

PowerShell SAM Copy

sigma HIGH SigmaHQ
T1003.002
imProcessCreate
powershell
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-05-13T11:00:00Z · Confidence: medium

Hunt Hypothesis

Detects suspicious PowerShell scripts accessing SAM hives

Detection Rule

Sigma (Original)

title: PowerShell SAM Copy
id: 1af57a4b-460a-4738-9034-db68b880c665
status: test
description: Detects suspicious PowerShell scripts accessing SAM hives
references:
    - https://twitter.com/splinter_code/status/1420546784250769408
author: Florian Roth (Nextron Systems)
date: 2021-07-29
modified: 2023-01-06
tags:
    - attack.credential-access
    - attack.t1003.002
logsource:
    category: process_creation
    product: windows
detection:
    selection_1:
        CommandLine|contains|all:
            - '\HarddiskVolumeShadowCopy'
            - 'System32\config\sam'
    selection_2:
        CommandLine|contains:
            - 'Copy-Item'
            - 'cp $_.'
            - 'cpi $_.'
            - 'copy $_.'
            - '.File]::Copy('
    condition: all of selection*
falsepositives:
    - Some rare backup scenarios
    - PowerShell scripts fixing HiveNightmare / SeriousSAM ACLs
level: high

KQL (Azure Sentinel)

imProcessCreate
| where (TargetProcessCommandLine contains "\\HarddiskVolumeShadowCopy" and TargetProcessCommandLine contains "System32\\config\\sam") and (TargetProcessCommandLine contains "Copy-Item" or TargetProcessCommandLine contains "cp $_." or TargetProcessCommandLine contains "cpi $_." or TargetProcessCommandLine contains "copy $_." or TargetProcessCommandLine contains ".File]::Copy(")

Required Data Sources

Sentinel TableNotes
imProcessCreateEnsure this data connector is enabled

False Positive Guidance

MITRE ATT&CK Context

References

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_sam_access.yml