Creating a program, see In another program memory

There are tools like TSearch, Cheat Engine, etc. These are hacking programs for viewing and changing parts of the memory of another program.

If I create a C ++ program that can see and change another program memory, how can I do this? What are some of the things I should look for?

+4
source share
2 answers

This is not a C ++ function, it is managed by the OS itself.

For example, Windows provides a call to the ReadProcessMemory () API so that you can get your dirty little hands into the memory of another process. And, of course, the equivalent for writing so you can do even more damage :-)

It all depends on having the right privileges.

I'm not sure how Linux provides this, but earlier UNIX files had memory mapping files, such as /dev/mem , so you could get in memory. In the procfs file system, there may be an option for each process that can give you access to the virtual memory of a specific process. This would be the first place I would begin to search, although others here would no doubt know more about it than I do.

+7
source

One way to do this is to write your own debugger .

However, it will not be easy. Good luck.
+2
source

Source: https://habr.com/ru/post/1332659/


All Articles