zaman
Fri Mar 28 09:00:05 CDT 2008
On Mar 28, 6:24=A0am, "Maxim S. Shatskih" <ma...@storagecraft.com>
wrote:
> > I wrote a non device driver to hook ZwCreateFile using SSDT hooking
> > technique. While running one of my test case my system crashed (blued
> > screen).
>
> Which is a usual way for such a dirty code. Also note that Vista/2008 x64 =
makes
> SSDT hooking just plain impossible.
>
> > During mid of a =A0copying operation if i unload my driver,
>
> Hookers cannot be unloaded. Period. You can try to do this, but occasional=
ly it
> will BSOD, and there is no even theoretical possibility of getting rid of =
such
> BSODs.
>
> > Can anyone =A0give me any idea how to avoid this crash
>
> Impossible.
>
> Even the legacy FS filters cannot unload.
>
> To be unloadable, your only chance is FltMgr's minifilter.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> ma...@storagecraft.com
http://www.storagecraft.com
Thanks for your quick response.
ok, i understand and accept its a dirty way, But in simple scenario if
i let the copy opereation to complete and after that if i unload the
driver, there is no BSODS. It works fine and i checked it repeatedly.
Only if i unload the driver in mid of the copying operation it
crashes.
During copying operaion all the file creation is going through my
NewZwCreateFile. Now when i send command to unload the driver, it
first restore the SSDT with original ZwcreateFile and then delete
the device object.
Crash does not occur where i unhook, it occurs when i delete the
device object.
Can you please tell me a logical reason, why it happens so, as
apparenty everything looks smooth and fine.
Thanks