Process Injection (T1055)
The Holy Grail of Evasion. If I live inside explorer.exe, I am explorer.exe.
1. DLL Injection (CreateRemoteThread)
The classic method.
- OpenProcess: Get a handle to target (e.g., Notepad).
- VirtualAllocEx: Allocate memory in Notepad.
- WriteProcessMemory: Write the path
C:\evil.dll. - CreateRemoteThread: Call
LoadLibraryAin Notepad to load that DLL.
- Detection: Very High (Sysmon Event ID 8).
2. Process Hollowing
- Start a legitimate process (
svchost.exe) in Suspended Mode. - Unmap (Hollow out) its memory.
- Write your malicious code into its memory.
- Resume Thread.
- Result: The process looks like
svchost.exein Task Manager, but runs your code.
3. Thread Execution Hijacking
- Suspend a running thread in a target process.
- Get Thread Context (CPU registers).
- Change
RIP(Instruction Pointer) to point to your shellcode. - Resume Thread.
4. Reflective DLL Injection
Loading a DLL from memory without it ever touching the disk.
- Manual Mapping: The DLL handles its own imports and relocations.