Process Injection: Dynamic-link Library Injection

Adversaries may inject dynamic-link libraries (DLLs) into processes in order to evade process-based defenses as well as possibly elevate privileges. DLL injection is a method of executing arbitrary code in the address space of a separate live process.

DLL injection is commonly performed by writing the path to a DLL in the virtual address space of the target process before loading the DLL by invoking a new thread. The write can be performed with native Windows API calls such as VirtualAllocEx and WriteProcessMemory, then invoked with CreateRemoteThread (which calls the LoadLibrary API responsible for loading the DLL). [1]

Variations of this method such as reflective DLL injection (writing a self-mapping DLL into a process) and memory module (map DLL when writing into process) overcome the address relocation issue as well as the additional APIs to invoke execution (since these methods load and execute the files in memory by manually preforming the function of LoadLibrary).[2][1]

Running code in the context of another process may allow access to the process's memory, system/network resources, and possibly elevated privileges. Execution via DLL injection may also evade detection from security products since the execution is masked under a legitimate process.

ID: T1055.001
Sub-technique of:  T1055
Tactics: Defense Evasion, Privilege Escalation
Platforms: Windows
Permissions Required: User
Data Sources: Module: Module Load, Process: OS API Execution, Process: Process Access
Defense Bypassed: Anti-virus, Application control
Version: 1.0
Created: 14 January 2020
Last Modified: 10 November 2020

Procedure Examples

ID Name Description
S0456 Aria-body

Aria-body has the ability to inject itself into another process such as rundll32.exe and dllhost.exe.[3]

S0089 BlackEnergy

BlackEnergy injects its DLL component into svchost.exe.[4]

S0484 Carberp

Carberp's bootkit can inject a malicious DLL into the address space of running processes.[5]

S0335 Carbon

Carbon has a command to inject code into a process.[6]

S0154 Cobalt Strike

Cobalt Strike has the ability to load DLLs via reflective injection.[7]

S0126 ComRAT

ComRAT has injected its orchestrator DLL into explorer.exe. ComRAT has also injected its communications module into the victim's default browser to make C2 connections appear less suspicious as all network connections will be initiated by the browser process.[8][9]

S0575 Conti

Conti has loaded an encrypted DLL into memory and then executes it.[10][11]

S0021 Derusbi

Derusbi injects itself into the secure shell (SSH) process.[12]

S0038 Duqu

Duqu will inject itself into different processes to evade detection. The selection of the target process is influenced by the security software that is installed on the system (Duqu will inject into different processes depending on which security suite is installed on the infected host).[13]

S0024 Dyre

Dyre injects into other processes to load modules.[14]

S0081 Elise

Elise injects DLL files into iexplore.exe.[15][16]

S0082 Emissary

Emissary injects its DLL file into a newly spawned Internet Explorer process.[17]

S0367 Emotet

Emotet has been observed injecting in to Explorer.exe and other processes. [18][19][20]

S0182 FinFisher

FinFisher injects itself into various processes depending on whether it is low integrity or high integrity.[21][22]

S0460 Get2

Get2 has the ability to inject DLLs into processes.[23]


HIDEDRV injects a DLL for Downdelph into the explorer.exe process.[24]

S0581 IronNetInjector

IronNetInjector has the ability to inject a DLL into running processes, including the IronNetInjector DLL into explorer.exe.[25]

S0265 Kazuar

If running in a Windows environment, Kazuar saves a DLL to disk that is injected into the explorer.exe process to execute the payload. Kazuar can also be configured to inject and execute within specific processes.[26]

S0250 Koadic

Koadic can perform process injection by using a reflective DLL.[27]

G0032 Lazarus Group

A Lazarus Group malware sample performs reflective DLL injection.[28]

S0167 Matryoshka

Matryoshka uses reflective DLL injection to inject the malicious library and execute the RAT.[29]

S0449 Maze

Maze has injected the malware DLL into a target process.[30][31]

S0576 MegaCortex

MegaCortex loads injecthelper.dll into a newly created rundll32.exe process.[32]

S0455 Metamorfo

Metamorfo has injected a malicious DLL into the Windows Media Player process (wmplayer.exe).[33]

S0457 Netwalker

The Netwalker DLL has been injected reflectively into the memory of a legitimate running process.[34]

S0501 PipeMon

PipeMon can inject its modules into various processes using reflective DLL loading.[35]

S0012 PoisonIvy

PoisonIvy can inject a malicious DLL into a process.[36][37]

S0194 PowerSploit

PowerSploit contains a collection of CodeExecution modules that inject code (DLL, shellcode) into a process.[38][39]

S0192 Pupy

Pupy can migrate into another process using reflective DLL injection.[40]

G0024 Putter Panda

An executable dropped onto victims by Putter Panda aims to inject the specified DLL into a process that would normally be accessing the network, including Outlook Express (msinm.exe), Outlook (outlook.exe), Internet Explorer (iexplore.exe), and Firefox (firefox.exe).[41]

S0458 Ramsay

Ramsay can use ImprovedReflectiveDLLInjection to deploy components.[42]


