Attack technique

DLL

DLL hijacking is when an attacker abuses the shared library files (DLLs) that Windows programs load.

In short

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.

Profile MapTechnique
  1. Reconnaissance
  2. Resource Development
  3. Initial Access
  4. Execution
  5. Persistence
  6. Privilege Escalation
  7. Stealth
  8. Defense Impairment
  9. Credential Access
  10. Discovery
  11. Lateral Movement
  12. Collection
  13. Command and Control
  14. Exfiltration
  15. Impact
  1. MITRE IDT1574.001ATT&CK technique
  2. Detection4ways to spot itUnexpected DLL loads · Replaced or extra DLLs
  3. 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

  1. Unexpected DLL loads

    Watch for trusted programs that load DLLs from folders they do not normally use.

  2. Replaced or extra DLLs

    Look for DLLs that have been swapped, added where none existed before, or set up through redirection files.

  3. Combine several data sources

    Link file changes, registry changes and module load records, so odd DLL behavior inside a trusted process stands out.

  4. Detection strategy MITRE lists

    DET0201, Detection Strategy for Hijack Execution Flow for DLLs.

How to defend

  1. Control library loading

    Block the loading of remote DLLs and keep safe DLL search mode switched on. Both are default in modern Windows.

  2. Use application control

    Use tools that can block DLLs loaded by legitimate software, not only the programs themselves.

  3. Audit for weak spots

    Run auditing tools that find DLL search order weaknesses on company systems, then fix them.

  4. 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.

In our research

  1. DarkHotel (APT-C-06 / ATK52 / DUBNIUM): The Global Espionage Network Behind Elite Cyber Intrusions March 2026
  2. APT27 January 2026
  3. APT15 (Ke3Chang / Nylon Typhoon): China-Aligned Cyber Espionage APT January 2026
  4. PlushDaemon APT: An In-Depth Analysis of a Stealthy China-Aligned Cyber Espionage Group January 2026
  5. Moonlight Tiger (APT-C-09, Patchwork, Dropping Elephant): India’s Silent Espionage Arm in the Digital Battlefield December 2025
  6. APT37: North Korea’s Active Cyberespionage Group November 2025

Sources

  1. MITRE ATT&CK T1574.001: Hijack Execution Flow: DLL MITRE
  2. MITRE ATT&CK T1574: Hijack Execution Flow MITRE