Process Injection

Adversaries may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges. Process injection is a method of executing arbitrary code in the address space of a separate live process. 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 process injection may also evade detection from security products since the execution is masked under a legitimate process.

There are many different ways to inject code into a process, many of which abuse legitimate functionalities. These implementations exist for every major OS but are typically platform specific.

More sophisticated samples may perform multiple process injections to segment modules and further evade detection, utilizing named pipes or other inter-process communication (IPC) mechanisms as a communication channel.

ID: T1055
Platforms: Linux, Windows, macOS
Defense Bypassed: Anti-virus, Application control
Contributors: Anastasios Pingios; Christiaan Beek, @ChristiaanBeek; Ryan Becwar
Version: 1.3
Created: 31 May 2017
Last Modified: 30 March 2023

Procedure Examples

ID Name Description
C0028 2015 Ukraine Electric Power Attack

During the 2015 Ukraine Electric Power Attack, Sandworm Team loaded BlackEnergy into svchost.exe, which then launched iexplore.exe for their C2. [1]

S0469 ABK

ABK has the ability to inject shellcode into svchost.exe.[2]

S0331 Agent Tesla

Agent Tesla can inject into known, vulnerable binaries on targeted hosts.[3]


ANDROMEDA can inject into the wuauclt.exe process to perform C2 actions.[4]

G0050 APT32

APT32 malware has injected a Cobalt Strike beacon into Rundll32.exe.[5]

G0067 APT37

APT37 injects its malware variant, ROKRAT, into the cmd.exe process.[6]

G0096 APT41

APT41 malware TIDYELF loaded the main WINTERLOVE component by injecting it into the iexplore.exe process.[7]

G1023 APT5

APT5 has used the CLEANPULSE utility to insert command line strings into a targeted process to alter its functionality.[8]

S0438 Attor

Attor's dispatcher can inject itself into running processes to gain higher privileges and to evade detection.[9]

S0347 AuditCred

AuditCred can inject code from files to other running processes.[10]

S0473 Avenger

Avenger has the ability to inject shellcode into svchost.exe.[2]

S0093 Backdoor.Oldrea

Backdoor.Oldrea injects itself into explorer.exe.[11][12]


BADHATCH can inject itself into an existing explorer.exe process by using RtlCreateUserThread.[13][14]

S0534 Bazar

Bazar can inject code through calling VirtualAllocExNuma.[15]

S0470 BBK

BBK has the ability to inject shellcode into svchost.exe.[2]

S1039 Bumblebee

Bumblebee can inject code into multiple processes on infected endpoints.[16]

S0348 Cardinal RAT

Cardinal RAT injects into a newly spawned process created from a native Windows executable.[17]

S0660 Clambling

Clambling can inject into the svchost.exe process for execution.[18]


COATHANGER includes a binary labeled authd that can inject a library into a running process and then hook an existing function within that process with a new function from that library.[19]

G0080 Cobalt Group

Cobalt Group has injected code into trusted processes.[20]

S0154 Cobalt Strike

Cobalt Strike can inject a variety of payloads into processes dynamically chosen by the adversary.[21][22][23]

S0614 CostaBricks

CostaBricks can inject a payload into the memory of a compromised host.[24]

C0029 Cutting Edge

During Cutting Edge, threat actors used malicious SparkGateway plugins to inject shared objects into web process memory on compromised Ivanti Secure Connect VPNs to enable deployment of backdoors.[25]

S0695 Donut

Donut includes a subproject DonutTest to inject shellcode into a target process.[26]

S0024 Dyre

Dyre has the ability to directly inject its code into the web browser process.[27]

S0554 Egregor

Egregor can inject its payload into iexplore.exe process.[28]

S0363 Empire

Empire contains multiple modules for injecting into processes, such as Invoke-PSInject.[29]

S0168 Gazer

Gazer injects its communication module into an Internet accessible process through which it performs C2.[30][31]

S0032 gh0st RAT

gh0st RAT can inject malicious code into process created by the "Command_Create&Inject" function.[32]

