didn't hook apis in specified application

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

didn't hook apis in specified application

Postby orseL » Thu Jul 19, 2018 4:25 am

Hi madshi,

before i ask, i'm sure that i'm totally beginner in madchook and also english. :wink:

i'm testing api hook now with madchook 3.1.18

and i want to catch some apis such as "CreateFile, ReadFile and SHGetFileInfo" in (Desktop-search engine)explorer application that named "Everything"

i've successed to attach my test dll on this application. but it didn't hook apis at all and i couldn't find out any problem.

i attach some screen-shot, log and my source-code that modified from Print monitor Demo.

please check it and i would appriciate when you answer.

thanks! best regard
Attachments
source-code.zip
(10.38 KiB) Downloaded 19 times
Screen-shot and log.zip
(210.01 KiB) Downloaded 17 times
orseL
 
Posts: 3
Joined: Thu Jul 19, 2018 2:38 am

Re: didn't hook apis in specified application

Postby madshi » Mon Jul 23, 2018 9:09 pm

I'm confused, your source code doesn't even seem to use madCodeHook at all. Or am I missing something?
madshi
Site Admin
 
Posts: 9774
Joined: Sun Mar 21, 2004 5:25 pm

Re: didn't hook apis in specified application

Postby orseL » Tue Jul 24, 2018 12:19 am

I'm really sorry that i uploaded wrong file. Here is new uploads. thanks to reply :)
Attachments
HookWindowTest.zip
(6.98 KiB) Downloaded 18 times
orseL
 
Posts: 3
Joined: Thu Jul 19, 2018 2:38 am

Re: didn't hook apis in specified application

Postby madshi » Tue Jul 24, 2018 6:52 am

You are calling FinalizeMadCHook() for DLL_THREAD_ATTACH and DLL_THREAD_DETACH events, which is totally wrong.

You said that you modified the PrintMonitor demo, which would have been smart. But you did not. Your dllmain.cpp file has exactly zero things in common with the PrintMonitor demo. If you actually did use the PrintMonitor demo as a starting point, you would not have run into this problem... :wink:
madshi
Site Admin
 
Posts: 9774
Joined: Sun Mar 21, 2004 5:25 pm

Re: didn't hook apis in specified application

Postby orseL » Wed Jul 25, 2018 1:27 am

Now it works super :D Thanks madshi!
orseL
 
Posts: 3
Joined: Thu Jul 19, 2018 2:38 am


Return to madCodeHook

Who is online

Users browsing this forum: Google [Bot] and 4 guests