type: attack-pattern
spec_version: 2.1
id: attack-pattern--46944654-fcc1-4f63-9dad-628102376586
created: 2017-05-31T21:30:40.604Z
created_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5
revoked: yes
external_references: source_name: mitre-attack
url: https://attack.mitre.org/techniques/T1038
external_id: T1038
source_name: capec
url: https://capec.mitre.org/data/definitions/471.html
external_id: CAPEC-471
source_name: Microsoft DLL Search
description: Microsoft. (n.d.). Dynamic-Link Library Search Order. Retrieved November 30, 2014.
url: http://msdn.microsoft.com/en-US/library/ms682586
source_name: OWASP Binary Planting
description: OWASP. (2013, January 30). Binary planting. Retrieved June 7, 2016.
url: https://www.owasp.org/index.php/Binary_planting
source_name: Microsoft 2269637
description: Microsoft. (2010, August 22). Microsoft Security Advisory 2269637 Released. Retrieved December 5, 2014.
url: https://msrc-blog.microsoft.com/2010/08/21/microsoft-security-advisory-2269637-released/
source_name: Microsoft DLL Redirection
description: Microsoft. (n.d.). Dynamic-Link Library Redirection. Retrieved December 5, 2014.
url: http://msdn.microsoft.com/en-US/library/ms682600
source_name: Microsoft Manifests
description: Microsoft. (n.d.). Manifests. Retrieved December 5, 2014.
url: https://msdn.microsoft.com/en-US/library/aa375365
source_name: Mandiant Search Order
description: Mandiant. (2010, August 31). DLL Search Order Hijacking Revisited. Retrieved December 5, 2014.
url: https://www.mandiant.com/blog/dll-search-order-hijacking-revisited/
object_marking_refs: marking-definition--fa42a846-8d90-4e51-bc29-71d5b4802168
modified: 2025-10-24T17:48:43.675Z
name: DLL Search Order Hijacking
description: Windows systems use a common method to look for required DLLs to load into a program. (Citation: Microsoft DLL Search) Adversaries may take advantage of the Windows DLL search order and programs that ambiguously specify DLLs to gain privilege escalation and persistence. 

Adversaries may perform DLL preloading, also called binary planting attacks, (Citation: OWASP Binary Planting) by placing a malicious DLL with the same name as an ambiguously specified DLL in a location that Windows searches before the legitimate DLL. Often this location is the current working directory of the program. Remote DLL preloading attacks occur when a program sets its current directory to a remote location such as a Web share before loading a DLL. (Citation: Microsoft 2269637) Adversaries may use this behavior to cause the program to load a malicious DLL. 

Adversaries may also directly modify the way a program loads DLLs by replacing an existing DLL or modifying a .manifest or .local redirection file, directory, or junction to cause the program to load a different DLL to maintain persistence or privilege escalation. (Citation: Microsoft DLL Redirection) (Citation: Microsoft Manifests) (Citation: Mandiant Search Order)

If a search order-vulnerable program is configured to run at a higher privilege level, then the adversary-controlled DLL that is loaded will also be executed at the higher level. In this case, the technique could be used for privilege escalation from user to administrator or SYSTEM or from administrator to SYSTEM, depending on the program.

Programs that fall victim to path hijacking may appear to behave normally because malicious DLLs may be configured to also load the legitimate DLLs they were meant to replace.
kill_chain_phases: kill_chain_name: mitre-attack
phase_name: persistence
kill_chain_name: mitre-attack
phase_name: privilege-escalation
kill_chain_name: mitre-attack
phase_name: defense-evasion
x_mitre_attack_spec_version: 3.2.0
x_mitre_contributors: Stefan Kanthak
Travis Smith, Tripwire
x_mitre_deprecated: no
x_mitre_domains: enterprise-attack
x_mitre_is_subtechnique: no
x_mitre_modified_by_ref: identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5
x_mitre_platforms: Windows
x_mitre_version: 1.1