Jump to content

DLL Injector. (Full x86 and x64 Unicode and MBCS) Source Code


Recommended Posts

Posted

Compiled and working on both IA-32 and AMD64.

Compiled and working with both Unicode and MBCS/ASCII compiler flags. (Defaults to Unicode for obvious reasons.)

 

Also supports unloading the module.

 

Code is written in C++ with full exception handling (none of this annoying C-based return value checking crap).

 

Only tested on MSVC++. Visual Studio 2008 project files supplied.

 

Note: The AMD64 version can only inject into AMD64 processes, and the IA-32 version can only inject into IA-32 processes. It is possible to inject into IA-32 from AMD64 but I didn't bother because I needed an IA-32 version anyway and the code is much cleaner if I don't have to support that.

 

Furthermore, don't touch the EH compiler settings, they're set the way they are for a reason and the code won't work properly if you change it. If you modify it then you can't mix SEH and C++ EH and so all the SehGuard code will fail and you won't be able to proxy SEH to C++ EH. In short: If you don't know what it does, just leave it alone.

 

Pretty much all the code should be documented but I might have missed some (I didn't check). It should be very easy to follow though for any Windows programmer.

 

Obviously you'll need to change the module name to the name of your module.

 

Comments, suggestions, and criticisms appreciated.

 

Credits:

Kynox

Greyman

Jeffrey M Richter / Christophe Nasarre

jaredpar

All of GD

 

Download here:

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...