← Back to SOC feed Coverage →

HackTool - Typical HiveNightmare SAM File Export

sigma HIGH SigmaHQ
T1552.001
imFileEvent
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-03-25T03:05:59Z · Confidence: medium

Hunt Hypothesis

Adversaries may be exfiltrating SAM file data to extract local account credentials using HiveNightmare exploitation techniques. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential credential theft and limit lateral movement in their environment.

Detection Rule

Sigma (Original)

title: HackTool - Typical HiveNightmare SAM File Export
id: 6ea858a8-ba71-4a12-b2cc-5d83312404c7
status: test
description: Detects files written by the different tools that exploit HiveNightmare
references:
    - https://github.com/GossiTheDog/HiveNightmare
    - https://github.com/FireFart/hivenightmare/
    - https://github.com/WiredPulse/Invoke-HiveNightmare
    - https://twitter.com/cube0x0/status/1418920190759378944
author: Florian Roth (Nextron Systems)
date: 2021-07-23
modified: 2024-06-27
tags:
    - attack.credential-access
    - attack.t1552.001
    - cve.2021-36934
logsource:
    product: windows
    category: file_event
detection:
    selection:
        - TargetFilename|contains:
              - '\hive_sam_'  # Go version
              - '\SAM-2021-'  # C++ version
              - '\SAM-2022-'  # C++ version
              - '\SAM-2023-'  # C++ version
              - '\SAM-haxx'   # Early C++ versions
              - '\Sam.save'   # PowerShell version
        - TargetFilename: 'C:\windows\temp\sam'  # C# version of HiveNightmare
    condition: selection
falsepositives:
    - Files that accidentally contain these strings
level: high

KQL (Azure Sentinel)

imFileEvent
| where (TargetFileName contains "\\hive_sam_" or TargetFileName contains "\\SAM-2021-" or TargetFileName contains "\\SAM-2022-" or TargetFileName contains "\\SAM-2023-" or TargetFileName contains "\\SAM-haxx" or TargetFileName contains "\\Sam.save") or TargetFileName =~ "C:\\windows\\temp\\sam"

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_hktl_hivenightmare_file_exports.yml