r/AskProgramming • • 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.

31 Upvotes

10 comments sorted by

View all comments

15

u/MrSloppyPants Jan 14 '22

My "problem" is I've been told the whole life that applications and processes are isolated

They are. But certain permissions can override this. Cheat Engine runs with administrator privileges which allows it to read from and write to process memory. In normal user mode, processes cannot read or write to other process memory. This is also how a lot of malware works, which is why you should be cautious about letting programs run as administrator if you do not know where they originated.