A lightweight C# DLL injector supporting single injection and automatic injection into newly created processes.
- C# 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| Properties | ||
| .gitignore | ||
| App.config | ||
| app.manifest | ||
| ce11354d-f899-4cdd-be33-22e7d6aa2f6c-removebg-preview.ico | ||
| LICENSE.md | ||
| LightweightDllInjector.csproj | ||
| LightweightDllInjector.sln | ||
| Memory.cs | ||
| Program.cs | ||
| README.md | ||
🧬 LightweightDllInjector
A lightweight command-line DLL injector for Windows.
Inject into a running process once, or monitor and auto-inject into newly spawned processes.
Educational and research purposes only.
✨ Features
- Inject once into an existing process
- Auto-inject into every new instance of a chosen process
- Target process by name (without
.exe) or by PID - Configurable delay before injection
- Optional wait for a window with a specific title
- Debug output for troubleshooting
- Simple, single-file CLI – no dependencies beyond .NET
⚙️ Requirements
- Windows
- .NET Runtime (4.7.2+ / .NET 6+)
- Administrator privileges for elevated targets
🚀 Quick start
lwdi.exe --inject-once notepad "C:\path\payload.dll"
📖 Full usage
lwdi.exe [--inject-once|--auto-inject] <process> <dll_path> [options]
| Option | Description |
|---|---|
--delay <ms> |
Delay before injection in milliseconds (default: 500) |
--window-title <title> |
Wait for a window with the given title to appear |
--debug-info |
Print detailed injection steps and error info |
--help |
Display built-in help |
<process> – process name (without .exe) or PID.
<dll_path> – path to the DLL.
🧭 Actions
--inject-once
Injects the DLL into a currently running process.
--auto-inject
Continuously watches for new matching processes and injects automatically.
🔍 Examples
lwdi.exe --inject-once notepad my.dll
lwdi.exe --inject-once 4321 payload.dll --delay 1500
lwdi.exe --auto-inject game "C:\DLLs\cheat.dll" --window-title "Game Main"
lwdi.exe --inject-once notepad test.dll --debug-info
🛠 Building
git clone https://github.com/pavelkalas/LightweightDllInjector.git
Open LightweightDllInjector.sln in Visual Studio and build the solution.
⚠️ Notes
- Run as Administrator when required.
- Do not inject into critical system processes.
- Intended for learning, debugging, reverse engineering and security research.
📜 License
Personal, educational and research use permitted. Commercial use requires prior written permission.
v1.1 — Pavel Kalaš