Defense arp in Linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. 1. How to obtain the MAC addresses of all machines under the same network segment
Machine viruses are detected in the data center, arp packets are sent. Although arpspoof can solve the problem, you can also find the mac address of the computer with viruses. However, when the equipment in the data center is insufficient, it is difficult to find the IP address corresponding to the mac address. Then we can use arping to send a packet to the machine under the subnet through a loop, so that we can view the corresponding mac cache under arp, and then get
IP address.
#! /Bin/sh
# Thanks to the author Wu Hongsheng
For (I = 1; I <254; I ++ ))
Do
Arping-I eth0 60.191.82. $ I-c 1
Done
Arp-a> mac_table
After the script is run, view the mac_table generated in the current directory.
# Arp-a: Find the MAC address of the gateway when you are poisoned, and record the corresponding machine in mac_table. Then you can find out that machine is infected with the ARP virus.
2. # yk103, the original solution provider. Thank you!
Install libnet first
Http://www.packetfactory.net/libnet/dist/libnet.tar.gz
Tar-xvzf libnet.tar.gz
Cd libnet
./Configure
Make
Make install
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.