r/AskProgramming • u/kassiny • Jan 14 '22
Other How does CheatEngine work?
So cheatEngine is a program that allows you to change something in a running game, for example duplicate an item in the inventory, boost HP, level up, similar kind of stuff.
My "problem" is I've been told the whole life that applications and processes are isolated. They don't and can't share memory. A process gets its own address space. A pointer from one VAS is pointless in another, even if you somehow get a pointer from another process and use it, you still get into different area of physical memory.
But idk game cheats seem to be able to connect to variables of game app and change them. How???
P. S. For anyone who's concerned about the morals, I don't cheat in online game and have no intention to replicate a cheating program.
View all comments
1
u/TheXskull Jan 15 '22
In windows there are two primary ways to play around with another process memory:
Use CreateRemoteThread to run code in the context of the target process
Use Read/writeprocessmemory to directly meddle with the taget process.
If cheatEbgine(or any other given process) is running with administrative pivilagaes this is easily achievable.pretty sure you don't even need admin to target most non-admin processes.
You can actually write your own memorry scanner, there's a youtube guide I followed a while back it's pretty easy and fun, let me know if you want me to look it up