Windows DLL Search Order Hijack via Space in System Directory Paths
Alerts on .dll events targeting Windows system paths with an extra space, indicative of DLL search order hijacking.
- Product
- windows
- Category
- file_event
- Author
- frack113, Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2022-07-30
- Updated
- 2026-07-31
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies Windows file events where a target DLL filename ends with .dll and starts with a system-like directory path containing an extra space (e.g., C:\Windows , C:\Program Files , or C:\Program Files (x86) ). Attackers can use this technique to influence DLL search order by placing a malicious DLL in a deceptively named folder that resembles legitimate Windows directories. Telemetry relies on file event data with the full TargetFilename value, including both the directory prefix and the DLL extension.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows DLL Search Order Hijack via Space in System Directory Paths
id: 4a424941-afe1-4d2e-8d1a-6456e2d4a1aa
status: test
description: This rule identifies Windows file events where a target DLL filename ends with .dll and starts with a system-like directory path containing an extra space (e.g., C:\Windows , C:\Program Files , or C:\Program Files (x86) ). Attackers can use this technique to influence DLL search order by placing a malicious DLL in a deceptively named folder that resembles legitimate Windows directories. Telemetry relies on file event data with the full TargetFilename value, including both the directory prefix and the DLL extension.
references:
- https://twitter.com/cyb3rops/status/1552932770464292864
- https://www.wietzebeukema.nl/blog/hijacking-dlls-in-windows
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_dll_sideloading_space_path.yml
author: frack113, Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-07-30
tags:
- attack.persistence
- attack.privilege-escalation
- attack.execution
- attack.stealth
- 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
license: DRL-1.1
related:
- id: b6f91281-20aa-446a-b986-38a92813a18f
type: derived