Introduction to ARP spoofing principles and what is ARP and prevention of ARP spoofing page 1/3

Source: Internet
Author: User

What is ARP? How can we prevent ARP spoofing?

What is ARP? How can we prevent ARP spoofing?

First, let's talk about arp. If you input ARP-A (9x) in a Unix shell, your output looks like this:

Interface: XXX. XXX

Internet address physical address type

XXX. XXX 00-00-93-64-48-d2 dynamic

XXX. XXX 00-00-b4-52-43-10 dynamic

...................

The first column shows the IP address, the second column shows the hardware address (MAC) of the network interface card corresponding to the IP address, and the third column shows the corresponding relationship type between the IP address and Mac.

It can be seen that ARP is a protocol that converts an IP address to the physical address of the NIC corresponding to an IP address, or ARP is a protocol that converts an IP address to a MAC address. It relies on a table stored in the memory to enable the IP address to be responded by the target machine on the network.

Why convert an IP address to a MAC address? Simply put, this is because in the TCP network environment, the route table defines how an IP packet goes. However, when the IP packet arrives at the network, the machine that responds to the IP packet is identified by the MAC address contained in the IP packet. That is to say, only machines with the same MAC address as the MAC address in the IP packet will respond to this IP packet. In the network, each host sends an IP packet. Therefore, there is an ARP --> Mac conversion table in the memory of each host. It is usually a dynamic conversion table (note that the ARP table can be set to static in the routing ). That is to say, the corresponding table will be refreshed by the host as needed. This is because Ethernet transmission on the subnet layer is determined by a 48-bit MAC address.

Generally, before a host sends an IP packet, it needs to find the MAC address corresponding to the IP packet in the conversion table. If not found, the host sends an ARP broadcast packet, which looks like this:

"I'm host XXX. Mac is xxxxxxxxxxx, IP is XXX. xx1. Please tell your Mac"

The host whose IP address is XXX. xx1 responds to this broadcast, and the reply ARP broadcast is:

"My name is XXX. xx1, and my Mac is xxxxxxxxxx2"

As a result, the host refresh its ARP cache and then issue the IP package.

After learning about these common sense, we can now talk about how to implement ARP spoofing in the network. Let's take a look at this example:

An intruder wants to illegal access to a host. He knows that the firewall of this host only opens 23 ports (Telnet) to the IP address 192.0.0.3 ), but he must use Telnet to access this host, so he needs to do this:

1. He first studied the 192.0.0.3 host and found that the 95 host would use an OOB to let him die.

2. Therefore, he sent a flood package to the 139 ports of 192.0.0.3, and the machine died.

3. At this time, the IP packet sent from the host to 192.0.0.3 cannot be answered by the machine, and the system starts to update its ARP table. Release the 192.0.0.3 project.

4. During this period, intruders changed their IP address to 192.0.0.3.

5. He sends a ping (ICMP 0) to the host and requires the host to update the host's ARP conversion table.

6. Find the IP address on the host, and add a new IP Address --> Mac in the ARP table.

7. If the firewall fails, the compromised IP address becomes a valid MAC address, and you can telnet.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.