问题
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