What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » DLL Injection (ASM and API)

DLL Injection (ASM and API)
Author: Message:
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
O.P. DLL Injection (ASM and API)
i need to create a hook in another program to a dll i create.

im gonna open the process using the OpenProcess API call.
then free-up some memory using the VirtualAllocEx API.
then write in that memory with the WriteProcessMemory api call.
then get addy of the LoadLibrary using the GetProcAddress api
then create a remote thread in the process using API.
then get rid of the memory in the process.

is this the correct way to Inject dlls or is there an easier way?

thanks in advance.
[Image: jeansiger5.jpg]
12-04-2004 10:05 AM
Profile PM Find Quote Report
TheBlasphemer
Senior Member
****

Avatar

Posts: 714
Reputation: 47
36 / – / –
Joined: Mar 2004
RE: DLL Injection (ASM and API)
Remote DLL injection is much simpler,
First VirtualAlloc a bit of memory where you will write the DLL's filename with WriteProcessMemory.
After that call CreateRemoteThread with a pointer to LoadLibrary (since it's in the kernel dll, the address will be the same everywhere), and a pointer to the just allocated memory
wait for the thread to end
and then deallocate your memory,
your dll should then be loaded :)
[Image: theblasp.png]
12-04-2004 11:45 AM
Profile PM Find Quote Report
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
O.P. RE: DLL Injection (ASM and API)
thanks TB youve saved me alot of mucking around.
[Image: jeansiger5.jpg]
12-04-2004 12:14 PM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: DLL Injection (ASM and API)
quote:
Originally posted by Ash_
thanks TB youve saved me alot of mucking around.
Actually useful to me too.
Now to figure out, with the injected DLL, how to get an IMessenger3 pointer...
[Image: spartaafk.png]
12-05-2004 03:33 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On