Adversaries may inject malicious code into suspended and hollowed processes in order to evade process-based defenses. Process hollowing is a method of executing arbitrary code in the address space of a separate live process.
Process hollowing is commonly performed by creating a process in a suspended state then unmapping/hollowing its memory, which can then be replaced with malicious code. A victim process can be created with native Windows API calls such as CreateProcess
, which includes a flag to suspend the processes primary thread. At this point the process can be unmapped using APIs calls such as ZwUnmapViewOfSection
or NtUnmapViewOfSection
before being written to, realigned to the injected code, and resumed via VirtualAllocEx
, WriteProcessMemory
, SetThreadContext
, then ResumeThread
respectively.[1][2]
This is very similar to Thread Local Storage but creates a new process rather than targeting an existing process. This behavior will likely not result in elevated privileges since the injected process was spawned from (and thus inherits the security context) of the injecting process. However, execution via process hollowing may also evade detection from security products since the execution is masked under a legitimate process.
ID | Name | Description |
---|---|---|
S0331 | Agent Tesla |
Agent Tesla has used process hollowing to create and manipulate processes through sections of unmapped memory by reallocating that space with its malicious code.[3] |
S0373 | Astaroth |
Astaroth can create a new process in a suspended state from a targeted legitimate process in order to unmap its memory and replace it with malicious code.[4][5] |
S0344 | Azorult |
Azorult can decrypt the payload into memory, create a new suspended process of itself, then inject a decrypted payload to the new process and resume new process execution.[6] |
S0128 | BADNEWS |
BADNEWS has a command to download an .exe and use process hollowing to inject it into a new process.[7][8] |
S0234 | Bandook |
Bandook has been launched by starting iexplore.exe and replacing it with Bandook's payload.[9][10][11] |
S0534 | Bazar |
Bazar can inject into a target process including Svchost, Explorer, and cmd using process hollowing.[12][13] |
S0127 | BBSRAT |
BBSRAT has been seen loaded into msiexec.exe through process hollowing to hide its execution.[14] |
S0154 | Cobalt Strike |
Cobalt Strike can use process hollowing for execution.[15][16] |
S0354 | Denis |
Denis performed process hollowing through the API calls CreateRemoteThread, ResumeThread, and Wow64SetThreadContext.[17] |
S0567 | Dtrack |
Dtrack has used process hollowing shellcode to target a predefined list of processes from |
S0038 | Duqu |
Duqu is capable of loading executable code via process hollowing.[19] |
G0078 | Gorgon Group |
Gorgon Group malware can use process hollowing to inject one of its trojans into another process.[20] |
S0189 | ISMInjector |
ISMInjector hollows out a newly created process RegASM.exe and injects its payload into the hollowed process.[21] |
S0447 | Lokibot |
Lokibot has used process hollowing to inject itself into legitimate Windows process.[22][23] |
G0045 | menuPass |
menuPass has used process hollowing in iexplore.exe to load the RedLeaves implant.[24] |
S0198 | NETWIRE |
The NETWIRE payload has been injected into benign Microsoft executables via process hollowing.[25][26] |
S0229 | Orz |
Some Orz versions have an embedded DLL known as MockDll that uses process hollowing and Regsvr32 to execute another payload.[27] |
G0040 | Patchwork |
A Patchwork payload uses process hollowing to hide the UAC bypass vulnerability exploitation inside svchost.exe.[28] |
S0650 | QakBot |
QakBot can use process hollowing to execute its main payload.[29] |
S0226 | Smoke Loader |
Smoke Loader spawns a new copy of c:\windows\syswow64\explorer.exe and then replaces the executable code in memory with malware.[30][31] |
G0027 | Threat Group-3390 |
A Threat Group-3390 tool can spawn svchost.exe and inject the payload into that process.[32][33] |
S0266 | TrickBot |
TrickBot injects into the svchost.exe process.[34][35][36][37] |
S0386 | Ursnif |
Ursnif has used process hollowing to inject into child processes.[38] |
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. |
ID | Data Source | Data Component |
---|---|---|
DS0009 | Process | OS API Execution |
Process Access | ||
Process Modification |
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
, and those that can be used to modify memory within another process, such as VirtualAllocEx
/WriteProcessMemory
, may be used for this technique.[2]
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.