C++: How do applications like Cheat Engine and ArtMoney work?

末鹿安然 提交于 2020-01-01 08:37:09

问题


After asking this question (C++: Can I get out of the bounds of my app’s memory with a pointer?),
I decided to accept it isn't possible to modify other app's memory with pointers (with a modern OS).

But if this isn't possible, how do programs like ArtMoney and CheatEngine work?

Thanks


回答1:


Check these functions: ReadProcessmemory WriteProcessmemory




回答2:


It is possible to read process memory on Windows. There is a function, called ReadProcessMemory in kernel32.dll: http://msdn.microsoft.com/en-us/library/ms680553(v=VS.85).aspx

This is used by most applications that change memory of other applications. It can also be used to communicate between two processes (though mostly not recommended).

CheatEngine is a debugger with a non-traditional interface.




回答3:


Just to give a plain simple explanation - dump / hot search the process memory for specified value and modify it. You can do it using some plain WinAPI functions or using some native API routines (I suppose so).

That's obviously the reason why they fail, for example, if game state is stored with some encryption. That's also the reason you would need to change your value several times and then make your search again (to avoid search collisions, because definitely different memory blocks could hold the same value).



来源:https://stackoverflow.com/questions/2976246/c-how-do-applications-like-cheat-engine-and-artmoney-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!