Hi everyone! Can you help me please? I need to write sniffer for internet explorer 9.0 using hooks in c# Is it possible? I searched google.com found some information: SharpCap (packet capture framework for .NET), using .NET Socket class to listen user's activities on the web browser but I didn't find anything how I can create sniffer with usage of hooks. Can you guys give me some advice how to do that? Is there any way? Well, if it's not possible to use hooks than maybe some fuctions which incapsulates hooks inside. Maybe there is some way to hook winsock and steal packets from there?

Thank you for your help.

There's 2 ways to do this. 1 would be to hook IE directly by injecting code into it and knowing what you are monitoring (basically would have to know how IE works inside which I unfortunately can't help you with). This would be pretty troublesome and complicated so I recommend not doing this. 2 would be to monitor all HTTP packets coming in (port 80). It's actually more robust to do it this way since it will work for all browsers. This describes how to sniff packets in C#, you would probably want to filter the port to 80 unless you care about TCP/UDP/other random ports as well.

Thank you for your help. Got it. I will look at codeproject.com