After decrypting itself in memory, RARSTONE downloads a DLL file from its C2 server and loads it in the memory space of a hidden Internet Explorer process. This "downloaded" file is actually not dropped onto the system.[43]


RATANKBA performs a reflective DLL injection using a given pid.[44][45]

S0125 Remsec

Remsec can perform DLL injection.[46]

S0461 SDBbot

SDBbot has the ability to inject a downloaded DLL into a newly created rundll32.exe process.[23]

S0596 ShadowPad

ShadowPad has injected a DLL into svchost.exe.[47]

S0273 Socksbot

Socksbot creates a suspended svchost process and injects its DLL into it.[48]

S0018 Sykipot

Sykipot injects itself into running instances of outlook.exe, iexplore.exe, or firefox.exe.[49]

G0092 TA505

TA505 has been seen injecting a DLL into winword.exe.[50]

S0467 TajMahal

TajMahal has the ability to inject DLLs for malicious plugins into running processes.[51]

G0081 Tropic Trooper

Tropic Trooper has injected a DLL backdoor into dllhost.exe and svchost.exe.[52][53]

G0010 Turla

Turla has used Metasploit to perform reflective DLL injection in order to escalate privileges.[54][55]

G0102 Wizard Spider

Wizard Spider has injected malicious DLLs into memory with read, write, and execute permissions.[56][57]

S0412 ZxShell

ZxShell is injected into a shared SVCHOST process.[58]


ID Mitigation Description
M1040 Behavior Prevention on Endpoint

Some endpoint security solutions can be configured to block some types of process injection based on common sequences of behavior that occur during the injection process.


Monitoring Windows API calls indicative of the various types of code injection may generate a significant amount of data and may not be directly useful for defense unless collected under specific circumstances for known bad sequences of calls, since benign use of API functions may be common and difficult to distinguish from malicious behavior. Windows API calls such as CreateRemoteThread and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.[1]

Monitor DLL/PE file events, specifically creation of these binary files as well as the loading of DLLs into processes. Look for DLLs that are not recognized or not normally loaded into a process.

