Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User-space memory editing programs

How do programs that edit memory of other processes work, such as Cheat Engine and iHaxGamez? My understanding is that a process reading from (let alone writing to) another process' memory is immediate grounds for a segmentation fault.

like image 966
Delan Azabani Avatar asked Jan 21 '23 04:01

Delan Azabani


2 Answers

Gaining access to another processes memory under linux is fairly straightforward (assuming you have sufficient user privileges).

For example the file /dev/mem will provide access to the entire memory space of cpu. Details of the mappings for an individual process can be found in /proc/<pid>/maps.

Another example has been given here.

like image 178
Andrew Edgecombe Avatar answered Jan 28 '23 21:01

Andrew Edgecombe


The operation system's hardware abstraction layer usually offers functions to manipulate the memory of other processes. In Windows, the corresponding functions are ReadProcessMemory and WriteProcessMemory.

like image 34
Jim Brissom Avatar answered Jan 28 '23 19:01

Jim Brissom