Click to See Complete Forum and Search --> : Changing a running process's code


Justin Decker
July 27th, 1999, 10:12 PM
I'm trying to change the code of a running process. I'm running the external program with the debugging API's and catching the int 3. Then I find the first writable page, save it, write my own code to it, replace it and continue the program normally.
So far it works for any set of opcodes, but the reason I want to do this is to call LoadLibrary to load a dll into the process.
So far I've tried finding the address of the function LoadLibrary and putting it into the running program's EAX register and inserting this code
push 0
call eax
The 'push 0' has no effect on it, it's the 'call eax' that causes an access violation.
I'm out of ideas on why this doesn't work. Any help would be appreciated.