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

Python 

Memory reading and writing

So I've been looking into cheat engine and how it works and was wondering how I could go about writing up a python script that I could attach to a running process that reads from memory, can write to memory, get corresponding hex values and control the EIP. I know most standard debuggers do this but how does it work? What sort of modules are necessary? Any books or resources that could teach me about this?

Bonus question:
Is this how aimbots work in popular fps games? Do they read from memory to get the location of the opponent's head?
if you google "python game hacking" you will find some good guides, check out the counter strike ones. Pywin32, Ctypes, and Pymem, are modules you would probably use.
Thanks mate, cheat engine is extremely versatile, I see that I can get real time memory access to a virtual machine. I plan on reading variables from memory and seeing how I can edit them as well. I wanna see if I can automate a few things with some apps on an android for practice, I know I could just do clicks but I think it would be a lot more sophisticated to read from memory addresses instead. I just can't attach any scripts to cheat engine, so I look to use python in order to get access to and manipulate those variables.
You can use the pymem Python module for this (or even make your own if you're more ambitious), but why Python? You're better off learning C and windows internals.
(Aug 14, 2020 11:44 AM)tsuki Wrote:  You can use the pymem Python module for this (or even make your own if you're more ambitious), but why Python? You're better off learning C and windows internals.

Good point, I was thinking the same thing with regards to C. I'm alright in python with a little experience in C. I've managed already to access as well as write to memory inside of a virtual machine running android. I've been tinkering with pymem all afternoon learning the ins and outs of the various modules. Pymem allows for assembly injection as well but I know C is pretty well suited for that sort of thing.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by nuvexy.Oct 6, 2019 03:13 PM 13 523 Oct 6, 2019 03:13 PM
Last Post: themayonnaiseguy
[C#] by CryptixHackingDec 4, 2018 06:11 PM 6 378 Dec 4, 2018 06:11 PM
Last Post: CryptixHacking
[Python] by RiԁdleMay 4, 2017 05:59 PM 9 332 May 4, 2017 05:59 PM
Last Post: Lambasoft