Home > CAPEC List > CAPEC-471: DLL Search Order Hijacking (Version 2.11)  

CAPEC-471: DLL Search Order Hijacking

DLL Search Order Hijacking
Definition in a New Window Definition in a New Window
Attack Pattern ID: 471
Abstraction: Detailed
Status: Draft
Completeness: Stub
Presentation Filter:
+ Summary

The attacker exploits the functionality of the Windows DLL loader where the process loading the DLL searches for the DLL to be loaded first in the same directory in which the process binary resides and then in other directories (e.g., System32). Exploitation of this preferential search order can allow an attacker to make the loading process load the attackers' rogue DLL rather than the legitimate DLL.

For instance, an attacker with access to the file system may place a malicious ntshrui.dll in the C:\Windows directory. This DLL normally resides in the System32 folder. Process explorer.exe which also resides in C:\Windows, upon trying to load the ntshrui.dll from the System32 folder will actually load the DLL supplied by the attacker simply because of the preferential search order. Since the attacker has placed its malicious ntshrui.dll in the same directory as the loading explorer.exe process, the DLL supplied by the attacker will be found first and thus loaded in lieu of the legitimate DLL. Since explorer.exe is loaded during the boot cycle, the attackers' malware is guaranteed to execute.

This attack can be leveraged with many different DLLs and with many different loading processes. No forensic trails are left in the system's registry or file system that an incorrect DLL had been loaded.

+ Attack Prerequisites
  • Windows system is used

    Attacker has a mechanism to place its malicious DLLs in the needed location on the file system

+ Typical Severity


+ Attacker Skills or Knowledge Required

Skill or Knowledge Level: Medium

Ability to create a malicious DLL and get it to the right location on the victim's file system

+ Solutions and Mitigations

Design: Fix the Windows loading process to eliminate the preferential search order by looking for DLLs in the precise location where they are expected

Design: Sign system DLLs so that unauthorized DLLs can be detected.

+ References
[R.471.1] "M Trends Report". Mandiant. 2011. <www.mandiant.com>.
[R.471.2] ATT&CK Project. "DLL search order hijacking (1038)". MITRE. <https://attack.mitre.org/wiki/DLL_search_order_hijacking>.
+ Content History
CAPEC Content TeamThe MITRE Corporation2014-06-23Internal_CAPEC_Team
CAPEC Content TeamThe MITRE Corporation2015-11-09Updated ReferencesInternal

More information is available — Please select a different filter.
Page Last Updated or Reviewed: August 04, 2017