S0561 GuLoader

GuLoader has the ability to inject shellcode into a donor processes that is started in a suspended state. GuLoader has previously used RegAsm as a donor process.[33]


HOPLIGHT has injected into running processes.[34]


HTRAN can inject into into running processes.[35]

S0398 HyperBro

HyperBro can run shellcode it injects into a newly created process.[36]

S0260 InvisiMole

InvisiMole can inject itself into another process to avoid detection including use of a technique called ListPlanting that customizes the sorting algorithm in a ListView structure.[37]

S0581 IronNetInjector

IronNetInjector can use an IronPython scripts to load a .NET injector to inject a payload into its own or a remote process.[38]


JHUHUGIT performs code injection injecting its own functions to browser processes.[39][40]

S0201 JPIN

JPIN can inject content into lsass.exe to load a module.[41]

G0094 Kimsuky

Kimsuky has used Win7Elevate to inject malicious code into explorer.exe.[42]

S0681 Lizar

Lizar can migrate the loader into another process.[43]

S1059 metaMain

metaMain can inject the loader file, Speech02.db, into a process.[44]

S0084 Mis-Type

Mis-Type has been injected directly into a running process, including explorer.exe.[45]

S1122 Mispadu

Mispadu's binary is injected into memory via WriteProcessMemory.[46][47]

S0247 NavRAT

NavRAT copies itself into a running Internet Explorer process to evade detection.[48]


NETWIRE can inject code into system processes including notepad.exe, svchost.exe, and vbc.exe.[49]

S1100 Ninja

Ninja has the ability to inject an agent module into a new process and arbitrary shellcode into running processes.[50][51]

C0013 Operation Sharpshooter

During Operation Sharpshooter, threat actors leveraged embedded shellcode to inject a downloader into the memory of Word.[52]

C0014 Operation Wocao

During Operation Wocao, threat actors injected code into a selected process, which in turn launches a command as a child process of the original.[53]

S0664 Pandora

Pandora can start and inject code into a new svchost process.[54]

S1050 PcShare

The PcShare payload has been injected into the logagent.exe and rdpclip.exe processes.[55]


PLATINUM has used various methods of process injection including hot patching.[41]

S0378 PoshC2

PoshC2 contains multiple modules for injecting into processes, such as Invoke-PSInject.[56]

S0650 QakBot

QakBot can inject itself into processes including explore.exe, Iexplore.exe, Mobsync.exe., and wermgr.exe.[57][58][59][60][61]

S0332 Remcos

Remcos has a command to hide itself through injecting into another process.[62]

S0496 REvil

REvil can inject itself into running processes on a compromised host.[63]


ROKRAT can use VirtualAlloc, WriteProcessMemory, and then CreateRemoteThread to execute shellcode within the address space of Notepad.exe.[64]

S0446 Ryuk

Ryuk has injected itself into remote processes to encrypt files using a combination of VirtualAlloc, WriteProcessMemory, and CreateRemoteThread.[65]

S0596 ShadowPad

ShadowPad has injected an install module into a newly created process.[66]

G0091 Silence

Silence has injected a DLL library containing a Trojan into the fwmain32.exe process.[67]


SILENTTRINITY can inject shellcode directly into Excel.exe or a specific process.[68]

S0633 Sliver

Sliver can inject code into local and remote processes.[69][70]


SLOTHFULMEDIA can inject into running processes on a compromised host.[71]

S0226 Smoke Loader

Smoke Loader injects into the Internet Explorer process.[72]

S0380 StoneDrill

StoneDrill has relied on injecting its payload directly into the process memory of the victim's preferred browser.[73]

G1018 TA2541

TA2541 has injected malicious code into legitimate .NET related processes including regsvcs.exe, msbuild.exe, and installutil.exe.[74][75]

S0266 TrickBot

TrickBot has used Nt* Native API functions to inject code into legitimate processes such as wermgr.exe.[76]

S0436 TSCookie

TSCookie has the ability to inject code into the svchost.exe, iexplorer.exe, explorer.exe, and default browser processes.[77]

