PyInjector - Inject python-code into any python process or spawn interactive python-shell inside the target process. Based on PyInjector by @call-042PE
- Write the code you want to inject into a file called code.py and place it in the same folder of the software you want to inject it (in the current folder of this software).
- Inject the PyInjector_x64.dll / PyInjector_x86.dll into the target process using Process Hacker or any other DLL injection tool.
You can also write the code directly in the DLL and recompile it or modify python code inside PyInjector_x??.dll in your favorite binary editor.
This project is made for reverse-engineer and malware analyst, the main aspect of this project is to reverse-engineer any python script/executable easily.
I put some usefull script in the py-code-examples/ folder that can be used to reverse-engineer any script (even with pyarmor).
Spawning interactive python shell in the any python process is easy - just inject PyInjector_x64_shell.dll / PyInjector_x86_shell.dll DLL in the target process. It should be enough to see interactive console window with python shell.
You can spawn interactive python shell even in GUI applications.
Requirements:
- OS: Windows XP or later.
- Target process must use Python x86/x64 3.7, 3.8, 3.9, 3.10, 3.11.
In this video @call-042PE is unpacking a function in a pyarmor protected script with PyInjector.