Detection rules › Sigma

Access To .Reg/.Hive Files By Uncommon Applications

Status
test
Severity
low
Log source
category file_access, product windows
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects file access requests to files ending with either the ".hive"/".reg" extension, usually associated with Windows Registry backups.

Known false positives

  • Third party software installed in the user context might generate a lot of FPs. Heavy baselining and tuning might be required.

MITRE ATT&CK coverage

TacticTechniques
Persistence
Defense Impairment

Rule body

title: Access To .Reg/.Hive Files By Uncommon Applications
id: 337a31c6-46c4-46be-886a-260d7aa78cac
status: test
description: Detects file access requests to files ending with either the ".hive"/".reg" extension, usually associated with Windows Registry backups.
references:
    - https://github.com/tccontre/Reg-Restore-Persistence-Mole
author: frack113
date: 2023-09-15
modified: 2024-07-29
tags:
    - attack.defense-impairment
    - attack.t1112
    - attack.persistence
    - detection.threat-hunting
logsource:
    category: file_access
    product: windows
    definition: 'Requirements: Microsoft-Windows-Kernel-File ETW provider'
detection:
    selection:
        FileName|endswith:
            - '.hive'
            - '.reg'
    filter_main_generic:
        Image|startswith:
            - 'C:\Program Files (x86)\'
            - 'C:\Program Files\'
            - 'C:\Windows\System32\'
            - 'C:\Windows\SysWOW64\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Third party software installed in the user context might generate a lot of FPs. Heavy baselining and tuning might be required.
level: low

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    FileName|endswith:
        - '.hive'
        - '.reg'

Stage 2: not filter_main_generic

filter_main_generic:
    Image|startswith:
        - 'C:\Program Files (x86)\'
        - 'C:\Program Files\'
        - 'C:\Windows\System32\'
        - 'C:\Windows\SysWOW64\'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imagestarts_withC:\Program Files (x86)\excludes:Image field:"Image" value:"C:\Program Files (x86)\"
Imagestarts_withC:\Program Files\excludes:Image field:"Image" value:"C:\Program Files\"
Imagestarts_withC:\Windows\SysWOW64\excludes:Image field:"Image" value:"C:\Windows\SysWOW64\"
Imagestarts_withC:\Windows\System32\excludes:Image field:"Image" value:"C:\Windows\System32\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
FileNameends_with
  • .hive
  • .reg
field:"file_name" kind:ends_with