Memory of another process

Linux specific forum
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 151
Joined: Thu Dec 28, 2023 9:04 pm

Memory of another process

Post by rndrei »

How to read the memory of another process?
It doesn't work!

Code: Select all

*buffer = $004005
If *buffer
  value = PeekB(*buffer + 9)
  MessageRequester("read memmory " , Str(value)) 
  FreeMemory(*buffer)
Else
  MessageRequester("error","not work")
EndIf
User avatar
NicTheQuick
Addict
Addict
Posts: 1503
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Memory of another process

Post by NicTheQuick »

Of course it doesn't work. You don't have the permissions to access the memory of another application. Also pointers are no absolute values but virtual ones. Just because you know the memory location of a certain value in one application, does not mean that you can use that same memory location inside another process to access the same value. There are so much things in place, beginning with address space layout randomization (ASLR) and virtual address spaces.

To get access to the memory of another process you first need to be root or an administrator on Windows, and then you first have to call an API to get access to another processes virtual address space, then you have to map your local memory addresses to the other processes memory locations using an API. And then you may can do what you want to do.

It's highly dependent on the operating system you're using.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Memory of another process

Post by Fred »

We don't support such question here due to avoid help malware written in PureBasic.
Locked