|T1055.001||Dynamic-link Library Injection|
|T1055.002||Portable Executable Injection|
|T1055.003||Thread Execution Hijacking|
|T1055.004||Asynchronous Procedure Call|
|T1055.005||Thread Local Storage|
|T1055.008||Ptrace System Calls|
|T1055.011||Extra Window Memory 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.
ABK has the ability to inject shellcode into svchost.exe.
Agent Tesla can inject into known, vulnerable binaries on targeted hosts.
APT32 malware has injected a Cobalt Strike beacon into Rundll32.exe.
APT37 injects its malware variant, ROKRAT, into the cmd.exe process.
APT41 malware TIDYELF loaded the main WINTERLOVE component by injecting it into the iexplore.exe process.
Attor's dispatcher can inject itself into running processes to gain higher privileges and to evade detection.
AuditCred can inject code from files to other running processes.
Avenger has the ability to inject shellcode into svchost.exe.
Backdoor.Oldrea injects itself into explorer.exe.
Bazar can inject code through calling
BBK has the ability to inject shellcode into svchost.exe.
Bumblebee can inject code into multiple processes on infected endpoints.
Cardinal RAT injects into a newly spawned process created from a native Windows executable.
Clambling can inject into the
Cobalt Group has injected code into trusted processes.
Cobalt Strike can inject a variety of payloads into processes dynamically chosen by the adversary.
CostaBricks can inject a payload into the memory of a compromised host.
Donut includes a subproject
Dyre has the ability to directly inject its code into the web browser process.
Egregor can inject its payload into iexplore.exe process.
Empire contains multiple modules for injecting into processes, such as
Gazer injects its communication module into an Internet accessible process through which it performs C2.
gh0st RAT can inject malicious code into process created by the "Command_Create&Inject" function.
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.
HyperBro can run shellcode it injects into a newly created process.
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.
IronNetInjector can use an IronPython scripts to load a .NET injector to inject a payload into its own or a remote process.
JHUHUGIT performs code injection injecting its own functions to browser processes.
JPIN can inject content into lsass.exe to load a module.
Kimsuky has used Win7Elevate to inject malicious code into explorer.exe.
metaMain can inject the loader file, Speech02.db, into a process.
Mis-Type has been injected directly into a running process, including
NavRAT copies itself into a running Internet Explorer process to evade detection.
NETWIRE can inject code into system processes including notepad.exe, svchost.exe, and vbc.exe.
During Operation Sharpshooter, threat actors leveraged embedded shellcode to inject a downloader into the memory of Word.
During Operation Wocao, threat actors injected code into a selected process, which in turn launches a command as a child process of the original.
Pandora can start and inject code into a new
The PcShare payload has been injected into the
PLATINUM has used various methods of process injection including hot patching.
PoshC2 contains multiple modules for injecting into processes, such as
QakBot can inject itself into processes including explore.exe, Iexplore.exe, Mobsync.exe., and wermgr.exe.
Remcos has a command to hide itself through injecting into another process.
REvil can inject itself into running processes on a compromised host.
ROKRAT can use
Ryuk has injected itself into remote processes to encrypt files using a combination of
ShadowPad has injected an install module into a newly created process.
Silence has injected a DLL library containing a Trojan into the fwmain32.exe process.
SILENTTRINITY can inject shellcode directly into Excel.exe or a specific process.
Sliver can inject code into local and remote processes.
SLOTHFULMEDIA can inject into running processes on a compromised host.
Smoke Loader injects into the Internet Explorer process.
StoneDrill has relied on injecting its payload directly into the process memory of the victim's preferred browser.
TrickBot has used
TSCookie has the ability to inject code into the svchost.exe, iexplorer.exe, explorer.exe, and default browser processes.
Turla has also used PowerSploit's
WarzoneRAT has the ability to inject malicious DLLs into a specific process for privilege escalation.
Waterbear can inject decrypted shellcode into the LanmanServer service.
Wiarp creates a backdoor through which remote attackers can inject files into running processes.
Wingbird performs multiple process injections to hijack system processes and execute malicious code.
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.
|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. 
|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|
Monitor for contextual data about a file, which may include information such as name, the content (ex: signature, headers, or data/media), user/ower, permissions, etc.
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.
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
Monitor for processes being viewed that may inject code into processes in order to evade process-based defenses as well as possibly elevate privileges.
Monitor for process memory inconsistencies, such as checking memory ranges against a known copy of the legitimate module.
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.