Malware Analysis

PROCESS INJECTION

Comprehensive overview of process injection techniques including DLL injection, process hollowing, APC injection, and thread execution hijacking.

Contents

Process injection = the #1 most common technique used by modern Windows malware to hide itself inside a legitimate process.

Instead of running as its own obvious malicious evil.exe, the attacker forces a trusted process (e.g. explorer.exe, svchost.exe, msedge.exe, lsass.exe, etc.) to execute the malicious code. From the outside, everything looks normal — Task Manager, EDR, antivirus only see a legitimate process using a bit more memory or network.

Why attackers do it (the real reasons in 2025)

GoalHow injection helps
Evade AV/EDRLegitimate process → often whitelisted
Steal tokens & escalate privilegesInject into lsass → dump credentials
Survive reboots & hideLive only in memory, nothing on disk
Bypass allow-listsnotepad.exe or Microsoft-signed binary now runs evil code
Hide network trafficC2 comes from chrome.exe or svchost.exe

Top 8 Process Injection Techniques You Will See Daily (2025 ranking)

#TechniqueHow it works (very short)Most common malware using it (2025)Difficulty to detect
1Classic DLL InjectionVirtualAllocEx → WriteProcessMemory → CreateRemoteThread (LoadLibrary)Lumma, RedLine, SmokeLoader, most stealersLow–Medium
2Process Hollowing (RunPE)Start legitimate exe suspended → unmap → write malicious PE → resumeQakbot, TrickBot, Bumblebee, Dridex forksMedium
3Reflective DLL InjectionMalicious DLL has no LoadLibrary, it injects & executes itself in memoryCobalt Strike, Brute Ratel, most red-team toolsHigh
4Process DoppelgängingAbuse NTFS transactions to load malicious PE without touching diskRare in commodity, some APTVery High
5Thread Execution HijackingSuspend legitimate thread → hollow its context → resume with malicious codeEmotet (old), some private cryptersHigh
6APC InjectionQueue APC (asynchronous procedure call) to thread in target processAsyncRAT, many .NET stealersMedium
7EarlyBird APC InjectionQueue APC while process is still suspended (before main thread runs)Newer stealers & loadersHigh
8Direct Syscalls + NtMapViewOfSectionMap malicious section into another process (bypasses most EDR hooks)Sliver, modern Cobalt forks, high-end malwareVery High

The Classic DLL Injection Step-by-Step (the one you see 50× per week)

  1. Open target process (OpenProcess or NtOpenProcess)
  2. Allocate memory in target (VirtualAllocEx)
  3. Write malicious DLL path or shellcode (WriteProcessMemory)
  4. Force target to load/run it (CreateRemoteThread → LoadLibrary or shellcode address)
  5. Malicious code now runs inside explorer.exe, svchost.exe, etc.

How to spot it instantly in your lab (2025)

ToolWhat you look for
PE-bear / CFFImports: VirtualAllocEx, WriteProcessMemory, CreateRemoteThread
x64dbgBreakpoints on those APIs → see if process handle ≠ itself
ProcMonProcess = explorer.exe doing WriteProcessMemory or LoadImage on weird DLL
Process HackerRight-click process → “Memory” tab → look for RX + W pages (shellcode) or weird DLLs
HollowsHunter / PE-sieveAutomatically flags hollowed processes & injected sections
Moneta / HuntSysmon Event ID 8 (CreateRemoteThread) + Event ID 10 (memory access)

Quick verdict checklist (when you see a new sample)

You see these imports →Verdict
VirtualAllocEx + WriteProcessMemory + CreateRemoteThread99% injection
Only Nt* versions of the aboveAdvanced injection (direct syscalls)
No suspicious imports but high network from svchost.exeReflective / memory-only injection