A comprehensive toolkit for process reverse engineering:
- Stealth DLL Injector - Reflective injection with thread hijacking
- Helper DLL - Dumps decrypted memory + extracts ALL offsets automatically
gcc -O2 -o injector.exe injector.c
gcc -O2 -shared -o helper.dll helper_dll.c
gcc -O2 -mwindows -o injector_gui.exe injector_gui.c -lcomctl32 -lcomdlg32Or simply run the provided batch file:
compile.bat| File | Description |
|---|---|
injector.exe |
CLI injector — run from command line |
helper.dll |
Stealth helper DLL — loaded reflectively |
injector_gui.exe |
Simple GUI launcher — browse for a target .exe and inject with one click |
- Place
injector.exeandhelper.dllin the same directory - Run as Administrator
- Execute:
.\injector.exe ourprocess.exe - Wait 2 minutes - the helper DLL will:
- Track TLS callbacks
- Decrypt and dump all memory
- Extract ALL offsets (functions + globals)
- Create output files in our target process directory
Reflective DLL Injection:
- Manual PE loading without
LoadLibrary - No entry in process module list
- PE sections written individually
- Relocations processed manually
- Imports resolved manually
- Memory zeroed after injection
Thread Hijacking:
- No new thread creation (avoids
CreateRemoteThreaddetection) - Selects existing worker thread with low CPU time
- Suspends thread, modifies RIP register, resumes
- Uses
NtAlertThreadto ensure execution
Direct Syscalls:
NtOpenProcess- BypassesOpenProcesshooksNtAllocateVirtualMemory- Direct memory allocationNtWriteVirtualMemory/NtReadVirtualMemory- Direct memory accessNtProtectVirtualMemory- Memory protection changesNtFreeVirtualMemory- Memory cleanupNtOpenThread/NtSuspendThread/NtResumeThread- Thread manipulationNtGetContextThread/NtSetContextThread- Context manipulationNtDelayExecution- Stealth sleep (noSleep()API calls)NtAlertThread- Thread wake-up
Timing Obfuscation:
- RDTSC-based random delays (no
GetTickCount) - Random timing between operations (50-100ms)
- Stealth sleep using
NtDelayExecution
Memory Security:
StealthZeroMemory- Volatile memory zeroing before free- Secure cleanup of DLL buffer after injection
PEB Unlinking:
- Removes DLL from
InLoadOrderModuleList - Removes from
InMemoryOrderModuleList - Removes from
InInitializationOrderModuleList - Invisible to all module enumeration APIs
Direct Syscalls:
NtDelayExecution- Stealth sleepNtAllocateVirtualMemory/NtFreeVirtualMemory- Memory managementNtProtectVirtualMemory- Protection changesNtCreateFile/NtWriteFile/NtClose- File operationsNtQueryVirtualMemory- Memory queriesNtReadVirtualMemory/NtWriteVirtualMemory- Memory access
Spoofed Function Calls:
- Uses process's own
memcpy/RtlMoveMemoryfrom IAT - Triggers auto-decryption for some memory regions
- Avoids detection by using legitimate process functions
Eidolon Bypass:
- Decrypt gadget at RVA 0x1E7040 (pattern:
48 8B 01 C3) - Triggers Eidolon to decrypt
PAGE_NOACCESSpages - Page-by-page processing with forced decryption
- Vectored Exception Handler (VEH) for decryption capture
Hidden File Operations:
NtCreateFilewith HIDDEN + SYSTEM attributes- Files invisible in Explorer by default
- NT path format (
\??\C:\...)
Memory Cleanup:
SecureZeroBuffer- Volatile writes prevent optimization- Memory zeroed before
VirtualFree _ReadWriteBarrier()to prevent compiler optimization
Thread Pool Execution:
- Uses Windows thread pool (
TrySubmitThreadpoolCallback) - Minimal detection footprint
- Asynchronous execution
TLS Callback Tracking:
- Continuous scanning every 10ms for 2 minutes
- Captures callbacks even if they get overwritten
- Tracks up to 64 unique callbacks
- All callbacks preserved in final dump
Import Address Table (IAT) Reconstruction:
- Reads original import descriptors
- Walks PEB module list (no
LoadLibrary) - Resolves function addresses dynamically
- Rebuilds IAT in dump for analysis tools
PE Header Fixing:
PointerToRawData=VirtualAddressSizeOfRawData=VirtualSizeFileAlignment=SectionAlignment- Clears bound import and security directories
- Compatible with IDA Pro and Ghidra
- Windows 10/11 x64 (x86/32-bit not supported)
- Administrator privileges (required to open target processes)
- MinGW-w64 GCC (the code uses GNU inline assembly — MSVC will not work)
- Target process must be running (injector will wait for it)
- Download and run the installer from msys2.org
- Open MSYS2 UCRT64 from the Start Menu
- Update packages and install GCC:
pacman -Syu pacman -S mingw-w64-ucrt-x86_64-gcc
- Add
C:\msys64\ucrt64\binto your System PATH environment variable - Verify the installation:
gcc --version
- Download the latest UCRT runtime GCC package from winlibs.com
- Extract the archive (e.g. to
C:\mingw64) - Add
C:\mingw64\binto your System PATH environment variable - Verify the installation:
gcc --version
winget install --id BrechtSanders.WinLibs.POSIX.UCRT --accept-source-agreementsThis installs WinLibs (POSIX threads, UCRT runtime) — no manual PATH setup needed.
choco install mingw- dont run this
- especially dont run this on an account you want to keep
- this is my first attempt at this, the methods used may be ultra detected. who knows.
- Process continues running normally during capture
- Game remains fully playable
- Dump happens silently in background
- Files created with HIDDEN + SYSTEM attributes
- 2-minute wait ensures complete capture
- this is a WIP, id like to eventually have it be more "fool proof"
- further reversal of the loader.dll