PDA

View Full Version : Accessing other app's memory


JesusCyborg
06-30-2004, 01:40 AM
I need to write an application that can read the raw memory allocated by a specific other application. Can anyone point me in the right direction of what WinAPI functions, or whatever, I'd need to do this?

stuka
06-30-2004, 08:25 AM
Not sure you can do this - the OS should explicitly prevent it. Obviously the OS has access to this, but not sure how one would go about achieving that access at all. Of course, if you have access to the source for both apps, you MAY be able to do it with shared memory, but I'm completely clueless regarding shared memory in Windows.

php_brian
06-30-2004, 01:39 PM
There is a .DLL that works along side Microsoft Flight Simulator that reads memory addresses that is allocated for the simulator. Allowing a developer to access specific flight data as the pilot flies. There is a SDK at http://www.schiratti.com/dowson.html that reads memory addresses under a specific handle or program. I'm kinda clueless on how it works, but all I know is that source is available for it and you can play with that.

JesusCyborg
07-01-2004, 12:15 AM
php_brian, i went to that page and searched for the word "memory". I didn't get anything. What is the sdk named?

It is possible to memory hack other applications because there are programs like Poke, and debuggers. The way windows is setup is so that application memory is put in pages. There are pages for memory, code, etc. that can be set as read only and only accessible by certain apps to avoid damage from renegade pointers. These locks can be turned off intentionally some how and windows can give you addresses of pages being used by other apps. I just need to know how to dive in to these pages.

php_brian
07-01-2004, 12:34 AM
The SDK is named FSUIPC SDK 20th Release. Download that and it contains many compressed files that are for specific languages allowing you to explore how to access memory of a program in many languages. I do want to note that this SDK isn't really for learning how to access other program's memory allocation, but just happens uses that method to accomplish its task. The only problem I am seeing that might prevent some things is that the FSUIPC DLL is required to use the SDK and that source is not available.

stuka
07-01-2004, 10:18 AM
Don't know 'bout Poke, but most debuggers launch the process from within themselves which gives you a lot more control of the child process' memory address space.

Whiteknight
07-01-2004, 10:23 PM
i have two ideas about how to go about doing this, but i'm not sure either would work. given a sending program(or target program), and a receiving (or reading) program:

1) if you have the source for both programs, open a pipe between them, and have the target program send pointers of the information you want to the receiving program

2) have the receiving program run the target program as a sub-process or something.

stuka
07-05-2004, 11:51 AM
1) Pointers from one process's address space are NOT valid in another's address space.

2) That's what I was hinting at above.