Detection rules › Sigma

Potentially Suspicious Image Load of Offreg.dll

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

Detects potentially suspicious loading of the Offline Registry Library (offreg.dll). Offreg.dll enables direct read/write access to offline registry hives without invoking the Windows Registry API, bypassing its associated audit logging and telemetry. Attackers may abuse this to stealthily modify registry hives while evading detection mechanisms that rely on standard registry event logs.

Known false positives

  • Third-party backup or forensic software that performs offline registry parsing
  • Windows deployment tools (DISM, ADK) run from non-standard paths

MITRE ATT&CK coverage

TacticTechniques
Persistence
Defense Impairment

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 7: Image loaded

Rule body

title: Potentially Suspicious Image Load of Offreg.dll
id: c9e5f013-4a6f-4d8c-9b0e-f7a4c3d26e95
status: experimental
description: |
    Detects potentially suspicious loading of the Offline Registry Library (offreg.dll).
    Offreg.dll enables direct read/write access to offline registry hives without invoking the Windows Registry API,
    bypassing its associated audit logging and telemetry. Attackers may abuse this to stealthily modify registry hives
    while evading detection mechanisms that rely on standard registry event logs.
references:
    - https://learn.microsoft.com/en-us/windows/win32/devnotes/about-the-offline-registry-library
    - https://github.com/MSNightmare/LegacyHive
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2026-07-23
tags:
    - attack.defense-impairment
    - attack.persistence
    - attack.t1112
logsource:
    category: image_load
    product: windows
detection:
    selection:
        ImageLoaded|endswith: '\offreg.dll'
    filter_main_system32:
        Image|startswith:
            - 'C:\Windows\System32\'
            - 'C:\Windows\SysWOW64\'
            - 'C:\Windows\WinSxS\'
    filter_main_program_files:
        Image|startswith:
            - 'C:\Program Files\'
            - 'C:\Program Files (x86)\'
    filter_main_appdata_local_programs:
        Image|startswith: 'C:\Users\'
        Image|contains: '\AppData\Local\Programs\'
    filter_main_defender:
        Image|startswith: 'C:\ProgramData\Microsoft\Windows Defender\Platform\'
        Image|endswith: '\MsMpEng.exe'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Third-party backup or forensic software that performs offline registry parsing
    - Windows deployment tools (DISM, ADK) run from non-standard paths
level: medium
regression_tests_path: regression_data/rules/windows/image_load/image_load_susp_offreg_dll_load/info.yml

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    ImageLoaded|endswith: '\offreg.dll'

Stage 2: not filter_main_*

filter_main_system32:
    Image|startswith:
        - 'C:\Windows\System32\'
        - 'C:\Windows\SysWOW64\'
        - 'C:\Windows\WinSxS\'
filter_main_program_files:
    Image|startswith:
        - 'C:\Program Files\'
        - 'C:\Program Files (x86)\'
filter_main_appdata_local_programs:
    Image|startswith: 'C:\Users\'
    Image|contains: '\AppData\Local\Programs\'
filter_main_defender:
    Image|startswith: 'C:\ProgramData\Microsoft\Windows Defender\Platform\'
    Image|endswith: '\MsMpEng.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imageends_with\MsMpEng.exeexcludes:Image field:"Image" value:"\MsMpEng.exe"
Imagestarts_withC:\ProgramData\Microsoft\Windows Defender\Platform\excludes:Image field:"Image" value:"C:\ProgramData\Microsoft\Windows Defender\Platform\"
Imagematch\AppData\Local\Programs\excludes:Image field:"Image" value:"\AppData\Local\Programs\"
Imagestarts_withC:\Users\excludes:Image field:"Image" value:"C:\Users\"
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\"
Imagestarts_withC:\Windows\WinSxS\excludes:Image field:"Image" value:"C:\Windows\WinSxS\"

Indicators

These rows show field, operator, and value matches.