How to sniff local outgoing network traffic in .NET without using PCap?

 ̄綄美尐妖づ 提交于 2019-11-29 09:29:58

问题


I'd like to somehow hook into the local system's network stack to capture outgoing network packets without using Winpcap. Unfortunately it tends to crash my system every now and then.

Is there a way to "sniff" outgoing traffic of the local system from a user space process written in a .NET language?


回答1:


What you want is the Network Monitor API. More here and here.




回答2:


I use smsniff from NIRSOFT. You need to be admin on the machine to sniff any traffic.

http://www.nirsoft.net/utils/smsniff.html

I have never seen .net used to sniff traffic. But maybe NetMon from Microsoft has a COM interface you call from .Net

But as always you need to be admin to sniff traffic, since it is needed to put the NIC in promiscuous mode.



来源:https://stackoverflow.com/questions/2953575/how-to-sniff-local-outgoing-network-traffic-in-net-without-using-pcap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!