• Welcome to Valhalla Legends Archive.
 

Hooking Again =x

Started by PunK, January 20, 2009, 12:29 PM

Previous topic - Next topic

PunK

I would post this in CupHeads original post but I doubt anyone would look at that.

Anyways, I've already injected the dll but I want to redirect the socket data back to my application via the injected dll. I'm not quite sure about how to go about this and I am doing this in VB6 to get a good understanding then eventually I will port it into C++. I don't quite have a great grasp on C++ which is why I'm doing this in VB6 first.

Does anyone have any good documentation (being any language at this point, I don't care) that I could refer to?

Second question.
Let's say I write a DLL and name it winsock32.dll. The application I inject the DLL into is already using a library named winsock32.dll.. Will it write over the existing dll that the application is already using?


Thanks.

brew

1). No, but it's really really easy to do on your own. I recommend checking out DbgHelp's ImageDirectoryEntryToData.
2). LoadLibrary will return the base address of the previously loaded module with the same name if present.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

PunK

Kind of was hoping for something that explained the dynamics of hooking.

I'm using http://www.edgeofnowhere.cc/viewtopic.php?p=2483118 as a reference.

Hdx

Walk the imports table replacing all calls to functions you want to hook with your functions. Not hard.

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status