G0010 Turla

Turla has also used PowerSploit's Invoke-ReflectivePEInjection.ps1 to reflectively load a PowerShell payload into a random process on the victim system.[78]

S0670 WarzoneRAT

WarzoneRAT has the ability to inject malicious DLLs into a specific process for privilege escalation.[79]

S0579 Waterbear

Waterbear can inject decrypted shellcode into the LanmanServer service.[80]

S0206 Wiarp

Wiarp creates a backdoor through which remote attackers can inject files into running processes.[81]

S0176 Wingbird

Wingbird performs multiple process injections to hijack system processes and execute malicious code.[82]

G0102 Wizard Spider

Wizard Spider has used process injection to execute payloads to escalate privileges.[83]

S1065 Woody RAT

Woody RAT can inject code into a targeted process by writing to the remote memory of an infected system and then create a remote thread.[84]


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. For example, on Windows 10, Attack Surface Reduction (ASR) rules may prevent Office applications from code injection. [85]

M1026 Privileged Account Management

Utilize Yama (ex: /proc/sys/kernel/yama/ptrace_scope) to mitigate ptrace based process injection by restricting the use of ptrace to privileged users only. Other mitigation controls involve the deployment of security kernel modules that provide advanced access control and process restrictions such as SELinux, grsecurity, and AppArmor.


ID Data Source Data Component Detects
DS0022 File File Metadata

Monitor for contextual data about a file, which may include information such as name, the content (ex: signature, headers, or data/media), user/owner, permissions, etc.

File Modification

Monitor for changes made to files that may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges.

DS0011 Module Module Load

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.

DS0009 Process OS API Execution

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, SuspendThread/SetThreadContext/ResumeThread, QueueUserAPC/NtQueueApcThread, and those that can be used to modify memory within another process, such as VirtualAllocEx/WriteProcessMemory, may be used for this technique.[86] Monitoring for Linux specific calls such as the ptrace system call should not generate large amounts of data due to their specialized nature, and can be a very effective method to detect some of the common process injection methods.[87] [88] [89] [90]

Process Access

Monitor for processes being viewed that may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges.

Process Metadata

Monitor for process memory inconsistencies, such as checking memory ranges against a known copy of the legitimate module.[91]

Process Modification

