DLL Injection

Technical Discussions not Related Directly to MHS. For Example, Coding, Hex Editing, General Hacking, Etc.

Moderators: g3nuin3, SpeedWing, WhiteHat

DLL Injection

Postby PsychoTron » Sun Aug 29, 2010 7:22 am

I want to implement the LoadLibrary hook, but I can't quite figure it out, I've read a few tutorials, but all of them had a bunch of unnecessary stuff, and I couldn't quite sort what I needed to use. (I saw at least 3-4 tuts, and all of them had vastly different setups, I did pick up on a few common themes, but not enough to confidently build this..)

So can I get a barebones example of the LoadLibrary\CreateRemoteThread hook, in plain C++?

For instance, don't you need to replace a file for this to auto-load? ie, spoofing another dll the .exe loads already, then loading the real one, and passing back control to it?

As you can see, I at least need some clarification on a few things.


Edit: Found a set of tools, called Comrade's PE Tools. It included a tool called Patch.exe, it basically patches the .exe to load your .dll for you.

(Not sure how safe this toolset is, but I do know it worked, though I got a virus warning, but considering the tools nature, it's not surprising, it comes with FASM files though, so you can compile it yourself if you want to try them out, and don't trust compiled code from random sites..)

Hackleberry Fin
Posts: 21
Joined: Sun Aug 29, 2010 7:02 am

Return to Technical Unrelated

Who is online

Users browsing this forum: No registered users and 1 guest