Help a beginner

c++ / delphi package - dll injection and api hooking

Help a beginner

Postby rowger » Tue Jan 03, 2017 9:09 am

Hi everybody and a happy new year!

I would like to use a hook on wtsapi32.dll, specifically the WTSQuerySessionInformationA Call.

However, I am a complete beginner at hooking and C++

I would be very grateful is you have the code to a similar project that you can provide me with.

Thanks.
rowger
 
Posts: 2
Joined: Tue Jan 03, 2017 8:57 am

Re: Help a beginner

Postby madshi » Tue Jan 03, 2017 1:31 pm

Your best bet is always to take one of the demo projects as the starting point for your own hook project, and then just change the hook dll source code. E.g. try the HookProcessCreation demo, and simply replace the CreateProcess etc API hooks with an WTSQuerySessionInformationA hook. It shouldn't be very hard to do. Just be very careful to make sure that both the hook callback function and the "next" function variable definition have the exactly correct list of parameters, calling convention and return type.
madshi
Site Admin
 
Posts: 9343
Joined: Sun Mar 21, 2004 5:25 pm

Re: Help a beginner

Postby rowger » Tue Jan 03, 2017 2:53 pm

I can't seem to be able to find the Demo Folder, can you please point me to it?
Thanks for bearing with me.
rowger
 
Posts: 2
Joined: Tue Jan 03, 2017 8:57 am

Re: Help a beginner

Postby madshi » Tue Jan 03, 2017 3:10 pm

Should be "madCollection installation root\madCodeHook\Demos".
madshi
Site Admin
 
Posts: 9343
Joined: Sun Mar 21, 2004 5:25 pm


Return to madCodeHook

Who is online

Users browsing this forum: No registered users and 5 guests