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 


Hook scanner?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Tue Aug 19, 2008 1:54 pm    Post subject: Hook scanner? Reply with quote

Is there a scanner to see what functions are hooked in kernel mode and defines what drivers were used?
Back to top
View user's profile Send private message
DoomsDay
Grandmaster Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 768
Location: %HomePath%

PostPosted: Tue Aug 19, 2008 2:18 pm    Post subject: Reply with quote

rku
google it ^^
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Tue Aug 19, 2008 7:58 pm    Post subject: Reply with quote

Yes, you can make your own... Scan ntoskrnl.exe for jumps or calls (0xE9 or 0xE8). Determine the addresses of the calls and check if they are outside ntoskrnl.exe's address space (ModuleBase+ModuleSize). If they are, flag the address as a hook and attempt to resolve the function name. You could turn out false positives because sometimes, 0xE9/0xE9 might not be an instruction such as they are part of an address or a string.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Aug 20, 2008 9:35 am    Post subject: Reply with quote

I didn't find that process in my process manager O.o
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Wed Aug 20, 2008 9:56 am    Post subject: Reply with quote

dnsi0 wrote:
I didn't find that process in my process manager O.o


lol. Wink
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Wed Aug 20, 2008 11:00 am    Post subject: Reply with quote

dnsi0 wrote:
I didn't find that process in my process manager O.o


Loaded into kernel mode as a special type of object, not necessarily a process. Think of it as Window's brain.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Wed Aug 20, 2008 2:33 pm    Post subject: Reply with quote

rapion124 wrote:
Yes, you can make your own... Scan ntoskrnl.exe for jumps or calls (0xE9 or 0xE8). Determine the addresses of the calls and check if they are outside ntoskrnl.exe's address space (ModuleBase+ModuleSize). If they are, flag the address as a hook and attempt to resolve the function name. You could turn out false positives because sometimes, 0xE9/0xE9 might not be an instruction such as they are part of an address or a string.


Couldn't you just check the beginnings of exported functions for those?

I.e. instead of scanning the entire process, just check the addresses of the exports for those bytes.

Yes, it may not be completely accurate, and it might not pick up some, but it'd probably be a good bit faster, and not have nearly as many false-positives.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Wed Aug 20, 2008 8:17 pm    Post subject: Reply with quote

Sure, that might work. Scanning the beginning of an API for hardcoded values. It's a lot of work though. Truth is, there is no "perfect" method for finding hooks unless you manually look through the function. For example, checking for a jmp (0xE9) can easily be bypassed by using other mnemonics, like push address ,retn.
Back to top
View user's profile Send private message
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