my madRemote cannot remote execute anything

delphi package - getting into other processes

my madRemote cannot remote execute anything

Postby jh092 » Mon Dec 26, 2011 9:44 am

Hi madshi, been looooooooong time...

I am trying to run RemoteExecute in a foreign process, it does not work at all, the same error each time is

"The system cannot find the file specified (2)"

I am using Windows 7 64 bit Ultimate
I am using Delphi 2010 Architect
My code that I'm trying to remote execute is just "normal" 32 bit
The foreign process is 32 bit
The foreign process is being run with elevated UAC
My code is being run with elevated UAC
I have other code in my exe that performs WriteProcessMemory and that works fine

I have stripped down my remote function to almost nothing and still I get the same error. Here is my nearly nothing function I am trying to RemoteExec:

Code: Select all
function ExecuteTest(buffer: pointer): dword; stdcall;
var
  p1: dword;
  p2: single;
  p3: dword;
begin
  p1 := 4;
  p2 := 1.5;
  p3 := $802;
  result := 12345;
end;


and to do my remote executing I am using this:

Code: Select all
function TTest.RemoteInjectTest: dword;
var
  dummy: dword;
  ph, pid: dword;
begin
  GetWindowThreadProcessId(FTestHandle, @pid);
  ph := OpenProcess(PROCESS_ALL_ACCESS, false, pid);

  dummy := 0;
  if RemoteExecute(ph, @ExecuteTest, dummy) then
    result := dummy
  else begin
    raise Exception.CreateFmt('Remote injection failed. %s (%d)', [ SysErrorMessage(GetLastError), GetLastError ] );
  end;
end;


my pid and pidhandle are valid

I'm completely stuck, can't even do this basic thing and would very much appreciate your help if at all possible. I am a registered user and currently using the latest version.

Thank you so much for your time

John
jh092
 
Posts: 3
Joined: Fri Oct 07, 2005 1:31 am

Re: my madRemote cannot remote execute anything

Postby jh092 » Mon Dec 26, 2011 9:15 pm

I have fixed this now, my error, I did not realize madRemote requires madCHook.dll.

It is now working, sorry for the false alarm.

Thank you

John
jh092
 
Posts: 3
Joined: Fri Oct 07, 2005 1:31 am

Re: my madRemote cannot remote execute anything

Postby madshi » Wed Jan 04, 2012 8:28 am

Do you have a commercial license to madRemote/madCodeHook? The commercial madRemote version does not need madCHook.dll.
madshi
Site Admin
 
Posts: 9384
Joined: Sun Mar 21, 2004 5:25 pm


Return to madRemote

Who is online

Users browsing this forum: No registered users and 1 guest

cron