Installation needed?

c++ / delphi package - dll injection and api hooking
Post Reply
MrTutu
Posts: 1
Joined: Wed Feb 22, 2012 3:10 pm

Installation needed?

Post by MrTutu »

I have a small question. Does the end-user need to install something in order to run an application which uses MadCodeHook? My use case (screen capture app) requires that the application can be run from a USB drive. Also, does the user need to have admin rights?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: Installation needed?

Post by madshi »

It depends on whether you need to hook APIs system/user/session wide or just for specific processes. The system/user/session wide DLL injection functionality in madCodeHook is using a little kernel mode driver, which is responsible for injecting your hook dll automatically into all newly created processes. In order to load a driver, you need admin rights. The usual workaround is to install a little service. The installation then needs to be performed with admin rights, but later the normal application can run without admin rights. Of course if you want to be able to run your software from an USB stick without installation, things are more complicated. You could try getting along without admin rights. E.g. you could (mis)use SetWindowsHookEx to inject your hook dll instead of using madCodeHook. Or maybe you only need to inject certain processes? Then you could loop through them and inject your hook dll into them one by one. For that you might also get along needing admin rights, not sure.
Post Reply