← Back to SOC feed Coverage →

DLL Search Order Hijackig Via Additional Space in Path

sigma HIGH SigmaHQ
T1574.001
imFileEvent
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-03-25T03:05:59Z · Confidence: medium

Hunt Hypothesis

Attackers may exploit DLL search order hijacking by creating folders with additional spaces in the path to mimic legitimate system directories and load malicious DLLs. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential lateral movement and code execution attempts leveraging Windows’ DLL resolution mechanism.

Detection Rule

Sigma (Original)

title: DLL Search Order Hijackig Via Additional Space in Path
id: b6f91281-20aa-446a-b986-38a92813a18f
status: test
description: |
    Detects when an attacker create a similar folder structure to windows system folders such as (Windows, Program Files...)
    but with a space in order to trick DLL load search order and perform a "DLL Search Order Hijacking" attack
references:
    - https://twitter.com/cyb3rops/status/1552932770464292864
    - https://www.wietzebeukema.nl/blog/hijacking-dlls-in-windows
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2022-07-30
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.defense-evasion
    - attack.t1574.001
logsource:
    category: file_event
    product: windows
detection:
    selection:
        TargetFilename|startswith:
            - 'C:\Windows \'
            - 'C:\Program Files \'
            - 'C:\Program Files (x86) \'
        TargetFilename|endswith: '.dll'
    condition: selection
falsepositives:
    - Unknown
level: high

KQL (Azure Sentinel)

imFileEvent
| where (TargetFileName startswith "C:\\Windows \\" or TargetFileName startswith "C:\\Program Files \\" or TargetFileName startswith "C:\\Program Files (x86) \\") and TargetFileName endswith ".dll"

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_dll_sideloading_space_path.yml