Code Injection

Shellcode as Function

cdb.exe (Debugging Tools for Windows)

Convert raw shellcode to a CDB script:

Run the shellcode in the debugged process:

Linux In-Memory Code Execution

Memory Manipulation with Python

Convert an ELF to PIC, inject it and run from memory:

DDexec

Run binaries from memory without touching the disk:

Another trick to do semi-fileless ELF execution with a pre-created process descriptor:

Tools

Non-Standard GetModuleHandle/GetProcAddress

RtlRemoteCall

DLL Hollowing / Module Stomping

Variations of (Phantom) DLL Hollowing

Advanced Module Stomping

Module Overloading

Module Shifting

Process Stomping

Module Stomping in C#

Function Stomping / Threadless Injection

ThreadlessInject

Thread Pools (PoolParty)

VEH (Vectored Exception Handling)

Early Cascade

Thread Name-Calling Injection

Waiting Thread Hijacking

Control Flow Hijacking (Data Pointers)

Shellcode In-Memory Fluctuation (Obfuscate and Sleep)

gargoyle

Memory Scanners

Return Address / Call Stack Spoofing

Return Address Spoofing

ThreadStackSpoofer

An alternative way to get the nearest return address in current stack frame (besides _ReturnAddressarrow-up-right and _AddressOfReturnAddressarrow-up-right) without manually walking the stack:

Call Stack Spoofing

VulcanRaven

SilentMoonwalk

LoudSunRun

DreamWalkers

Proxy DLL Loading / Legit API Proxying

Hook NtCreateSection

Avoid PsSetCreateThreadNotifyRoutine

ntdll!Ldrp* Shenanigans

EDR Preloading

Shellcode Encryption

SystemFunction032 / SystemFunction033

SystemFunction040 / SystemFunction041

Shellcode Execution via Callbacks

PE to Shellcode

sRDI

Donut

Python

AV / EDR Evasionchevron-right

InflativeLoading

Crystal Palace

PE Injection

Backdoor Legit PE

SuperMega

Detection

Show P/Invoke imports in a .NET assembly with System.Reflection.Metadata and PowerShell Core (stolen from 1arrow-up-right, 2arrow-up-right):

Another methodarrow-up-right with a PowerShell one-liner:

Tools

Last updated