Click to See Complete Forum and Search --> : Problem with hooking an api from ntshrui.dll


sameen_f
July 7th, 2009, 02:38 AM
hi,

i am not sure if i am posting in the right forum...but my problem is related to hooking. As i've tried Apihijack (a library to hook apis) but still my program is not working..i am trying to hook "ShowShareFolderUIW" which is present in "ntshrui.dll"....the problem that i figured out was when any process or the .exe is loaded...all the information, related to the functions and the dlls that it uses, get stored in Import Address Table...and Apihijack hooks only those functions that have pointers in IAT.... since explorer loads NTSHRUI.dll using LoadLibrary() so the pointers to the functions of the dll do not get stored in IAT..bcoz of this i am not able to hook the desired api.

Can any one help my what should i suppose to do to hook that function. Is it something to do with Export Address Table...or if i am wrong then Plz guide me in the right direction..Thanx :)

Sameen

Codeplug
July 7th, 2009, 10:47 AM
>> Plz guide me in the right direction..
What goal are you trying to achieve - that you decided on API hooking as an approach to achieve that goal?

gg

sameen_f
July 13th, 2009, 03:27 AM
i am trying to setup some security measures...like i want to restrict the user from sharing the restricted files..in this regard i want to hook the ntshrui.dll functions to know that what files are being tried to share and then allow or disallow the sharing...

Codeplug
July 13th, 2009, 01:16 PM
Well, I always connect to shares using the command line ("net use" etc...).

I would consider using actual NTFS security to control access to these "restricted files".

gg