Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-19-2005, 13:51
just4urim
 
Posts: n/a
Cool IRP loop back

Hi guys ,
I'm writnig a filter driver . I want to work with files in kernel mode ,
but the problem is when I call ZwCreateFile / ZwClose to work on a file ,
these Zw APIs create an MJ_CREATE/CLOSE IRP and comes back to my dispatch routine . So what should i do ?
Enjoy ur time...
Reply With Quote
  #2  
Old 01-19-2005, 19:47
Opc0de
 
Posts: n/a
Without your source code is difficult to help.
Try to read this source codes:
http://www.insidewindows.info/

Regards,
Opc0de
Reply With Quote
  #3  
Old 01-19-2005, 20:02
willii
 
Posts: n/a
Smile

Two method:
1. Add a special flag on you call to zwCreateFile/zwCloseFile so that your driver can distinct them.
2. Create file and close file directly use IRP to lower driver. You must construct IRP that you want to use. It is very difficult because many things is undocument. But it may be work.
Reply With Quote
  #4  
Old 01-21-2005, 23:32
just4urim
 
Posts: n/a
You're right! i know if i can create the IRP for create/close file and call "IoCallDriver" to pass the IRP to the lower driver , my problem is solved .
but setting all of the IRP fields correctly is a bit difficult !
and about flagging the IRP , what do u mean ? change the input param of ZwCreateFile/ZwClose ?
Reply With Quote
  #5  
Old 01-25-2005, 19:06
hajir
 
Posts: n/a
I think, you can create a linked list to store information about the incoming IRPs, such as FileObject, FileName, other flags & status. Later, in the next incoming IRPs, you can check some of infos in the linked list and decide to pass the IRP to the lower level driver or not.
Reply With Quote
  #6  
Old 01-26-2005, 04:12
just4urim
 
Posts: n/a
Arrow

Quote:
Originally Posted by hajir
create a linked list to store information about the incoming IRPs.
it seems an interesting idea, i implement it in my code.

i add the algorithm in my code , but i got "UNEXPECTED_KERNEL_MODE_TRAP" , how can i get rid of it

[EDIT JMI: DO NOT answer your own Post. USE THE EDIT BUTTON.]
Reply With Quote
  #7  
Old 01-26-2005, 19:10
Opc0de
 
Posts: n/a
Try to use WinDbg to open the dump file and debug it.

Regards,
Opc0de
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
Hi there~ Im back.. OrionOnion General Discussion 3 01-03-2014 05:29
Come Back LOUZEW General Discussion 12 10-01-2013 18:55
decompiling back to C++? Rhodium General Discussion 44 10-11-2004 08:30


All times are GMT +8. The time now is 03:34.


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