Programs for editing memory in user space

How do programs that change the memory of other processes, such as the Cheat Engine and iHaxGamez, work? My understanding is that the process of reading (not to mention writing) the memory of another process is the direct basis for the segmentation error.

+4
source share
4 answers

Gaining access to other process memory under Linux is fairly simple (assuming you have sufficient user privileges).

For example, the file /dev/mem will provide access to the entire processor memory. Details of the mappings for a particular process can be found in /proc/<pid>/maps .

Another example is given here below.

+5
source

The abstraction layer of the operating system hardware system usually offers functions for managing the memory of other processes. On Windows, the corresponding functions are ReadProcessMemory and WriteProcessMemory .

+2
source

He has no reason for segfault; OS (kernel, ...) API is used for writing. Segfault occurs (receives a signal) from the OS when a process tries to access its own memory in bad mode (char [] overflow).

About games: well, if the value is stored at the address and is sometimes read, then it can be changed until the next reading.

+2
source

You can use WinAPI WriteProcessMemory to write to the memory space of another process.

Also read the PE / COFF documentation and use VirtualQueryEx and ReadProcessMemory to find out what and where to write.

0
source

All Articles