DLL hijacking is when an attacker abuses the shared library files (DLLs) that Windows programs load. A trusted program is made to load a harmful DLL instead of, or alongside, the real one. This helps the attacker stay in place, gain higher privileges and avoid detection.
Last updated 8 October 2026
Profile MapTechnique
Reconnaissance
Resource Development
Initial Access
Execution
Persistence
Privilege Escalation
Stealth
Defense Impairment
Credential Access
Discovery
Lateral Movement
Collection
Command and Control
Exfiltration
Impact
MITRE IDT1574.001ATT&CK technique
Detection4ways to spot itUnexpected DLL loads · Replaced or extra DLLs
Defences4ways to stop itControl library loading · Use application control
How it works
DLLs are libraries of code that many programs share. They are not harmful by nature, but the way programs find and load them can be abused.
MITRE describes several forms. In DLL side-loading, the attacker places a harmful DLL next to a legitimate application, so the application loads it. In search order hijacking, a harmful DLL is placed in a folder that Windows checks before the folder holding the real library. Other forms include redirecting where a program looks, using a DLL that is referenced but missing, and swapping a real DLL for a fake one.
Because the trusted program runs the code, the activity can look normal. Some harmful DLLs also load the real library, so the program seems to work as usual. If the program runs with high privileges, the harmful code runs with them too.
A real example
Procedure examples listed by MITRE ATT&CK:
ANELLDR can use DLL sideloading from a legitimate application to start execution.
AshTag has used DLL sideloading, pairing a legitimate executable with a malicious DLL named wtsapi32.
Astaroth can launch itself through DLL search order hijacking.
BADNEWS typically loads its DLL file into a legitimate signed Java or VMware executable.
BBSRAT was run through DLL side-loading, using a legitimate executable that the dropper placed next to it.
How to detect
Unexpected DLL loads
Watch for trusted programs that load DLLs from folders they do not normally use.
Replaced or extra DLLs
Look for DLLs that have been swapped, added where none existed before, or set up through redirection files.
Combine several data sources
Link file changes, registry changes and module load records, so odd DLL behavior inside a trusted process stands out.
Detection strategy MITRE lists
DET0201, Detection Strategy for Hijack Execution Flow for DLLs.
How to defend
Control library loading
Block the loading of remote DLLs and keep safe DLL search mode switched on. Both are default in modern Windows.
Use application control
Use tools that can block DLLs loaded by legitimate software, not only the programs themselves.
Audit for weak spots
Run auditing tools that find DLL search order weaknesses on company systems, then fix them.
Patch and harden software
Keep software updated to fix side-loading flaws. Developers can add hash values to manifest files to help stop side-loading.
Questions
What is DLL hijacking?
DLL hijacking is when an attacker abuses the shared library files (DLLs) that Windows programs load. A trusted program is made to load a harmful DLL instead of, or alongside, the real one, so the activity can look normal.
What is the difference between DLL side-loading and search order hijacking?
In DLL side-loading, the attacker places a harmful DLL next to a legitimate application so it loads it. In search order hijacking, the harmful DLL sits in a folder that Windows checks before the folder holding the real library.
How can defenders detect DLL hijacking?
Watch for trusted programs that load DLLs from folders they do not normally use, and for DLLs that were swapped or added. Linking file changes, registry changes and module load records makes odd behavior inside a trusted process stand out.
How do I defend against DLL hijacking?
Block the loading of remote DLLs and keep safe DLL search mode on, use application control that can block DLLs loaded by legitimate software, audit for search order weaknesses and keep software updated.
DarkHotel (APT-C-06, DUBNIUM) profile: espionage actor, its shift from hotel Wi-Fi attacks to supply chain and cloud-based operations, aliases and targets.
MITRE ATT&CK describes APT19 (also Codoso) as a Chinese-based group that has targeted defense, finance, legal and other industries, with activity reported in 2014 and 2017. Only MITRE ATT&CK documents this group, no government advisory names it, and MITRE says it is unclear whether APT19 and Deep Panda are the same group.
Attributed by MITRE ATT&CK and by the US Department of Justice (5 March 2025) to a Chinese group, also called Threat Group-3390 and Emissary Panda, that targets governments and companies. The Justice Department charged two men it calls APT27 actors, alleging profit-driven hacking from 2013 to 2024.
Read more →
Stay Ahead of Digital Threats
Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.