Analyze process behavior to determine if a process is performing actions it usually does not, such as opening network connections, reading files, or other suspicious actions that could relate to post-compromise behavior.


  1. Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.
  2. Desimone, J. (2017, June 13). Hunting in Memory. Retrieved December 7, 2017.
  3. CheckPoint. (2020, May 7). Naikon APT: Cyber Espionage Reloaded. Retrieved May 26, 2020.
  4. F-Secure Labs. (2014). BlackEnergy & Quedagh: The convergence of crimeware and APT attacks. Retrieved March 24, 2016.
  5. Matrosov, A., Rodionov, E., Volkov, D., Harley, D. (2012, March 2). Win32/Carberp When You’re in a Black Hole, Stop Digging. Retrieved July 15, 2020.
  6. ESET. (2017, March 30). Carbon Paper: Peering into Turla’s second stage backdoor. Retrieved November 7, 2018.
  7. Mavis, N. (2020, September 21). The Art and Science of Detecting Cobalt Strike. Retrieved April 6, 2021.
  8. Faou, M. (2020, May). From Agent.btz to ComRAT v4: A ten-year journey. Retrieved June 15, 2020.
  9. CISA. (2020, October 29). Malware Analysis Report (AR20-303A). Retrieved December 9, 2020.
  10. Rochberger, L. (2021, January 12). Cybereason vs. Conti Ransomware. Retrieved February 17, 2021.
  11. Baskin, B. (2020, July 8). TAU Threat Discovery: Conti Ransomware. Retrieved February 17, 2021.
  12. Perigaud, F. (2015, December 15). Newcomers in the Derusbi family. Retrieved December 20, 2017.
  13. Symantec Security Response. (2011, November). W32.Duqu: The precursor to the next Stuxnet. Retrieved September 17, 2015.
  14. Symantec Security Response. (2015, June 23). Dyre: Emerging threat on financial fraud landscape. Retrieved August 23, 2018.
  15. Falcone, R., et al.. (2015, June 16). Operation Lotus Blossom. Retrieved February 15, 2016.
  17. Falcone, R. and Miller-Osborn, J.. (2015, December 18). Attack on French Diplomat Linked to Operation Lotus Blossom. Retrieved February 15, 2016.
  18. Özarslan, S. (2018, December 21). The Christmas Card you never wanted - A new wave of Emotet is back to wreak havoc. Retrieved March 25, 2019.
  19. Salvio, J.. (2014, June 27). New Banking Malware Uses Network Sniffing for Data Theft. Retrieved March 25, 2019.
  20. US-CERT. (2018, July 20). Alert (TA18-201A) Emotet Malware. Retrieved March 25, 2019.
  21. FinFisher. (n.d.). Retrieved December 20, 2017.
  22. Allievi, A.,Flori, E. (2018, March 01). FinFisher exposed: A researcher’s tale of defeating traps, tricks, and complex virtual machines. Retrieved July 9, 2018.
  23. Schwarz, D. et al. (2019, October 16). TA505 Distributes New SDBbot Remote Access Trojan with Get2 Downloader. Retrieved May 29, 2020.
  24. ESET. (2016, October). En Route with Sednit - Part 3: A Mysterious Downloader. Retrieved November 21, 2016.
  25. Reichel, D. (2021, February 19). IronNetInjector: Turla’s New Malware Loading Tool. Retrieved February 24, 2021.
  26. Levene, B, et al. (2017, May 03). Kazuar: Multiplatform Espionage Backdoor with API Access. Retrieved July 17, 2018.
  27. Magius, J., et al. (2017, July 19). Koadic. Retrieved June 18, 2018.
  28. Sherstobitoff, R. (2018, February 12). Lazarus Resurfaces, Targets Global Banks and Bitcoin Users. Retrieved February 19, 2018.
  29. Minerva Labs LTD and ClearSky Cyber Security. (2015, November 23). CopyKittens Attack Group. Retrieved September 11, 2017.
  1. Mundo, A. (2020, March 26). Ransomware Maze. Retrieved May 18, 2020.
  2. Brandt, A., Mackenzie, P.. (2020, September 17). Maze Attackers Adopt Ragnar Locker Virtual Machine Technique. Retrieved October 9, 2020.
  3. Del Fierro, C. Kessem, L.. (2020, January 8). From Mega to Giga: Cross-Version Comparison of Top MegaCortex Modifications. Retrieved February 15, 2021.
  4. Erlich, C. (2020, April 3). The Avast Abuser: Metamorfo Banking Malware Hides By Abusing Avast Executable. Retrieved May 26, 2020.
  5. Victor, K.. (2020, May 18). Netwalker Fileless Ransomware Injected via Reflective Loading . Retrieved May 26, 2020.
  6. Tartare, M. et al. (2020, May 21). No “Game over” for the Winnti Group. Retrieved August 24, 2020.
  7. FireEye. (2014). POISON IVY: Assessing Damage and Extracting Intelligence. Retrieved November 12, 2014.
  8. Hayashi, K. (2005, August 18). Backdoor.Darkmoon. Retrieved February 23, 2018.
  9. PowerShellMafia. (2012, May 26). PowerSploit - A PowerShell Post-Exploitation Framework. Retrieved February 6, 2018.
  10. PowerSploit. (n.d.). PowerSploit. Retrieved February 6, 2018.
  11. Nicolas Verdier. (n.d.). Retrieved January 29, 2018.
  12. Crowdstrike Global Intelligence Team. (2014, June 9). CrowdStrike Intelligence Report: Putter Panda. Retrieved January 22, 2016.
  13. Sanmillan, I.. (2020, May 13). Ramsay: A cyber‑espionage toolkit tailored for air‑gapped networks. Retrieved May 27, 2020.
  14. Camba, A. (2013, February 27). BKDR_RARSTONE: New RAT to Watch Out For. Retrieved January 8, 2016.
  15. Lei, C., et al. (2018, January 24). Lazarus Campaign Targeting Cryptocurrencies Reveals Remote Controller Tool, an Evolved RATANKBA, and More. Retrieved May 22, 2018.
  16. Trend Micro. (2017, February 27). RATANKBA: Delving into Large-scale Watering Holes against Enterprises. Retrieved May 22, 2018.
  17. Kaspersky Lab's Global Research & Analysis Team. (2016, August 9). The ProjectSauron APT. Technical Analysis. Retrieved August 17, 2016.
  18. Kaspersky Lab. (2017, August). ShadowPad: popular server management software hit in supply chain attack. Retrieved March 22, 2021.
  19. Lunghi, D., et al. (2017, December). Untangling the Patchwork Cyberespionage Group. Retrieved July 10, 2018.
  20. Blasco, J. (2011, December 12). Another Sykipot sample likely targeting US federal agencies. Retrieved March 28, 2016.
  21. Frydrych, M. (2020, April 14). TA505 Continues to Infect Networks With SDBbot RAT. Retrieved May 29, 2020.
  22. GReAT. (2019, April 10). Project TajMahal – a sophisticated new APT framework. Retrieved October 14, 2019.
  23. Horejsi, J., et al. (2018, March 14). Tropic Trooper’s New Strategy. Retrieved November 9, 2018.
  24. Chen, J.. (2020, May 12). Tropic Trooper’s Back: USBferry Attack Targets Air gapped Environments. Retrieved May 20, 2020.
  25. ESET Research. (2018, May 22). Turla Mosquito: A shift towards more generic tools. Retrieved July 3, 2018.
  26. Rapid7. (2013, November 26). meterpreter/source/extensions/priv/server/elevate/. Retrieved July 8, 2018.
  27. DHS/CISA. (2020, October 28). Ransomware Activity Targeting the Healthcare and Public Health Sector. Retrieved October 28, 2020.
  28. The DFIR Report. (2020, November 5). Ryuk Speed Run, 2 Hours to Ransom. Retrieved November 6, 2020.
  29. Allievi, A., et al. (2014, October 28). Threat Spotlight: Group 72, Opening the ZxShell. Retrieved September 24, 2019.