Universal Windows DLL injector. Safety-first LoadLibraryW injection with PE
validation, architecture checks, already-loaded detection, eject mode, and
structured colorized logs.
Built for legitimate use: debugging, modding, instrumentation, plugin loading, and security research on systems you own or are authorized to test. Do not use to bypass anti-cheat, EULAs, or to target software or systems you do not have permission to instrument.
- PE validation β verifies the file is a real PE, is a DLL, and detects its architecture before doing anything to the target.
- Architecture matching β refuses to inject an x86 DLL into an x64 process
(or vice versa) unless
--forceis given. ARM64 supported. - Already-loaded detection β won't double-inject the same module by name.
- Eject mode β
--eject <module>callsFreeLibraryremotely to cleanly unload a previously injected DLL. - Wait-for-process β
--waitpolls until the target appears, with optional--timeout. - Process listing β
--list [filter]enumerates running processes. - Dry run β
--dry-runperforms every check without touching the target. - Structured logs β millisecond timestamps, level tags, ANSI colors,
optional
--log file.txt. - Privilege upgrade β best-effort
SeDebugPrivilegewhen run elevated. - No external dependencies β single executable, links only Windows SDK.
- Both x86 and x64 builds β match the bitness of your target.
Open Injectra.sln and build any of: Debug|Release Γ Win32|x64.
cmake -S . -B build
cmake --build build --config ReleaseOutput: build/x64/Release/injectra.exe (msbuild) or
build/Release/injectra.exe (cmake).
injectra --dll <path> [--proc <name> | --pid <id>] [options]
injectra --eject <module> [--proc <name> | --pid <id>] [options]
injectra --list [filter]
# Inject by process name
injectra --dll C:\mods\my.dll --proc notepad.exe
# Wait for the process to start (max 60s), log to file
injectra --dll mod.dll --proc game.exe --wait --timeout 60 --log run.log
# Inject by PID
injectra --dll mod.dll --pid 12345
# Eject a previously-loaded DLL
injectra --eject mod.dll --pid 12345
# List Chrome processes
injectra --list chrome
# Validate without touching the target
injectra --dll mod.dll --proc notepad.exe --dry-run --verbose| Flag | Description |
|---|---|
--dll <path> |
DLL to inject |
--proc <name> |
Target process name |
--pid <id> |
Target by PID |
--eject <module> |
Free a module from the target |
--list [filter] |
List processes (optional substring filter) |
--wait |
Wait for the target to appear |
--timeout <sec> |
Timeout for --wait (0 = infinite) |
--dry-run |
Validate everything, don't inject |
--force |
Skip safety checks (arch, already-loaded) |
--verbose |
Debug-level logging |
--quiet |
Errors only |
--no-color |
Disable ANSI colors |
--no-banner |
Hide startup banner |
--log <file> |
Append logs to file |
--pause |
Pause before exit (handy for double-click) |
-h, --help |
Show help |
-v, --version |
Show version |
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Injection / eject failed at runtime |
2 |
Argument or pre-flight validation error |
Standard CreateRemoteThread + LoadLibraryW injection, with extra checks:
- Parse and validate the DLL's PE headers from disk (DOS + NT signatures,
machine type,
IMAGE_FILE_DLLflag). OpenProcesswith the minimum rights needed; bail if denied.IsWow64Process2to determine the target's effective arch and refuse a mismatched DLL unless--force.EnumProcessModulesExto detect an already-loaded module of the same base name.VirtualAllocExaPAGE_READWRITEbuffer,WriteProcessMemorythe full wide-char path, thenCreateRemoteThreadonLoadLibraryW.- Wait up to 15 seconds for the remote thread, free remote memory, report the
returned
HMODULE.
Eject mirrors this: locate the module in the target, then
CreateRemoteThread on FreeLibrary with that handle.
- Some processes refuse
OpenProcesseven from Administrator (protected processes, anti-cheat, AV self-protection). Injectra surfaces the Win32 error code; it does not attempt evasion. --forceskips safety checks but cannot fix an actual arch mismatch β the remoteLoadLibraryWwill still fail.- Run from a console matching the target's bitness when in doubt
(
x64injector forx64targets).
MIT β see LICENSE.