ARP cache poisoning
As we know, systems on a TCP/IP LAN identify and communicate with each other via the MAC addresses of their network adapters. Each system keeps a list of systems and their MAC addresses for reference, known as the ARP cache. If possible, we need to spoof the cache of a machine with a wrong MAC address for another machine. All communication to that machine with the spoofed MAC address from the machine will be directed to the attached machine. So, ARP cache poisoning is the method of tricking a machine to save the wrong data about an IP address in its ARP table.
Getting ready
As we are performing a type of man-in-the-middle attack (getting the data from another device connected to the same network), we have to turn on the IP forwarding to make sure that the connection on the victim's machine is not affected or interrupted. For performing IP forwarding, we have different methods for Linux and macOS.
Linux
We can check the status of IP forwarding by checking the content in the...