Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

SPYthon - Inject a python interpreter in remote processes

To hell fancy presentation!!!
  • You can find the project on github: https://github.com/dberube4/SPYthon

  • It uses "DO WHAT THE FUCK YOU WANT TO " public license

  • The entire source is written in C (even if github think it's c++).



Code
Have you ever wanted to inject a python interpreter in a process?

If yes, this project may interest you. SPYthon is a Dynamic-link library that bind a python interpreter to another process, enabling you to play with the injected process memory interactively.

When injected, spython allocate a console (if needed) and wait for you to input some code. The console act almost like a normal python interpreter.

Even better, if injected in another python process using the same interpreter, it pause the main thread and let you access the original program "main" from the console. You can always pause SPYthon to let the original thread continue.

The repo also include a dll injector under utilities (as a plain .py file), if you need one.

I also want to add a memory scanner and a C interpreter (which will map to python ctypes).
When I will find will to code this is a good question.

An example:
[Image: CE_tut.PNG]
All of your files are cpp, of course it's going to think it's C++ lol. But nice project, I'll take a full look when I get home.
I know! it's just... :)

Oh yeah, for people not experienced with ctypes, there is always pywin32 ( http://sourceforge.net/projects/pywin32/ ) which offer a great high level api.
And there is also pyASM (a dynamic asm compiler) http://codeflow.org/entries/2009/jul/31/...assembler/ . Although the code looks very old and will most likely not work with spython without some modifications.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by ByteDoktorFeb 26, 2025 01:24 PM 0 147 Feb 26, 2025 01:24 PM
Last Post: ByteDoktor
[Python] by Bass_ReevesAug 20, 2023 01:44 AM 9 632 Aug 20, 2023 01:44 AM
Last Post: Lucky4L
[Python] by Too FarAug 20, 2021 11:24 AM 2 178 Aug 20, 2021 11:24 AM
Last Post: Sajuuk