Here's a simple program that spoofs an ARP reply for a given IP address. If I spin up two terminal sessions on the same machine.
Run this code in one window
% ./spoof en0 192.168.1.7
Listening on en0 for ARP requests to 192.168.1.7
Spoofing MAC: 00:0c:87:47:50:27
And in the second window cause the OS to issue an ARP_REQ
% ping 192.168.1.7
You will see the program respond to the ARP request. (Wireshark will see the ARP_REQ and ARP_REPLY packets) however my arp table isn't updated with the MAC for the IP address. There is no firewall active.
% arp -a|grep 192.168.1.7
(192.168.1.7) at (incomplete) on en0 ifscope [ethernet]
This is running on a MacBook pro M3 (OSX 15.4).
HOWEVER, on a MacBook pro M4 (OSX 15.2) is does Work !!!!!
Can anyone explain why its not working?
spoof.txt