Windows HackTool Activity: HiveNightmare-Style SAM File Exports
Identifies Windows SAM export files written with HiveNightmare-style filename patterns in file events.
FreeUnreviewedSigmahighv1
windows-hacktool-activity-hivenightmare-style-sam-file-exports-6ea858a8
title: "Windows HackTool Activity: HiveNightmare-Style SAM File Exports"
id: a33dc8e4-a0e8-4c98-b521-2288eef945e4
status: test
description: This rule flags Windows file creation or writes to SAM-related export paths and filenames associated with HiveNightmare-derived tooling. Attackers can use these exported SAM artifacts for credential access, making the presence of specific HiveNightmare filename patterns a high-signal indicator. It relies on Windows file event telemetry, matching the TargetFilename against HiveNightmare-style substrings and the specific path C:\windows\temp\sam.
references:
- https://github.com/GossiTheDog/HiveNightmare
- https://github.com/FireFart/hivenightmare/
- https://github.com/WiredPulse/Invoke-HiveNightmare
- https://twitter.com/cube0x0/status/1418920190759378944
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_hktl_hivenightmare_file_exports.yml
author: Florian Roth (Nextron Systems), Huntrule Team
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_
- \SAM-2021-
- \SAM-2022-
- \SAM-2023-
- \SAM-haxx
- \Sam.save
- TargetFilename: C:\windows\temp\sam
condition: selection
falsepositives:
- Files that accidentally contain these strings
level: high
license: DRL-1.1
related:
- id: 6ea858a8-ba71-4a12-b2cc-5d83312404c7
type: derived
What it detects
This rule flags Windows file creation or writes to SAM-related export paths and filenames associated with HiveNightmare-derived tooling. Attackers can use these exported SAM artifacts for credential access, making the presence of specific HiveNightmare filename patterns a high-signal indicator. It relies on Windows file event telemetry, matching the TargetFilename against HiveNightmare-style substrings and the specific path C:\windows\temp\sam.
Known false positives
- Files that accidentally contain these strings
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.