A simple Windows DLL injector that uses the classic CreateRemoteThread + LoadLibrary technique. It can inject a DLL into a target process specified by PID or by process name, and also list running processes.
- Inject DLL by PID (
-p) or by process name (-n) - List all running processes with their names and PIDs (
-l) - Clean and modular C++ code (separate files for injection logic, process utilities and CLI parsing)
- Windows (or Wine for testing on Linux)
- MinGW‑w64 (for cross‑compilation) or MSVC (Visual Studio)
injector.exe [options]| Option | Description |
|---|---|
-l, --list |
List all running processes (PID and name) and exit. |
-p, --pid <PID> |
Inject into the process with the specified PID. |
-n, --name <name> |
Inject into the first process with the given name (e.g. notepad.exe). |
-d, --dll <path> |
Full path to the DLL to be injected. |
If no arguments are given, the program shows the help and a process list.
DLL-Injector/
├── .gitignore
├── README.md
├── Makefile
└── src/
├── main.cpp
├── injector.h
├── injector.cpp
├── process_utils.h
└── process_utils.cpp
injector.*– DLL injection logicprocess_utils.*– process enumeration and name lookupmain.cpp– command‑line interface
- The injected DLL must match the architecture (32/64‑bit) of the target process.
- Some processes are protected (e.g. system processes, games with anti‑cheat) and will refuse injection.
- Antivirus software may flag this tool as suspicious – that's expected.