Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2005, 12:42
Peter[Pan]
 
Posts: n/a
Api Hooking w/ Device Driver

I was wondering if anybody has some resources about hooking api's thru ring0, i would rather not overwrite code, i was thinking about setting a page guard, and when it hits, catch it thru the driver, and go from there, anybody else has any ideas or resources ?

Thanks.
Reply With Quote
  #2  
Old 06-17-2005, 15:33
Shub-Nigurrath's Avatar
Shub-Nigurrath Shub-Nigurrath is offline
VIP
 
Join Date: Mar 2004
Location: Obscure Kadath
Posts: 971
Rept. Given: 70
Rept. Rcvd 431 Times in 101 Posts
Thanks Given: 83
Thanks Rcvd at 405 Times in 127 Posts
Shub-Nigurrath Reputation: 400-499 Shub-Nigurrath Reputation: 400-499 Shub-Nigurrath Reputation: 400-499 Shub-Nigurrath Reputation: 400-499 Shub-Nigurrath Reputation: 400-499
depends on what are you trying to do on what O.S...HW BPs might also be good for these things..
__________________
Ŝħůb-Ňìĝùŕřaŧħ ₪)
There are only 10 types of people in the world: Those who understand binary, and those who don't
http://www.accessroot.com
Reply With Quote
  #3  
Old 06-18-2005, 05:06
vodu
 
Posts: n/a
Quote:
Originally Posted by Peter[Pan]
I was wondering if anybody has some resources about hooking api's thru ring0, i would rather not overwrite code, i was thinking about setting a page guard, and when it hits, catch it thru the driver, and go from there, anybody else has any ideas or resources ?

Thanks.
Take a look at:
http://www.sysinternals.com/

And use regmon95 source. you will find 2 source:
1 - sys file src. 2- application src.

By changing it you can write APIMon very easy.
Reply With Quote
  #4  
Old 06-18-2005, 21:47
Peter[Pan]
 
Posts: n/a
appreciated! i didnt even think about that application, it slipped my mind
Reply With Quote
  #5  
Old 06-18-2005, 22:22
N0P's Avatar
N0P N0P is offline
Friend
 
Join Date: Aug 2003
Location: [CPU]
Posts: 100
Rept. Given: 19
Rept. Rcvd 13 Times in 12 Posts
Thanks Given: 16
Thanks Rcvd at 58 Times in 23 Posts
N0P Reputation: 13
try look at this > http://www.bindview.com/Services/RAZOR/Utilities/Windows/strace_readme.cfm

it comes with source code ...
Reply With Quote
  #6  
Old 06-19-2005, 06:57
FEARHQ FEARHQ is offline
Friend
 
Join Date: Mar 2002
Posts: 73
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
FEARHQ Reputation: 0
I was actually contemplating hooking file and registry api's using ring0 driver, under NT5+, using WDM and ring0, and though of filemon and regmon as a good base. I'm looking to write up a small "application firewall" that would allow me to permit or deny access to registry keys or files. A neat final project for an undergraduate degree no? Only problem is, I can't seem to find the regmon, filemon or apimon source code. I'd much rather hook through ring0 than anything else, but if anything I'm open to suggestions/alternatives/input/whatever. If anyone has any advice on what I should read up I'd appreciate it
Reply With Quote
  #7  
Old 06-19-2005, 07:32
Opc0de
 
Posts: n/a
What about take a look in the www.rootkit.com sources?
Reply With Quote
  #8  
Old 06-20-2005, 02:57
taos's Avatar
taos taos is offline
The Art Of Silence
 
Join Date: Aug 2004
Location: In front of my screen
Posts: 580
Rept. Given: 65
Rept. Rcvd 54 Times in 19 Posts
Thanks Given: 69
Thanks Rcvd at 137 Times in 36 Posts
taos Reputation: 54
Quote:
Originally Posted by Shub-Nigurrath
depends on what are you trying to do on what O.S...HW BPs might also be good for these things..
do you have any example or tut? I'm interested in this method.

Regards.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help - Windows Device Driver Programming psychedelic_fur General Discussion 7 06-29-2004 22:27
Windows 2000 Device Driver Book + Inside Windows 2000 at FTP dynio General Discussion 16 09-19-2003 23:21


All times are GMT +8. The time now is 06:45.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )