How to include my DLL to a program via OllyDbg ? explain with example offsets if possible..
thank you.
Posted on 2007-11-07 12:02:37 by revange
What you are asking is a special case of static code injection,that is,static dll injection.
Google "static dll injection" and you'll find what you're looking for.
Posted on 2007-11-14 13:08:13 by shakuni
Do you want to hook DLL or
to attach your DLL to running process?

Generic method to inject your DLL:

  • Get address of LoadLibraryA function

  • Allocate memory in target process using VirtualAllocEx

  • Write a string with your DLL name in target process using WriteProcessMemory

  • Call LoadLibraryA with your DLL name in target process using CreateRemoteThread


Posted on 2007-11-24 15:21:06 by Jupiter
Isn't creating a global window hook much easier/faster/cleaner?
Posted on 2007-11-24 17:24:28 by ti_mo_n

Isn't creating a global window hook much easier/faster/cleaner?

You get injected in every application that way, though, and will need to check if the application you're injected into is the one you need.

Also, global hooking might be disabled on non-administrative accounts (haven't checked!), while it's probably still possible to inject code into an app that was started from the same user account (again, haven't checked!)
Posted on 2007-11-24 17:40:08 by f0dder
ti_mo_n
Isn't creating a global window hook much easier/faster/cleaner?

When you need to inject your dll in all processes - yes, it's a better solution, but when you have only one target - there is no need to hook whole system ;)
I assume that revange wants to extend functionality of specific application, so it works with 1 target, no need to hook other apps.
Posted on 2007-11-25 06:11:14 by Jupiter