How do i send an ARP request in C# and which library to use

╄→尐↘猪︶ㄣ 提交于 2019-12-11 18:19:52

问题


I'm trying to develop a software that perform a "man in the middle" attack, and for that I need to send false ARP requests.


回答1:


I'm assuming you want to spoof ARP replies. ARP is a Link Layer (L2) protocol. To spoof packets at this layer from user mode requires using Raw Sockets (as it is usually the TCP/IP stack in the kernel who takes care of this).

In other words, you're not going to do it on Windows in C# with any sort of common / sane mechanism.

The SendARP Win32 API call is available, but it is only there for this legitimate purpose:

... sends an Address Resolution Protocol (ARP) request to obtain the physical address that corresponds to the specified destination IPv4 address

(There's a reason these things are not trivial.)



来源:https://stackoverflow.com/questions/22060648/how-do-i-send-an-arp-request-in-c-sharp-and-which-library-to-use

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