Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How unhook APIs Message of another process?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
flashcoder
Newbie cheater
Reputation: 0

Joined: 29 Jan 2017
Posts: 13

PostPosted: Sun Mar 05, 2017 5:07 pm    Post subject: How unhook APIs Message of another process? Reply with quote

I am developing a project which needs to unhook some API messages from other processes.

I know that it is possible to do this task because this option exists in PC Hunter software.

I need to unhook these APIs through my application.

I've already searched about this subject and nothing useful was found.

Can someone help me with this?



q3N4SzU.png
 Description:
 Filesize:  34.74 KB
 Viewed:  3867 Time(s)

q3N4SzU.png


Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 133

Joined: 25 Jan 2006
Posts: 7059
Location: 127.0.0.1

PostPosted: Sun Mar 05, 2017 5:33 pm    Post subject: Reply with quote

Those hooks are typically set and handled via:
SetWindowsHookEx

This blog covers how to enumerate into the hook info and potentially see any installed hooks:
https://zairon.wordpress.com/2006/12/06/any-application-defined-hook-procedure-on-my-machine/

Some other useful links in this StackOverflow response:
http://stackoverflow.com/a/15676830/1080150

_________________
- Retired.


Last edited by atom0s on Sun Mar 05, 2017 5:48 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
atom0s
Moderator
Reputation: 133

Joined: 25 Jan 2006
Posts: 7059
Location: 127.0.0.1

PostPosted: Sun Mar 05, 2017 5:42 pm    Post subject: Reply with quote

Here is another useful old source showing how to enumerate hooks:
https://web.archive.org/web/20120304203144/http://www.ntinternals.org/other/EnumWindowsHooks.zip

Original site is dead but web archive has it still.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
flashcoder
Newbie cheater
Reputation: 0

Joined: 29 Jan 2017
Posts: 13

PostPosted: Sun Mar 05, 2017 8:25 pm    Post subject: Possible solution Reply with quote

I discovered in a question in StackOverflow, that is possible to hook CallNextHook api to obtain the id of hook, and so unhook with UnhookWindowsHookEx api.

See, search in Google like this:

Possible to disable a hook made with SetWindowsHookEx run-time?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 133

Joined: 25 Jan 2006
Posts: 7059
Location: 127.0.0.1

PostPosted: Mon Mar 06, 2017 1:55 am    Post subject: Re: Possible solution Reply with quote

flashcoder wrote:
I discovered in a question in StackOverflow, that is possible to hook CallNextHook api to obtain the id of hook, and so unhook with UnhookWindowsHookEx api.

See, search in Google like this:

Possible to disable a hook made with SetWindowsHookEx run-time?


With the info I provided above you will have access to the information used with SetWindowsHookEx to be able to unset a hook. The handle, function pointer, etc. are all available after walking into the right data.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites