Detectionhightest

HackTool - Typical HiveNightmare SAM File Export

Detects files written by the different tools that exploit HiveNightmare

Open in Detection LabConvert ruleBuild Package
Florian Roth (Nextron Systems)Created 2021-07-23Updated 2024-06-276ea858a8-ba71-4a12-b2cc-5d83312404c7windows
Log Source
WindowsFile Event
ProductWindows← raw: windows
CategoryFile Event← raw: file_event

Events for file system activity including creation, modification, and deletion.

Detection Logic
Detection Logic1 selector
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
False Positives

Files that accidentally contain these strings

MITRE ATT&CK

Other

cve.2021-36934
Rule Metadata
Rule ID
6ea858a8-ba71-4a12-b2cc-5d83312404c7
Status
test
Level
high
Type
Detection
Created
2021-07-23
Modified
2024-06-27
Path
rules/windows/file/file_event/file_event_win_hktl_hivenightmare_file_exports.yml
Raw Tags
attack.credential-accessattack.t1552.001cve.2021-36934
View on GitHub