What is arp-scan?
arp-scan is a network scanning tool that uses the ARP protocol to discover and fingerprint IPv4 hosts on the local network. It is available for Linux, BSD, macOS and Solaris under the GPLv3 licence. arp-scan uses the GNU automake and autoconf tools.
arp-scan can send ARP requests to a range of IP addresses and display the responses in a table format. It can also show the vendor name of the MAC address, the interface name, and the packet rate. arp-scan can be used for various purposes, such as:
Finding out what hosts are on your network and their MAC addresses.
Finding out if someone is spoofing their MAC address or using a duplicate IP address.
Finding out what operating system and services are running on a host by analyzing the TCP/IP fingerprint.
Finding out what devices are connected to your wireless network or router.
Testing your firewall rules and network security.
How to install arp-scan?
arp-scan can be installed from the official repositories of most Linux distributions, such as Debian, Ubuntu, Fedora, Arch Linux, etc. For example, on Debian or Ubuntu, you can use the following command to install arp-scan:
sudo apt-get install arp-scan
On macOS, you can use Homebrew to install arp-scan:
brew install arp-scan
On Windows, you can use Cygwin to install arp-scan:
setup-x86_64.exe -q -P arp-scan
How to use arp-scan?
To use arp-scan, you need to have root privileges or sudo access. You also need to specify the interface name and the target IP range. For example, to scan the local network on interface eth0, you can use the following command:
sudo arp-scan --interface=eth0 --localnet
This will output something like this:
Interface: eth0, type: EN10MB, MAC: 00:0c:29:8a:8c:a9, IPv4: 192.168.1.100 Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.1.1 00:50:7f:c3:5c:88 NETGEAR INC.,
192.168.1.2 00:50:7f:d1:e1:40 NETGEAR INC.,
192.168.1.101 00:0c:29:c4:b1:c8 VMware, Inc.
192.168.1.102 00:0c:29:6d:36:f7 VMware, Inc.
4 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 2.374 seconds (107.86 hosts/sec). 4 responded
The output shows the IP address, MAC address, and vendor name of each host that responded to the ARP request. You can also use other options to customize the output, such as:
--destaddr or -T to change the source MAC address during scan.
--arpspa or -S to change the source IP address during scan.
--arpop or -O to change the ARP operation code during scan.
--quiet or -q to suppress output except for the list of hosts.
--file or -f to read the list of target IP addresses from a file.
--random or -R to randomize the order of the target IP addresses.
--timeout or -t to set the timeout for waiting for a response.
--backoff or -b to set the exponential backoff factor.
--bandwidth or -B to set the bandwidth limit in bits per second.
--help or -h to display the help message.
For more information, you can refer to the man page of arp-scan or visit its GitHub page.
Conclusion
In this article, we have learned how to use arp-scan, a network scanning tool that can scan a network for MAC addresses using ARP. We have also seen how to install arp-scan on different platforms and how to use its various options. arp-scan is a handy tool for network administrators and security professionals who want to discover and fingerprint hosts on a local network.
a104e7fe7e