Detection rules › Sigma

Registry Hive File Staged Outside Standard User Profile Path

Status
experimental
Severity
high
Log source
category file_event, product windows
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the creation of a registry hive file (UsrClass.dat or NTUSER.DAT) outside of the standard user profile path. These files generally contain various user-specific registry settings and are typically located in the user's profile directory. Staging these files outside of the standard path can be indicative of an attacker attempting to manipulate user registry settings for persistence, privilege escalation, or dump user registry hives for credential harvesting.

Known false positives

  • Backup or profile migration software
  • Forensic acquisition tools

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation
Credential Access

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 11: FileCreate

Rule body

title: Registry Hive File Staged Outside Standard User Profile Path
id: a7f3c891-2e4d-4b6a-9f8c-d5e2a1b04c73
status: experimental
description: |
    Detects the creation of a registry hive file (UsrClass.dat or NTUSER.DAT) outside of the standard user profile path.
    These files generally contain various user-specific registry settings and are typically located in the user's profile directory.
    Staging these files outside of the standard path can be indicative of an attacker attempting to manipulate user registry settings
    for persistence, privilege escalation, or dump user registry hives for credential harvesting.
references:
    - https://github.com/MSNightmare/LegacyHive
    - https://git.projectnightcrawler.dev/NightmareEclipse/LegacyHive
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2026-07-23
tags:
    - attack.privilege-escalation
    - attack.t1548
    - attack.credential-access
    - attack.t1003
logsource:
    category: file_event
    product: windows
detection:
    selection:
        TargetFilename|endswith:
            - '\UsrClass.dat'
            - '\NTUSER.DAT'
    filter_main_usrclass:
        TargetFilename|endswith: '\AppData\Local\Microsoft\Windows\UsrClass.dat'
    filter_main_ntuser:
        TargetFilename|re|i: '^C:\\Users\\[^\\]+\\NTUSER\.DAT$'
    filter_main_system:
        TargetFilename|startswith:
            - 'C:\Windows\System32\config\'
            - 'C:\Windows\SYSVOL\'
            - 'C:\Windows\ServiceProfiles\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Backup or profile migration software
    - Forensic acquisition tools
level: high
regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_susp_registry_hive_file_creation/info.yml

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    TargetFilename|endswith:
        - '\UsrClass.dat'
        - '\NTUSER.DAT'

Stage 2: not filter_main_*

filter_main_usrclass:
    TargetFilename|endswith: '\AppData\Local\Microsoft\Windows\UsrClass.dat'
filter_main_ntuser:
    TargetFilename|re|i: '^C:\\Users\\[^\\]+\\NTUSER\.DAT$'
filter_main_system:
    TargetFilename|startswith:
        - 'C:\Windows\System32\config\'
        - 'C:\Windows\SYSVOL\'
        - 'C:\Windows\ServiceProfiles\'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
TargetFilenameends_with\AppData\Local\Microsoft\Windows\UsrClass.datexcludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\Microsoft\Windows\UsrClass.dat"
TargetFilenameregex_match(?i)^C:\Users\[^\]+\NTUSER.DAT$excludes:TargetFilename field:"TargetFilename" value:"(?i)^C:\Users\[^\]+\NTUSER.DAT$"
TargetFilenamestarts_withC:\Windows\SYSVOL\excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\SYSVOL\"
TargetFilenamestarts_withC:\Windows\ServiceProfiles\excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\ServiceProfiles\"
TargetFilenamestarts_withC:\Windows\System32\config\excludes:TargetFilename field:"TargetFilename" value:"C:\Windows\System32\config\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
TargetFilenameends_with
  • \NTUSER.DAT
  • \UsrClass.dat
field:"TargetFilename" kind:ends_with