News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ReadProcessMemory from dll

Started by ragdog, June 02, 2008, 02:40:31 PM

Previous topic - Next topic

ragdog

hi

i have a question to ReadProcessMemory

it is possible a dll with ReadMemoryProcess read or write a dll from runnning process

have your a idea or soucecodes in masm32

greets
ragdog

PBrennick

ragdog,
I know thta sometimes things get lost in the translation. You can't mean that you want to write to a DLL?!?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ragdog

sorry

no i write no a dll !

i seach a example for ReadProcessMemory or  WriteProcessMemory in a dll
the dll is loaded from a another running process

raGDOG

donkey

I have used ReadProcessMemory on occasion though not in a DLL and have wondered whether it is reliable when executed without suspending the process being read. I could not find any documentation on whether the API suspends execution of the target process while it reads so I assume it does not. This may lead to corrupt data due to reading addresses with only partially completed writes when your timeslice comes around. Anyway, it seems on the surface to have the potential to be unreliable except when debugging a process.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

slovach

Sure you can do it, but if you're injecting the DLL, you're in the processes memory space and can control it as you will, so it's kind of pointless.

You should just be able to do something like this if you're injected into it:

mov eax, dword ptr ds:[12345678h]


Otherwise, ReadProcessMemory would work just as expected.

ragdog

thanks for your help


my problem is solved with getmodulbaseadress :bg

greets
ragdog