Reading another program's memory

Started by
20 comments, last by Senses777 20 years, 11 months ago
When reading a process's memory via ReadProcessMemory(HANDLE,LPCVOID lpBaseAddress,LPVOID,DWORD,PDWORD), how am I able to know what the begining of the process's memory is? (for lpBaseAddress param when reading the process's memory) I know they are generally 0x400000, but that is not always the case and it is causing me problems. And problem 2: how do I know how much memory the process is using? Right now I am just attempting to read a very large amount of memory and using the last param to see how much was actually read, but this is crappy because I need to alocate a huge amount of memory, just in case that much will be read, then trim it based on how much was actually read. So, the short version of the question is: How do I get what address a program's memory starts at and How do I know how much memory the program is using Thanks! .sen [edited by - Senses777 on May 6, 2003 12:04:37 AM]
"I want to make a simple MMORPG first" - Fenryl
Advertisement
no one here knows how to get another programs base address or space used? .sen
"I want to make a simple MMORPG first" - Fenryl
You realize, right, that knowing what a program considers its base address will not allow your program to access its memory, right? That''s how virtual memory works.

How appropriate. You fight like a cow.
You don''t understand, I already got access to its memory, I only need to know where it starts and ends. Most programs start at 0x400000, but not all of them. I have successfully read the entire contents of one Process of Mozilla (I have not enumerated Mozilla''s individual processes and got access to all of them, but I could, my point is just that I DO have access to the memory of any process other than [system process] and system.

So, could anyone help me out? .sen
"I want to make a simple MMORPG first" - Fenryl
I think I know why you want to read another program''s memory.
Whats your point? Its not illegal to change and read the memory in my own computer yet is it? I thought this would be fun and interesting. If I was really trying to hack or something, I'd use SoftIce, or another program.

I am also trying to learn how different compilers handle the stack, and other things like that. Now, can anyone help me out? .sen

[edited by - Senses777 on May 7, 2003 5:16:42 AM]
"I want to make a simple MMORPG first" - Fenryl
Depends if you''re trying to code ''l33t exploits'' for an online game to look good whilst spoiling the fun for a thousand other players or not.
lol, dont accuse me of cheating on anything ^^. I am very legit, this is for fun, not so I can be a "1337 h4x0r". Cheating at online games sucks badly.

I am still looking for a way to get the size of a process, and its starting address. I found some sort of functions on msdn but they don''t seem to exist anywhere in their actuall libraries. .sen
"I want to make a simple MMORPG first" - Fenryl
I sense much fear in you, fear leads to anger, anger leads to hate, hate leads to the dark side!
Whats with all the APs?

Anyways, no, I''m not using this to cheat.

Please, I am desperate for an answer here, i cant find it anywhere. .sen
"I want to make a simple MMORPG first" - Fenryl

This topic is closed to new replies.

Advertisement