// JP opened flex table

Click to See Complete Forum and Search --> : Hook LoadLibrary'd DLL


mikc
February 19th, 2007, 08:56 AM
Well the program i wanna hook seems to load the dll after the program executes with loadlibrarya
so trying to hook with the iat doesnt seem to work :P
how would i go about doing this?

Krishnaa
February 19th, 2007, 09:12 AM
how would i go about doing this?


Well, you can start with describiing your situation little more, may be with whatever code you have. Frankly I didn't understand whatever you have posted here.

mikc
February 19th, 2007, 09:31 AM
ok say i use internet explorer for example :P
I use the import address table to look for my dll (say wsock32.dll)
but it is not there :S
then i use an api spy program to realize that the dll is loaded by a function in kernel32.dll called LoadLibraryA (meaning that it wouldnt be accessible in the import address table)
so i still want to hook that wsock32.dll but not too sure how i would do it
i have the HMODULE to the dll if that helps :D

Krishnaa
February 19th, 2007, 09:41 AM
Hmmm, and can you describe the purpose/goal of this program you are writing ?

mikc
February 19th, 2007, 09:49 AM
im trying to make a api hook for the socket recv/send
some of the dlls i need are loaded on runtime so i cant get them via import address table

Krishnaa
February 19th, 2007, 09:53 AM
If you want to filter winsock send/recv then there are better ways than API hooks, like Layered Service Provider. (http://www.microsoft.com/msj/0599/LayeredService/LayeredService.aspx)

Why do you need API hooks?

mikc
February 19th, 2007, 09:55 AM
thanks i guess ill look up onto that :D

//JP added flex table