Monitor for changes made to processes that may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges.


  1. Booz Allen Hamilton When The Lights Went Out Retrieved. 2019/10/22
  2. Chen, J. et al. (2019, November). Operation ENDTRADE: TICK’s Multi-Stage Backdoors for Attacking Industries and Stealing Classified Data. Retrieved June 9, 2020.
  3. Walter, J. (2020, August 10). Agent Tesla | Old RAT Uses New Tricks to Stay on Top. Retrieved December 11, 2020.
  4. Hawley, S. et al. (2023, February 2). Turla: A Galaxy of Opportunity. Retrieved May 15, 2023.
  5. Dahan, A. (2017). Operation Cobalt Kitty. Retrieved December 27, 2018.
  6. Mercer, W., Rascagneres, P. (2018, January 16). Korea In The Crosshairs. Retrieved May 21, 2018.
  7. Fraser, N., et al. (2019, August 7). Double DragonAPT41, a dual espionage and cyber crime operation APT41. Retrieved September 23, 2019.
  8. Perez, D. et al. (2021, May 27). Re-Checking Your Pulse: Updates on Chinese APT Actors Compromising Pulse Secure VPN Devices. Retrieved February 5, 2024.
  10. Trend Micro. (2018, November 20). Lazarus Continues Heists, Mounts Attacks on Financial Organizations in Latin America. Retrieved December 3, 2018.
  11. Symantec Security Response. (2014, June 30). Dragonfly: Cyberespionage Attacks Against Energy Suppliers. Retrieved April 8, 2016.
  13. Savelesky, K., et al. (2019, July 23). ABADBABE 8BADFOOD: Discovering BADHATCH and a Detailed Look at FIN8's Tooling. Retrieved September 8, 2021.
  14. Vrabie, V., et al. (2021, March 10). FIN8 Returns with Improved BADHATCH Toolkit. Retrieved September 8, 2021.
  15. Cybereason Nocturnus. (2020, July 16). A BAZAR OF TRICKS: FOLLOWING TEAM9’S DEVELOPMENT CYCLES. Retrieved November 18, 2020.
  16. Cybereason. (2022, August 17). Bumblebee Loader – The High Road to Enterprise Domain Control. Retrieved August 29, 2022.
  17. Grunzweig, J.. (2017, April 20). Cardinal RAT Active for Over Two Years. Retrieved December 8, 2018.
  18. Lunghi, D. et al. (2020, February). Uncovering DRBControl. Retrieved November 12, 2021.
  19. Dutch Military Intelligence and Security Service (MIVD) & Dutch General Intelligence and Security Service (AIVD). (2024, February 6). Ministry of Defense of the Netherlands uncovers COATHANGER, a stealthy Chinese FortiGate RAT. Retrieved February 7, 2024.
  20. Matveeva, V. (2017, August 15). Secrets of Cobalt. Retrieved October 10, 2018.
  21. Strategic Cyber LLC. (2017, March 14). Cobalt Strike Manual. Retrieved May 24, 2017.
  22. Strategic Cyber LLC. (2020, November 5). Cobalt Strike: Advanced Threat Tactics for Penetration Testers. Retrieved April 13, 2021.
  23. DFIR Report. (2021, November 29). CONTInuing the Bazar Ransomware Story. Retrieved September 29, 2022.
  24. The BlackBerry Research and Intelligence Team. (2020, November 12). The CostaRicto Campaign: Cyber-Espionage Outsourced. Retrieved May 24, 2021.
  25. Lin, M. et al. (2024, February 27). Cutting Edge, Part 3: Investigating Ivanti Connect Secure VPN Exploitation and Persistence Attempts. Retrieved March 1, 2024.
  26. TheWover. (2019, May 9). donut. Retrieved March 25, 2022.
  27. hasherezade. (2015, November 4). A Technical Look At Dyreza. Retrieved June 15, 2020.
  28. Cybleinc. (2020, October 31). Egregor Ransomware – A Deep Dive Into Its Activities and Techniques. Retrieved December 29, 2020.
  29. Schroeder, W., Warner, J., Nelson, M. (n.d.). Github PowerShellEmpire. Retrieved April 28, 2016.
  30. ESET. (2017, August). Gazing at Gazer: Turla’s new second stage backdoor. Retrieved September 14, 2017.
  31. Kaspersky Lab's Global Research & Analysis Team. (2017, August 30). Introducing WhiteBear. Retrieved September 21, 2017.
  32. Quinn, J. (2019, March 25). The odd case of a Gh0stRAT variant. Retrieved July 15, 2020.
  33. Salem, E. (2021, April 19). Dancing With Shellcodes: Cracking the latest version of Guloader. Retrieved July 7, 2021.
  34. US-CERT. (2019, April 10). MAR-10135536-8 – North Korean Trojan: HOPLIGHT. Retrieved April 19, 2019.
  35. The Australian Cyber Security Centre (ACSC), the Canadian Centre for Cyber Security (CCCS), the New Zealand National Cyber Security Centre (NZ NCSC), CERT New Zealand, the UK National Cyber Security Centre (UK NCSC) and the US National Cybersecurity and Communications Integration Center (NCCIC). (2018, October 11). Joint report on publicly available hacking tools. Retrieved March 11, 2019.
  36. Falcone, R. and Lancaster, T. (2019, May 28). Emissary Panda Attacks Middle East Government Sharepoint Servers. Retrieved July 9, 2019.
  37. Hromcova, Z. and Cherpanov, A. (2020, June). INVISIMOLE: THE HIDDEN PART OF THE STORY. Retrieved July 16, 2020.
  38. Reichel, D. (2021, February 19). IronNetInjector: Turla’s New Malware Loading Tool. Retrieved February 24, 2021.
  39. F-Secure. (2015, September 8). Sofacy Recycles Carberp and Metasploit Code. Retrieved August 3, 2016.
  40. Lee, B, et al. (2018, February 28). Sofacy Attacks Multiple Government Entities. Retrieved March 15, 2018.
  41. Windows Defender Advanced Threat Hunting Team. (2016, April 29). PLATINUM: Targeted attacks in South and Southeast Asia. Retrieved February 15, 2018.
  42. Tarakanov , D.. (2013, September 11). The “Kimsuky” Operation: A North Korean APT?. Retrieved August 13, 2019.
  43. BI.ZONE Cyber Threats Research Team. (2021, May 13). From pentest to APT attack: cybercriminal group FIN7 disguises its malware as an ethical hacker’s toolkit. Retrieved February 2, 2022.
  44. Ehrlich, A., et al. (2022, September). THE MYSTERY OF METADOR | AN UNATTRIBUTED THREAT HIDING IN TELCOS, ISPS, AND UNIVERSITIES. Retrieved January 23, 2023.
  45. Gross, J. (2016, February 23). Operation Dust Storm. Retrieved December 22, 2021.
  46. Pedro Tavares (Segurança Informática). (2020, September 15). Threat analysis: The emergent URSA trojan impacts many countries using a sophisticated loader. Retrieved March 13, 2024.
  1. SCILabs. (2021, December 23). Cyber Threat Profile Malteiro. Retrieved March 13, 2024.
  2. Mercer, W., Rascagneres, P. (2018, May 31). NavRAT Uses US-North Korea Summit As Decoy For Attacks In South Korea. Retrieved June 11, 2018.
  3. Lambert, T. (2020, January 29). Intro to Netwire. Retrieved January 7, 2021.
  4. Dedola, G. (2022, June 21). APT ToddyCat. Retrieved January 3, 2024.
  5. Dedola, G. et al. (2023, October 12). ToddyCat: Keep calm and check logs. Retrieved January 3, 2024.
  6. L. O'Donnell. (2019, March 3). RSAC 2019: New Operation Sharpshooter Data Reveals Higher Complexity, Scope. Retrieved September 26, 2022.
  7. Dantzig, M. v., Schamper, E. (2019, December 19). Operation Wocao: Shining a light on one of China’s hidden hacking groups. Retrieved October 8, 2020.
  8. Lunghi, D. and Lu, K. (2021, April 9). Iron Tiger APT Updates Toolkit With Evolved SysUpdate Malware. Retrieved November 12, 2021.
  9. Vrabie, V. (2020, November). Dissecting a Chinese APT Targeting South Eastern Asian Government Institutions. Retrieved September 19, 2022.
  10. Nettitude. (2018, July 23). Python Server for PoshC2. Retrieved April 23, 2019.
  11. Mendoza, E. et al. (2020, May 25). Qakbot Resurges, Spreads through VBS Files. Retrieved September 27, 2021.
  12. Sette, N. et al. (2020, June 4). Qakbot Malware Now Exfiltrating Emails for Sophisticated Thread Hijacking Attacks. Retrieved September 27, 2021.
  13. Trend Micro. (2020, December 17). QAKBOT: A decade-old malware still with new tricks. Retrieved September 27, 2021.
  14. Kuzmenko, A. et al. (2021, September 2). QakBot technical analysis. Retrieved September 27, 2021.
  15. Kenefick, I. et al. (2022, October 12). Black Basta Ransomware Gang Infiltrates Networks via QAKBOT, Brute Ratel, and Cobalt Strike. Retrieved February 6, 2023.
  16. Bacurio, F., Salvio, J. (2017, February 14). REMCOS: A New RAT In The Wild. Retrieved November 6, 2018.
  17. Saavedra-Morales, J, et al. (2019, October 20). McAfee ATR Analyzes Sodinokibi aka REvil Ransomware-as-a-Service – Crescendo. Retrieved August 5, 2020.
  18. Jazi, Hossein. (2021, January 6). Retrohunting APT37: North Korean APT used VBA self decode technique to inject RokRat. Retrieved March 22, 2022.
  19. Hanel, A. (2019, January 10). Big Game Hunting with Ryuk: Another Lucrative Targeted Ransomware. Retrieved May 12, 2020.
  20. Kaspersky Lab. (2017, August). ShadowPad: popular server management software hit in supply chain attack. Retrieved March 22, 2021.
  21. Group-IB. (2018, September). Silence: Moving Into the Darkside. Retrieved May 5, 2020.
  22. Salvati, M. (2019, August 6). SILENTTRINITY Modules. Retrieved March 24, 2022.
  23. Kervella, R. (2019, August 4). Cross-platform General Purpose Implant Framework Written in Golang. Retrieved July 30, 2021.
  24. BishopFox. (n.d.). Sliver. Retrieved September 15, 2021.
  25. DHS/CISA, Cyber National Mission Force. (2020, October 1). Malware Analysis Report (MAR) MAR-10303705-1.v1 – Remote Access Trojan: SLOTHFULMEDIA. Retrieved October 2, 2020.
  26. Baker, B., Unterbrink H. (2018, July 03). Smoking Guns - Smoke Loader learned new tricks. Retrieved July 5, 2018.
  27. Kaspersky Lab. (2017, March 7). From Shamoon to StoneDrill: Wipers attacking Saudi organizations and beyond. Retrieved March 14, 2019.
  28. Larson, S. and Wise, J. (2022, February 15). Charting TA2541's Flight. Retrieved September 12, 2023.
  29. Ventura, V. (2021, September 16). Operation Layover: How we tracked an attack on the aviation industry to five years of compromise. Retrieved September 15, 2023.
  30. Joe Security. (2020, July 13). TrickBot's new API-Hammering explained. Retrieved September 30, 2021.
  31. Tomonaga, S.. (2019, September 18). Malware Used by BlackTech after Network Intrusion. Retrieved May 6, 2020.
  32. Faou, M. and Dumont R.. (2019, May 29). A dive into Turla PowerShell usage. Retrieved June 14, 2019.
  33. Harakhavik, Y. (2020, February 3). Warzone: Behind the enemy lines. Retrieved December 17, 2021.
  34. Su, V. et al. (2019, December 11). Waterbear Returns, Uses API Hooking to Evade Security. Retrieved February 22, 2021.
  35. Zhou, R. (2012, May 15). Backdoor.Wiarp. Retrieved February 22, 2018.
  36. Anthe, C. et al. (2016, December 14). Microsoft Security Intelligence Report Volume 21. Retrieved November 27, 2017.
  37. Shilko, J., et al. (2021, October 7). FIN12: The Prolific Ransomware Intrusion Threat Actor That Has Aggressively Pursued Healthcare Targets. Retrieved June 15, 2023.
  38. MalwareBytes Threat Intelligence Team. (2022, August 3). Woody RAT: A new feature-rich malware spotted in the wild. Retrieved December 6, 2022.
  39. Microsoft. (2021, July 2). Use attack surface reduction rules to prevent malware infection. Retrieved June 24, 2021.
  40. Hosseini, A. (2017, July 18). Ten Process Injection Techniques: A Technical Survey Of Common And Trending Process Injection Techniques. Retrieved December 7, 2017.
  41. Ligh, M.H. et al.. (2014, July). The Art of Memory Forensics: Detecting Malware and Threats in Windows, Linux, and Mac Memory. Retrieved December 20, 2017.
  42. GNU. (2010, February 5). The GNU Accounting Utilities. Retrieved December 20, 2017.
  43. Jahoda, M. et al.. (2017, March 14). redhat Security Guide - Chapter 7 - System Auditing. Retrieved December 20, 2017.
  44. stderr. (2014, February 14). Detecting Userland Preload Rootkits. Retrieved December 20, 2017.
  45. Aliz Hammond. (2019, August 15). Hiding Malicious Code with "Module Stomping": Part 1. Retrieved July 14, 2022.