execute procedure is foreign process

delphi package - getting into other processes

execute procedure is foreign process

Postby ssivagna » Fri Jul 29, 2005 2:51 pm

Hi!

I see examples on how to CreateRemoteThreadEx and then tell the remote thread to use function loadlibrary that lays in kernel32.dll (loaded inside process).

But there arent just LoadLibrary that lays in kernel32.dll.
There are alot of interesting stuff.

What I want to do is simple, I want to beep(1000,1000) from the remote process (kernel32.dll contains this function).

Many of you will tell me to make a dll witt Beep and then inject it. But I want the kernel32.dll inside any other process to do it.[/code]
ssivagna
 
Posts: 3
Joined: Fri Jul 29, 2005 2:46 pm

Postby neji » Fri Jul 29, 2005 2:57 pm

don't know if this really helps you, but have a look at madkernels iprocess.ExecuteFunction
neji
 
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am

Postby ssivagna » Fri Jul 29, 2005 3:12 pm

Okey.. i just read through my post again. It might be abit unclear.

What I want to do is:
Tell a foreign process to beep(1000,1000);
Beep function is included in kernel32.dll, which is included in all processes.

Note: I don't want a dll injection here :D.

NEJI, I will take a look at it when I get home from training. :D
ssivagna
 
Posts: 3
Joined: Fri Jul 29, 2005 2:46 pm

Postby nildo » Mon Aug 08, 2005 5:22 pm

ssivagna wrote:Okey.. i just read through my post again. It might be abit unclear.

What I want to do is:
Tell a foreign process to beep(1000,1000);
Beep function is included in kernel32.dll, which is included in all processes.

Note: I don't want a dll injection here :D.

NEJI, I will take a look at it when I get home from training. :D


iprocess.ExecuteFunction doesn't need DLL injection and works just fine
nildo
 
Posts: 249
Joined: Mon Mar 22, 2004 11:32 am

Postby madshi » Tue Aug 09, 2005 8:10 am

Yeah, both madKernel's "IProcess.ExecuteFunction" and madRemote's "RemoteExecute" would do the trick.
madshi
Site Admin
 
Posts: 9384
Joined: Sun Mar 21, 2004 5:25 pm

doesnt work

Postby ssivagna » Thu Aug 11, 2005 12:13 am

:cry:

how come this doesnt work
Code: Select all
procedure ShowMessageBox();

begin
LoadLibrary('E:\jeroen\Delphi\IPROCESS\dllfile.dll');
END;



procedure TForm1.Button1Click(Sender: TObject);
begin
Process('notepad.exe').ExecuteFunction(ShowMessageBox, INFINITE, nil, 5);
end;
ssivagna
 
Posts: 3
Joined: Fri Jul 29, 2005 2:46 pm

Postby madshi » Thu Aug 11, 2005 6:09 am

You may not use string constants in the function you want to have executed in the other process.

But if you want to inject a dll into another process, why don't you simply use madCodeHook's InjectLibrary API?
madshi
Site Admin
 
Posts: 9384
Joined: Sun Mar 21, 2004 5:25 pm

Postby neji » Thu Aug 11, 2005 7:01 am

madshi wrote:But if you want to inject a dll into another process, why don't you simply use madCodeHook's InjectLibrary API?


or IProcess.LoadModule, wouldn't it also do the trick?
neji
 
Posts: 155
Joined: Wed Mar 09, 2005 11:39 am

Postby madshi » Thu Aug 11, 2005 7:10 am

Yep.
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 2 guests

cron