Advanced Python DLL Injector
Made by Hardik — github.com/ewwhardik
| Feature | Description |
|---|---|
| Process List | Live scan with search, filter by mode (All / Windowed / 64-bit / 32-bit / Games) |
| Multi-DLL Injection | Queue multiple DLLs, enable/disable each individually |
| Drag & Drop | Drop DLL files directly onto the queue panel |
| 5 Injection Methods | Standard, LdrLoadDll Stub, LdrpLoadDll Stub, Thread Hijacking, Manual Map |
| Stealth Inject | Routes through ntdll to avoid CreateRemoteThread detection |
| DLL Scrambling | Copies DLL to a randomised temp filename before injection |
| Auto-Inject | Watches for a target process name and injects automatically on launch |
| Step-by-Step | Pauses for confirmation between each injection step |
| Close on Inject | Automatically exits the tool after successful injection |
| 64-bit Support | Full x64 shellcode for 64-bit target processes |
| Un-inject | FreeLibrary on a named module in any process |
| Execute Export | Call a named exported function after injection |
| Injection History | View all past injection results in-session |
| Debug Console | Live log viewer wired to Python's logging framework |
| Error Debugging | Full traceback capture and display for every failure |
# 1. Clone
git clone https://github.com/ewwhardik/weinject-dll
cd weinject-dll
# 2. Install dependencies
pip install customtkinter psutil Pillow darkdetect
# 3. Run (Windows recommended; demo mode on other platforms)
python main.py- Python 3.10+
- Windows 10/11 x64 (for actual injection)
customtkinter,psutil(pip install)- Administrator privileges recommended
The classic method. Allocates memory in the target, writes the DLL path, then calls LoadLibraryA via CreateRemoteThread.
Calls ntdll!LdrLoadDll instead of kernel32!LoadLibraryA via a custom x64 shellcode stub. Avoids the LoadLibraryA hook that many anti-cheats patch.
Pattern-scans ntdll in-process for the internal (non-exported) LdrpLoadDll function, then calls it directly. The most stealthy of the thread-based methods.
- Enumerates threads of the target process
- Suspends the first thread
- Saves the current
RIP - Overwrites RIP with a shellcode stub that calls
LoadLibraryA - Restores the original RIP on completion
Full PE manual mapper:
- Reads and parses the DLL's PE headers
- Allocates
SizeOfImagebytes in the remote process - Maps headers + sections manually
- Applies base relocations (Delta patching)
- Resolves the import table (IAT fixing)
- Calls
DllMainvia remote thread
The test_dll/ directory contains a test payload that displays a MessageBox on injection.
cd test_dll
python build_dll.py| Name | Description |
|---|---|
Initialize |
Shows a "Export executed" MessageBox |
SayHello |
Shows a hello MessageBox |
GetVersion |
Returns version string |
sudo apt install mingw-w64
python test_dll/build_dll.pyWeInjectDLL/
├── main.py # GUI application entry point
├── injection_engine.py # All injection logic (5 methods + stealth + uninject)
├── process_scanner.py # Process enumeration with psutil / WinAPI fallback
├── README.md
└── test_dll/
├── test_payload.c # Test DLL source (C)
└── build_dll.py # Build helper script
- Launch
python main.py(as Administrator for full access) - Select a process from the Process List on the left
- Add DLL(s) via
+ Addor drag & drop into the queue panel - Configure options in the right panel:
- Choose an injection method
- Toggle Stealth, Scrambling, Auto-Inject, etc.
- Click 💉 INJECT
- Watch the progress dialog and injection log
This tool is provided for educational purposes and authorized security research only.
Do not inject DLLs into processes you do not own or have explicit permission to modify.
The author assumes no responsibility for misuse.
Made by Hardik — github.com/ewwhardik
