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 | 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] |
S1074 | ANDROMEDA |
ANDROMEDA can inject into the |
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] |
S1081 | BADHATCH |
BADHATCH can inject itself into an existing explorer.exe process by using |
S0534 | Bazar |
Bazar can inject code through calling |
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 |
S1105 | COATHANGER |
COATHANGER includes a binary labeled |
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 |
S1159 | DUSTTRAP |
DUSTTRAP compromises the |
S0024 | Dyre |
Dyre has the ability to directly inject its code into the web browser process.[28] |
S0554 | Egregor |
Egregor can inject its payload into iexplore.exe process.[29] |
S0363 | Empire |
Empire contains multiple modules for injecting into processes, such as |
S0168 | Gazer |
Gazer injects its communication module into an Internet accessible process through which it performs C2.[31][32] |
S0032 | gh0st RAT |
gh0st RAT can inject malicious code into process created by the "Command_Create&Inject" function.[33] |
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.[34] |
S0376 | HOPLIGHT | |
S0040 | HTRAN | |
S0398 | HyperBro |
HyperBro can run shellcode it injects into a newly created process.[37] |
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.[38] |
S0581 | IronNetInjector |
IronNetInjector can use an IronPython scripts to load a .NET injector to inject a payload into its own or a remote process.[39] |
S0044 | JHUHUGIT |
JHUHUGIT performs code injection injecting its own functions to browser processes.[40][41] |
S0201 | JPIN |
JPIN can inject content into lsass.exe to load a module.[42] |
G0094 | Kimsuky |
Kimsuky has used Win7Elevate to inject malicious code into explorer.exe.[43] |
S0681 | Lizar | |
S1059 | metaMain |
metaMain can inject the loader file, Speech02.db, into a process.[45] |
S0084 | Mis-Type |
Mis-Type has been injected directly into a running process, including |
S1122 | Mispadu |
Mispadu's binary is injected into memory via |
S0247 | NavRAT |
NavRAT copies itself into a running Internet Explorer process to evade detection.[49] |
S0198 | NETWIRE |
NETWIRE can inject code into system processes including notepad.exe, svchost.exe, and vbc.exe.[50] |
S1100 | Ninja |
Ninja has the ability to inject an agent module into a new process and arbitrary shellcode into running processes.[51][52] |
C0013 | Operation Sharpshooter |
During Operation Sharpshooter, threat actors leveraged embedded shellcode to inject a downloader into the memory of Word.[53] |
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.[54] |
S0664 | Pandora |
Pandora can start and inject code into a new |
S1050 | PcShare |
The PcShare payload has been injected into the |
G0068 | PLATINUM |
PLATINUM has used various methods of process injection including hot patching.[42] |
S0378 | PoshC2 |
PoshC2 contains multiple modules for injecting into processes, such as |
S0650 | QakBot |
QakBot can inject itself into processes including explore.exe, Iexplore.exe, Mobsync.exe., and wermgr.exe.[58][59][60][61][62] |
S0332 | Remcos |
Remcos has a command to hide itself through injecting into another process.[63] |
S0496 | REvil |
REvil can inject itself into running processes on a compromised host.[64] |
S0240 | ROKRAT |
ROKRAT can use |
S0446 | Ryuk |
Ryuk has injected itself into remote processes to encrypt files using a combination of |
S0596 | ShadowPad |
ShadowPad has injected an install module into a newly created process.[67] |
G0091 | Silence |
Silence has injected a DLL library containing a Trojan into the fwmain32.exe process.[68] |
S0692 | SILENTTRINITY |
SILENTTRINITY can inject shellcode directly into Excel.exe or a specific process.[69] |
S0633 | Sliver |
Sliver can inject code into local and remote processes.[70][71] |
S0533 | SLOTHFULMEDIA |
SLOTHFULMEDIA can inject into running processes on a compromised host.[72] |
S0226 | Smoke Loader |
Smoke Loader injects into the Internet Explorer process.[73] |
S0380 | StoneDrill |
StoneDrill has relied on injecting its payload directly into the process memory of the victim's preferred browser.[74] |
G1018 | TA2541 |
TA2541 has injected malicious code into legitimate .NET related processes including regsvcs.exe, msbuild.exe, and installutil.exe.[75][76] |
S0266 | TrickBot |
TrickBot has used |
S0436 | TSCookie |
TSCookie has the ability to inject code into the svchost.exe, iexplorer.exe, explorer.exe, and default browser processes.[78] |
G0010 | Turla |
Turla has also used PowerSploit's |
S0670 | WarzoneRAT |
WarzoneRAT has the ability to inject malicious DLLs into a specific process for privilege escalation.[80] |
S0579 | Waterbear |
Waterbear can inject decrypted shellcode into the LanmanServer service.[81] |
S0206 | Wiarp |
Wiarp creates a backdoor through which remote attackers can inject files into running processes.[82] |
S0176 | Wingbird |
Wingbird performs multiple process injections to hijack system processes and execute malicious code.[83] |
G0102 | Wizard Spider |
Wizard Spider has used process injection to execute payloads to escalate privileges.[84] |
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.[85] |
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. [86] |
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 |
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.[92] |
||
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. |