Can't hook getaddrinfo() in IE10+
Can't hook getaddrinfo() in IE10+
I'm using madshi to hook the getaddrinfo function of the ws2_32.dll, I need to check the address the user is trying to access in the browser and do some actions depending on the address.
The code works fine with most of the browsers, so far I just can't hook IE 10 or above, it is like they use another function of the dll but I can't determine which. Does anyone know what would it be?
Regards.
The code works fine with most of the browsers, so far I just can't hook IE 10 or above, it is like they use another function of the dll but I can't determine which. Does anyone know what would it be?
Regards.
Re: Can't hook getaddrinfo() in IE10+
I've no idea. Does hooking of other APIs work in IE10? Or does hooking generally not work at all in IE10?
Re: Can't hook getaddrinfo() in IE10+
Well, it is not that the hook does not work, it works but it seems like IE10+ don't use the getaddrinfo() to retrieve the service and node name, when I hook it I get no information while accessing websites via IE10+.
I also tried to hook the followings functions to get this information, but without success: GetAddrInfoW, connect, gethostbyname, recv, send, WSARecv, WSASend.
I also tried to hook the followings functions to get this information, but without success: GetAddrInfoW, connect, gethostbyname, recv, send, WSARecv, WSASend.
Re: Can't hook getaddrinfo() in IE10+
Ok, so it doesn't look like a bug in madCodeHook, it's just that IE10+ doesn't seem to use the APIs you thought it would use, correct?
Unfortunately I don't really know which other APIs IE10+ might use. Microsoft has a history of using undocumented stuff in their own applications...
Unfortunately I don't really know which other APIs IE10+ might use. Microsoft has a history of using undocumented stuff in their own applications...
Re: Can't hook getaddrinfo() in IE10+
Yes, you're right, I didn't mean to say there was a problem with the madCodeHook, for sure the title I wrote is completely misleading, I was just wondering if anyone knew what function should I hook in IE10+ instead of getaddrinfo, as soon as that this function has not the desired effect.
Thanks for the response. If anyone knows please add a response below. Meanwhile I'll keep trying.
Thanks for the response. If anyone knows please add a response below. Meanwhile I'll keep trying.
Re: Can't hook getaddrinfo() in IE10+
It's necessary to hook GetAddrInfoW and GetAddrInfoExW, instead.
Re: Can't hook getaddrinfo() in IE10+
So you got it working?
Re: Can't hook getaddrinfo() in IE10+
Yes, I can get useful information now from IE10+ hooking these functions. Thanks.
Re: Can't hook getaddrinfo() in IE10+
Glad to hear that...
-
- Posts: 380
- Joined: Sat Dec 11, 2004 2:11 am
- Location: San Francisco Bay Area, CA USA
- Contact:
Re: Can't hook getaddrinfo() in IE10+
FWIW, I had to start hooking GetAddrInfo(Ex)W starting with IE 10 on Win 8.
Re: Can't hook getaddrinfo() in IE10+
Most Win32 API calls will end up in Ex function variants (EXtra parameter) calls and on NT-based OS' Ansi functions call Unicode so that makes perfect sense
--Iconic
--Iconic