ARP attack defense method and system and ARP defense server
Through ARP defense methods and systems, the problem of ARP attacks in the LAN is solved. By comprehensively determining the MAC address of the target network node, the tampering cost and fault tolerance mechanism are added, and the network security is improved. It is suitable for LANs without blockchain deployment.
Patent Information
- Application Number
- CN202411256701.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-06
AI Technical Summary
ARP attacks are prone to occur in LANs, resulting in poor network security, especially in LANs where blockchain technology is not deployed, making it difficult to ensure network data security.
Through the ARP defense method and system, it is determined whether the target network node is located in the current LAN, and a request for obtaining ARP table entry information is initiated to all network nodes, and the MAC address corresponding to the IP address of the target network node is comprehensively determined, which increases the cost of tampering and provides error tolerance. Mechanism to avoid ARP attacks.
It effectively improves the network security of the LAN, protects data security, does not need to introduce blockchain technology, reduces the difficulty of implementing the solution, and is suitable for more LAN environments.
Smart Images

Figure CN119094210A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of network security technology, and specifically relates to a method and system for defending against ARP attacks, and an ARP defense server. Background Art
[0002] In the process of Internet of Things and personal home network, small local area networks are formed by routers, WIFI (a wireless communication technology for local area networks) devices, hosts, etc. At present, the network security of the local area network is protected by password verification of the devices connected to the local area network. The devices in the local area network are in an unprotected state, which makes it easy for ARP (Address Resolution Protocol) attacks to occur in the local area network, that is, by implanting backdoor programs such as viruses and Trojans in the target host, the corresponding relationship between the IP (Internet Protocol) address and the MAC (Media Access Control Address) address of the target host is tampered with, so that other devices in the local area network communicate with the target host based on the tampered MAC address. In this way, data will be sent to the device corresponding to the tampered MAC address, which seriously affects the network data security.
[0003] To this end, the relevant technology introduces blockchain technology in the local area network to maintain the corresponding relationship between the IP address and MAC address of each device in the local area network in the blockchain, so that when the source host requests the MAC address of the target host, the MAC address of the target host maintained in the blockchain is returned to the source host. However, this implementation method needs to rely on blockchain technology, which has limitations in usage scenarios and is not applicable to local area networks that do not deploy blockchain. Therefore, in local area networks that do not deploy blockchain, network data security cannot be guaranteed. Summary of the invention
[0004] The embodiments of the present application provide a method, system and ARP defense server for defending against ARP attacks, which can solve the problem in the related art that ARP attacks are prone to occur in a local area network, resulting in poor network security.
[0005] In a first aspect, an embodiment of the present application provides a method for defending against ARP attacks, including:
[0006] Determine whether the target network node is located in the current local area network according to the acquired ARP request information of the first network node for the target network node; the ARP request information carries the Internet Protocol IP address of the target network node;
[0007] In the case where it is determined that the target network node is located in the current local area network, a request for obtaining ARP table entry information of the target network node is initiated to all network nodes in the current local area network; the ARP table entry information of the target network node stores a correspondence between an IP address of the target network node and a media access control MAC address;
[0008] Determine a target MAC address corresponding to the IP address of the target network node according to the acquired ARP table entry information of the target network node;
[0009] The target MAC address is sent to the first network node; the first network node is used to communicate with the target network node according to the target MAC address.
[0010] In a second aspect, an embodiment of the present application provides a system for defending against ARP attacks, including an ARP proxy server and an ARP defense server; wherein:
[0011] The ARP proxy server is used to obtain ARP request information sent by the first network node for the target network node; the ARP request information carries the Internet Protocol IP address of the target network node; and send the ARP request information to the ARP defense server;
[0012] The ARP defense server is used to determine whether the target network node is located in the current local area network according to the acquired ARP request information; when it is determined that the target network node is located in the current local area network, initiate a request to obtain the ARP table entry information of the target network node to all network nodes in the current local area network; the ARP table entry information of the target network node stores the correspondence between the IP address of the target network node and the media access control MAC address; according to the acquired ARP table entry information of the target network node, determine the target MAC address corresponding to the IP address of the target network node; and send the target MAC address to the ARP proxy server;
[0013] The ARP proxy server is further configured to send the received target MAC address to the first network node; and the first network node is configured to communicate with the target network node according to the target MAC address.
[0014] In a third aspect, an embodiment of the present application provides an ARP defense server, including:
[0015] A first determination module is used to determine whether the target network node is located in the current local area network according to the acquired ARP request information of the first network node for the target network node; the ARP request information carries the Internet interconnection protocol IP address of the target network node;
[0016] an acquisition request initiation module, configured to initiate an acquisition request for the ARP table entry information of the target network node to all network nodes in the current local area network when it is determined that the target network node is located in the current local area network; the ARP table entry information of the target network node stores the correspondence between the IP address of the target network node and the media access control MAC address;
[0017] A second determination module is used to determine a target MAC address corresponding to the IP address of the target network node according to the acquired ARP table entry information of the target network node;
[0018] The first sending module is used to send the target MAC address to the first network node; the first network node is used to communicate with the target network node according to the target MAC address.
[0019] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor; and a memory arranged to store computer-executable instructions, wherein the computer-executable instructions are configured to be executed by the processor, and the computer-executable instructions are executed by the processor to implement the steps of the ARP attack defense method as described in the first aspect.
[0020] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the ARP attack defense method described in the first aspect are implemented.
[0021] In a sixth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the ARP attack defense method as described in the first aspect are implemented.
[0022] In a seventh aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run executable instructions to implement the steps of the ARP attack defense method as described in the first aspect.
[0023] In an embodiment of the present application, it is possible to determine whether the target network node is located in the current local area network based on the acquired ARP request information (carrying the IP address of the target network node) of the first network node for the target network node, and thus, when it is determined that the target network node is located in the current local area network, initiate a request to obtain the ARP table entry information of the target network node (which stores the correspondence between the IP address and the MAC address of the target network node) to all network nodes in the current local area network, and then determine the target MAC address corresponding to the IP address of the target network node based on the acquired ARP table entry information of the target network node, and send the target MAC address to the first network node, so that the first network node can communicate with the target network node based on the target MAC address. It can be seen that compared with the method in the related art in which the blockchain maintains the corresponding relationship between the IP address and the MAC address of the target host to ensure that the MAC address of the target host is authentic and reliable, the technical solution changes the response process of the ARP request. For the ARP request information of the first network node for the target network node, the ARP table entry information of the target network node can be fed back through all network nodes in the local area network where the target network node is located, so as to comprehensively determine the MAC address corresponding to the IP address of the target network node according to the multiple ARP table entry information of the target network node. In this way, if the ARP table entry information of the target network node is to be tampered, the ARP table entry information of most network nodes in the local area network needs to be tampered, which increases the tampering cost of the ARP attack. In addition, the technical solution increases the fault tolerance after tampering, that is, even if the ARP table entry information of the target network node stored by some network nodes in the local area network is maliciously modified, as long as the ARP table entry information of the target network node stored by most network nodes is correct, the ARP attack can be effectively avoided, the data security in the local area network is protected, and the network security of the local area network is improved. In addition, this technical solution can ensure that the MAC address of the target network node finally determined is authentic and reliable without the introduction of blockchain technology, which reduces the difficulty of implementing the solution and is conducive to its application in more local area networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a schematic block diagram of an ARP attack defense system provided in an embodiment of the present application;
[0025] Figure 2 It is a flowchart of a method for defending against ARP attacks provided in an embodiment of the present application;
[0026] Figure 3 is a schematic block diagram of a local area network provided in an embodiment of the present application;
[0027] Figure 4 It is a flowchart of a method for defending against ARP attacks provided by another embodiment of the present application;
[0028] Figure 5 This is a schematic diagram of the structure of an ARP defense server provided in an embodiment of the present application;
[0029] Figure 6 This is a schematic diagram of the structure of an ARP proxy server provided in an embodiment of the present application;
[0030] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0033] The following, in conjunction with the accompanying drawings, describes in detail the ARP attack defense method, system and ARP defense server provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0034] Figure 1 is a schematic block diagram of an ARP attack defense system provided in an embodiment of the present application, such as Figure 1 As shown, the ARP attack defense system includes an ARP proxy server 110 and an ARP defense server 120. The ARP attack defense system is deployed in a local area network, which may include several network nodes, such as computers, servers, routers, switches, etc. For ease of explanation, Figure 1Schematically shows three network nodes in the local area network: the first network node 130, the Nth network node 140 and the target network node 150. The Nth network node is used to refer to any network node in the local area network except the first network node 130 and the target network node 150. Other network nodes in the local area network are not described in detail here. Each network node is respectively connected to the ARP proxy server 110 and the ARP defense server 120 for communication, and the ARP proxy server 110 is connected to the ARP defense server 120 for communication.
[0035] It should be understood that the ARP attack defense system provided in the embodiment of the present application is deployed in a local area network. If the local area network is a network including multiple subnets, then the ARP attack defense system needs to be deployed in each subnet. Data is transmitted between different subnets through routers.
[0036] In actual applications, ARP proxy and / or ARP defense can be deployed as functions on a router, or on a separate server. In this embodiment, in order to clearly demonstrate the data interaction process, the ARP proxy function is deployed on the ARP proxy server, and the ARP defense function is deployed on the ARP defense server. In other implementations, the ARP proxy function can be deployed on a router, and the ARP defense function can be deployed on an ARP defense server; or, the ARP proxy function can be deployed on an ARP proxy server, and the ARP defense function can be deployed on a router; or, both the ARP proxy function and the ARP defense function can be deployed on a router.
[0037] In this embodiment, the ARP proxy server 110 is used to obtain the ARP request information sent by the first network node 130 for the target network node 150, and send the ARP request information to the ARP defense server 120. The ARP request information carries the IP address of the target network node 150.
[0038] In this embodiment, the ARP defense server 120 is used to determine whether the target network node 150 is located in the current local area network according to the acquired ARP request information, and then initiate a request to obtain the ARP table entry information of the target network node 150 to all network nodes in the current local area network when it is determined that the target network node 150 is located in the current local area network, and then determine the target MAC address corresponding to the IP address of the target network node 150 according to the acquired ARP table entry information of the target network node 150, and send the target MAC address to the ARP proxy server 110. The ARP table entry information of the target network node 150 stores the correspondence between the IP address and the MAC address of the target network node 150.
[0039] In this embodiment, the ARP proxy server 110 is further configured to send the received target MAC address to the first network node 130. The first network node 130 is configured to communicate with the target network node 150 according to the target MAC address.
[0040] In this embodiment, the ARP defense server 120 is also used to count the largest number of MAC addresses corresponding to the IP address of the target network node 150 based on the acquired ARP table entry information of the target network node 150, thereby determining the largest number of MAC addresses as the target MAC address.
[0041] In this embodiment, the ARP defense server 120 is further configured to, after determining the target MAC address corresponding to the IP address of the target network node 150 according to the acquired ARP table entry information of the target network node 150, initiate an update request for the ARP table entry information of the target network node 150 to all network nodes in the current local area network, and the update request carries the correspondence between the IP address and the target MAC address of the target network node 150. All network nodes are configured to update the ARP table entry information of the target network node 150 maintained by themselves according to the update request.
[0042] In this embodiment, the ARP defense server 120 is also used to return the ARP table entry information of the next-hop router to the first network node 130 when it is determined that the target network node 150 is not located in the current local area network, until the local area network where the target network node 150 is located is determined.
[0043] The ARP entry information of the next hop router stores the correspondence between the IP address and the MAC address of the next hop router. The first network node 130 is used to send the ARP request information for the target network node 150 to the next hop router according to the ARP entry information of the next hop router.
[0044] In this embodiment, the ARP defense server 120 is also used to receive an ARP table entry information publishing request of a second network node newly connected to the current local area network, and then publish the ARP table entry information of the second network node to all network nodes in the current local area network according to the publishing request. The publishing request carries the corresponding relationship between the IP address and the MAC address of the second network node.
[0045] In the embodiment of the present application, the ARP proxy server plays the role of intercepting and forwarding the ARP request information of the first network node for the target network node, providing a basis for changing the response process of the ARP request, which has been described in detail in the above embodiment and will not be repeated in the following. The following is a detailed description of the specific operations performed by the ARP defense server 120 in the ARP attack defense system in the process of defending against ARP attacks in the local area network. Figure 2A method for defending against an ARP attack provided in an embodiment of the present application is shown. The method is applied to an ARP defense server 120. The method includes the following steps:
[0046] Step 202: Determine whether the target network node is located in the current local area network according to the acquired ARP request information of the first network node for the target network node.
[0047] Among them, the ARP request information carries the IP address of the target network node. The current LAN is the LAN where the ARP defense server is located. Optionally, it can be determined whether the target network node is located in the current LAN based on the IP address of the target network node and the IP address of the ARP defense server. Specifically, the subnet mask of the target network node and the subnet mask of the ARP defense server can be viewed based on the IP address, and the network number and host number can be divided according to the subnet mask. If the network numbers are the same, it means that the target network node and the ARP defense server are in the same LAN, that is, the target network node is located in the current LAN.
[0048] Optionally, it is possible to determine whether the target network node is located in the current LAN according to the network node attribution table preset in the ARP defense server. Specifically, after the LAN is established, the ARP defense server in the LAN can collect information of the network nodes in the LAN (such as IP address information), thereby creating a network node attribution table, which provides a basis for determining whether the network node is located in the current LAN.
[0049] Step 204: When it is determined that the target network node is located in the current local area network, a request for obtaining the ARP table entry information of the target network node is initiated to all network nodes in the current local area network.
[0050] The ARP entry information of the target network node stores the correspondence between the IP address and the MAC address of the target network node. It should be understood that in the embodiment of the present application, any network node in the local area network maintains the ARP entry information of all network nodes in the local area network.
[0051] Step 206: Determine the target MAC address corresponding to the IP address of the target network node according to the acquired ARP table entry information of the target network node.
[0052] Step 208: Send the target MAC address to the first network node.
[0053] The first network node is used to communicate with the target network node according to the target MAC address.
[0054] In an embodiment of the present application, it is possible to determine whether the target network node is located in the current local area network based on the acquired ARP request information (carrying the IP address of the target network node) of the first network node for the target network node, and thus, when it is determined that the target network node is located in the current local area network, initiate a request to obtain the ARP table entry information of the target network node (which stores the correspondence between the IP address and the MAC address of the target network node) to all network nodes in the current local area network, and then determine the target MAC address corresponding to the IP address of the target network node based on the acquired ARP table entry information of the target network node, and send the target MAC address to the first network node, so that the first network node can communicate with the target network node based on the target MAC address. It can be seen that compared with the method in the related art in which the blockchain maintains the corresponding relationship between the IP address and the MAC address of the target host to ensure that the MAC address of the target host is authentic and reliable, the technical solution changes the response process of the ARP request. For the ARP request information of the first network node for the target network node, the ARP table entry information of the target network node can be fed back through all network nodes in the local area network where the target network node is located, so as to comprehensively determine the MAC address corresponding to the IP address of the target network node according to the multiple ARP table entry information of the target network node. In this way, if the ARP table entry information of the target network node is to be tampered, the ARP table entry information of most network nodes in the local area network needs to be tampered, which increases the tampering cost of the ARP attack. In addition, the technical solution increases the fault tolerance after tampering, that is, even if the ARP table entry information of the target network node stored by some network nodes in the local area network is maliciously modified, as long as the ARP table entry information of the target network node stored by most network nodes is correct, the ARP attack can be effectively avoided, the data security in the local area network is protected, and the network security of the local area network is improved. In addition, this technical solution can ensure that the MAC address of the target network node finally determined is authentic and reliable without the introduction of blockchain technology, which reduces the difficulty of implementing the solution and is conducive to its application in more local area networks.
[0055] In one implementation, determining the target MAC address corresponding to the IP address of the target network node based on the acquired ARP table entry information of the target network node (i.e., step 206) can be performed as follows: based on the acquired ARP table entry information of the target network node, counting the MAC addresses with the largest number corresponding to the IP address of the target network node, thereby determining the MAC address with the largest number as the target MAC address.
[0056] In this embodiment, a referendum mechanism is adopted, and the ARP table entry information of the target network node fed back by all network nodes in the local area network is equivalent to each network node in the local area network voting on the ARP table entry information of the target network node, and the MAC address therein is determined as the target MAC address corresponding to the target network node by counting the ARP table entry information with the most votes. In this way, if the IP address of the target network node is to be directed to the wrong MAC address, the ARP table entry information of the target network node maintained in more than half of the network nodes in the local area network needs to be modified at the same time to succeed. It can be seen that this implementation method increases the tampering cost of ARP attacks.
[0057] In one implementation, after determining the target MAC address corresponding to the IP address of the target network node based on the acquired ARP table entry information of the target network node (i.e., step 206), an update request for the ARP table entry information of the target network node can be initiated to all network nodes in the current local area network, and the update request carries the correspondence between the IP address of the target network node and the target MAC address.
[0058] Among them, all network nodes are used to update the ARP table entry information of the target network node they maintain according to the update request. In order to prevent the ARP table entry information maintained by each network node from being changed arbitrarily, in actual applications, each network node can be set to only respond to the update request sent by the ARP defense server, so as to update the ARP table entry information maintained by itself.
[0059] In this embodiment, the ARP defense server initiates an update request for the ARP table entry information of the target network node after determining the target MAC address corresponding to the target network node. This is beneficial for all network nodes in the local area network to update the ARP table entry information of the target network node they maintain, thereby achieving the effect of timely error correction and avoiding error accumulation, which is beneficial to ensuring the accuracy of the ARP table entry information maintained by each network node.
[0060] In one implementation, the ARP defense server may receive an ARP entry information publication request of a second network node newly connected to the current local area network, and publish the ARP entry information of the second network node to all network nodes in the current local area network according to the publication request.
[0061] The publication request carries the correspondence between the IP address and the MAC address of the second network node. All network nodes are used to add the ARP table entry information of the second network node to the ARP table entry information maintained by themselves according to the publication request.
[0062] In this embodiment, when a new device joins the network, its own ARP entry information is published through the ARP defense server, which is beneficial for each network node in the local area network to timely maintain the ARP entry information of the new device.
[0063] In one implementation, when it is determined that the target network node is not located in the current local area network, the ARP table entry information of the next-hop router may be returned to the first network node until the local area network where the target network node is located is determined.
[0064] The ARP table entry information of the next-hop router stores the correspondence between the IP address and the MAC address of the next-hop router. The first network node is used to send the ARP request information for the target network node to the next-hop router according to the ARP table entry information of the next-hop router. Optionally, the ARP table entry information of the next-hop router can be maintained in the static ARP table entry of the ARP defense server.
[0065] In this embodiment, if the target network node is not located in the current LAN, it means that the target network node and the ARP defense server are in different LANs. Since the LANs need to rely on routers to transmit data, the ARP defense server can return the ARP table entry information of the next-hop router to the first network node, so that the first network node sends the ARP request information for the target network node to the next-hop router. In the next-hop router, it is determined again whether the target network node is located in the LAN where the router is located, until the LAN where the target network node is located is determined, so that the ARP defense server in the LAN where the target network node is located executes the above steps 204 to 206 to determine the target MAC address corresponding to the IP address of the target network node, and then forwards the target MAC address to the first network node through the router.
[0066] The above is the ARP attack defense method provided in the embodiment of the present application. The following is a detailed description of the application of the ARP attack defense method provided by the present application in this scenario in combination with a specific application scenario.
[0067] With the large-scale promotion of Internet of Things technology and the rapid development of 5G (5th Generation Mobile Communication Technology), there will be more application scenarios that form their own local area networks. As a result, network security issues are receiving more and more attention, especially as the Internet of Things is the main bearer, and the demand for network security is getting higher and higher in cases such as network connection and new equipment joining the network. To this end, the embodiment of the present application provides a method for defending against ARP attacks, which increases the cost of ARP attack tampering and increases the fault tolerance after tampering, can effectively avoid ARP attacks, and improve the network security of the local area network.
[0068] In an application scenario where the initiator of the ARP request (i.e., the first network node in the above embodiment) and the requested party (i.e., the target network node in the above embodiment) are located in a local area network, the defense method for ARP attacks can be found in Figure 1 To avoid repetition, the embodiments are not described again here.
[0069] Next, the ARP attack defense method provided by the embodiment of the present application is described in detail by taking the application scenario where the initiator and the requested party of the ARP request are located in different subnets as an example. In this embodiment, the local area network is a network including three subnets, such as Figure 3 As shown, the local area network includes subnet 1, subnet 2 and subnet 3. Subnet 1 includes ARP defense server 1, ARP proxy server 1, router 1, network node A1, network node B1 and network node C1. Subnet 2 includes ARP defense server 2, ARP proxy server 2, router 2, network node A2, network node B2 and network node C2. Subnet 3 includes ARP defense server 3, ARP proxy server 3, router 3, network node A3, network node B3 and network node C3.
[0070] Here, network node A1 is designated as the first network node, and network node C3 is designated as the target network node. Router 2 is the next-hop router of router 1, and router 3 is the next-hop router of router 2. Each network node in the subnet is connected to a router, an ARP defense server, and an ARP proxy server respectively. The routers, ARP defense servers, and ARP proxy servers in the subnet are connected to each other. In order to make the information flow in the process of obtaining the MAC address of network node C3 clearer, the above connection relationship is not reflected in the Figure 3 middle, Figure 3 In the figure, only arrows are used to indicate the information flow in the process of obtaining the MAC address of the network node C3. Figure 4 The illustrated embodiment is described using this scenario as an example.
[0071] Figure 4 FIG. 1 is a flow chart of a method for defending against an ARP attack provided by another embodiment of the present application. Figure 4 As shown, the method includes:
[0072] Step 401: ARP proxy server 1 obtains ARP request information sent by network node A1 to network node C3.
[0073] The ARP request information carries the IP address of the network node C3.
[0074] Step 402: ARP proxy server 1 sends the above ARP request information to ARP defense server 1.
[0075] Step 403 , the ARP defense server 1 determines whether the network node C3 is located in the local area network 1 according to the acquired ARP request information.
[0076] Step 404 , when the ARP defense server 1 determines that the network node C3 is not located in the local area network 1 , the ARP defense server 1 returns the ARP table entry information of the router 2 to the network node A1 .
[0077] The ARP entry information of router 2 stores the correspondence between the IP address and the MAC address of router 2. Optionally, the ARP defense server 1 may return the ARP entry information of router 2 to the network node A1 through the ARP proxy server 1, or the ARP defense server 1 may directly return the ARP entry information of router 2 to the network node A1.
[0078] Step 405 : The network node A1 sends ARP request information for the network node C3 to the router 2 according to the ARP table entry information of the router 2 .
[0079] The ARP request information for network node C3 sent by network node A1 to router 2 will be forwarded by router 1 .
[0080] Step 406 : When confirming that the router 2 does not maintain the ARP entry information of the network node C3 , the router 2 sends the ARP request information for the network node C3 to the ARP proxy server 2 .
[0081] Step 407: ARP proxy server 2 sends the acquired ARP request information to ARP defense server 2.
[0082] Step 408 , the ARP defense server 2 determines whether the network node C3 is located in the local area network 2 according to the acquired ARP request information.
[0083] Step 409 , when the ARP defense server 2 determines that the network node C3 is not located in the local area network 2 , the ARP defense server 2 returns the ARP table entry information of the router 3 to the router 2 .
[0084] The ARP entry information of the router 3 stores the correspondence between the IP address and the MAC address of the router 3 .
[0085] Step 410 : Router 2 sends ARP request information for network node C3 to router 3 according to the ARP table entry information of router 3 .
[0086] Step 411 : Router 3 sends the ARP request information for network node C3 to ARP proxy server 3 .
[0087] Step 412: ARP proxy server 3 sends the acquired ARP request information to ARP defense server 3.
[0088] Step 413 , when determining that the network node C3 is located in the local area network 3 , the ARP defense server 3 initiates a request to obtain the ARP table entry information of the network node C3 to all network nodes in the local area network 3 .
[0089] The ARP entry information of the network node C3 stores the correspondence between the IP address and the MAC address of the network node C3.
[0090] Step 414: The ARP defense server 3 determines the target MAC address corresponding to the IP address of the network node C3 according to the acquired ARP table entry information of the network node C3.
[0091] Step 415, ARP defense server 3 sends the target MAC address to router 3.
[0092] Step 416 , Router 3 sends the target MAC address to Router 2 .
[0093] Step 417 , Router 2 sends the target MAC address to Router 1 .
[0094] Step 418: Router 1 sends the target MAC address to network node A1.
[0095] Step 419: Network node A1 communicates with network node C3 based on the target MAC address.
[0096] The specific process of the above steps 401 to 419 has been described in detail in the above embodiments and will not be repeated here.
[0097] The ARP attack defense method provided in the embodiment of the present application, compared with the method in the related art in which the blockchain maintains the corresponding relationship between the IP address and the MAC address of the target host to ensure that the MAC address of the target host is authentic and reliable, changes the response process of the ARP request, and for the ARP request information of the first network node for the target network node, the ARP table entry information of the target network node can be fed back through all network nodes in the local area network where the target network node is located, so as to comprehensively determine the MAC address corresponding to the IP address of the target network node according to the multiple ARP table entry information of the target network node. In this way, if the ARP table entry information of the target network node is to be tampered, the ARP table entry information of most network nodes in the local area network needs to be tampered, which increases the tampering cost of the ARP attack. In addition, the technical solution increases the fault tolerance after tampering, that is, even if the ARP table entry information of the target network node stored by some network nodes in the local area network is maliciously modified, as long as the ARP table entry information of the target network node stored by most network nodes is correct, the ARP attack can be effectively avoided, the data security in the local area network is protected, and the network security of the local area network is improved. In addition, this technical solution can ensure that the MAC address of the target network node finally determined is authentic and reliable without the introduction of blockchain technology, which reduces the difficulty of implementing the solution and is conducive to its application in more local area networks.
[0098] It should be noted that the ARP attack defense method provided in the embodiment of the present application can be executed by an ARP defense server, or a control module in the ARP defense server for executing the ARP attack defense method. In the embodiment of the present application, the ARP defense server executing the ARP attack defense method is taken as an example to illustrate the ARP defense server provided in the embodiment of the present application.
[0099] Figure 5 Schematic diagram of the structure of an ARP defense server provided in an embodiment of the present application. Figure 5 As shown, the ARP defense server includes: a first determination module 510, an acquisition request initiation module 520, a second determination module 530 and a first sending module 540.
[0100] The first determination module 510 is used to determine whether the target network node is located in the current local area network based on the acquired ARP request information of the first network node for the target network node; the ARP request information carries the Internet Protocol IP address of the target network node; the acquisition request initiation module 520 is used to initiate an acquisition request for the ARP table entry information of the target network node to all network nodes in the current local area network when it is determined that the target network node is located in the current local area network; the ARP table entry information of the target network node stores the correspondence between the IP address of the target network node and the media access control MAC address; the second determination module 530 is used to determine the target MAC address corresponding to the IP address of the target network node based on the acquired ARP table entry information of the target network node; the first sending module 540 is used to send the target MAC address to the first network node; the first network node is used to communicate with the target network node based on the target MAC address.
[0101] In one implementation, the second determination module 530 includes: a statistical unit, used to count the largest number of MAC addresses corresponding to the IP address of the target network node based on the acquired ARP table entry information of the target network node; and a determination unit, used to determine the largest number of MAC addresses as the target MAC address.
[0102] In one implementation, the ARP defense server also includes: an update request initiating module, which is used to initiate an update request for the ARP table entry information of the target network node to all network nodes in the current local area network after determining the target MAC address corresponding to the IP address of the target network node based on the acquired ARP table entry information of the target network node, and the update request carries the correspondence between the IP address of the target network node and the target MAC address; wherein all network nodes are used to update the ARP table entry information of the target network node maintained by themselves according to the update request.
[0103] In one implementation, the ARP defense server also includes: an execution module, which is used to return the ARP table entry information of the next-hop router to the first network node when it is determined that the target network node is not located in the current local area network, until the local area network where the target network node is located is determined; wherein the ARP table entry information of the next-hop router stores the correspondence between the IP address and the MAC address of the next-hop router; and the first network node is used to send the ARP request information for the target network node to the next-hop router according to the ARP table entry information of the next-hop router.
[0104] In one implementation, the ARP defense server also includes: a receiving module, used to receive an ARP table entry information publication request of a second network node newly connected to the current local area network; the publication request carries the correspondence between the IP address and the MAC address of the second network node; and a publication module, used to publish the ARP table entry information of the second network node to all network nodes in the current local area network according to the publication request.
[0105] By adopting the technical solution provided by the embodiment of the present application, compared with the method in the related art in which the blockchain maintains the corresponding relationship between the IP address and the MAC address of the target host to ensure that the MAC address of the target host is authentic and reliable, the response process of the ARP request is changed. For the ARP request information of the first network node for the target network node, the ARP table entry information of the target network node can be fed back through all network nodes in the local area network where the target network node is located, so as to comprehensively determine the MAC address corresponding to the IP address of the target network node according to the multiple ARP table entry information of the target network node. In this way, if the ARP table entry information of the target network node is to be tampered, the ARP table entry information of most network nodes in the local area network needs to be tampered, which increases the tampering cost of the ARP attack. In addition, the technical solution increases the fault tolerance after tampering, that is, even if the ARP table entry information of the target network node stored by some network nodes in the local area network is maliciously modified, as long as the ARP table entry information of the target network node stored by most network nodes is correct, the ARP attack can be effectively avoided, the data security in the local area network is protected, and the network security of the local area network is improved. In addition, this technical solution can ensure that the MAC address of the target network node finally determined is authentic and reliable without the introduction of blockchain technology, which reduces the difficulty of implementing the solution and is conducive to its application in more local area networks.
[0106] Figure 6 Schematic diagram of the structure of an ARP proxy server provided in an embodiment of the present application. Figure 6 As shown, the ARP proxy server includes: an acquisition module 610 , a second sending module 620 and a third sending module 630 .
[0107] An acquisition module 610 is used to acquire ARP request information sent by the first network node for the target network node; the ARP request information carries the IP address of the target network node; a second sending module 620 is used to send the ARP request information to an ARP defense server; the ARP defense server is used to determine the target MAC address corresponding to the IP address of the target network node based on the ARP request information, and send the target MAC address to the ARP proxy server; a third sending module 630 is used to send the received target MAC address to the first network node; the first network node is used to communicate with the target network node based on the target MAC address.
[0108] By adopting the technical solution provided by the embodiment of the present application, compared with the method in the related art in which the blockchain maintains the corresponding relationship between the IP address and the MAC address of the target host to ensure that the MAC address of the target host is authentic and reliable, the response process of the ARP request is changed. For the ARP request information of the first network node for the target network node, the ARP table entry information of the target network node can be fed back through all network nodes in the local area network where the target network node is located, so as to comprehensively determine the MAC address corresponding to the IP address of the target network node according to the multiple ARP table entry information of the target network node. In this way, if the ARP table entry information of the target network node is to be tampered, the ARP table entry information of most network nodes in the local area network needs to be tampered, which increases the tampering cost of the ARP attack. In addition, the technical solution increases the fault tolerance after tampering, that is, even if the ARP table entry information of the target network node stored by some network nodes in the local area network is maliciously modified, as long as the ARP table entry information of the target network node stored by most network nodes is correct, the ARP attack can be effectively avoided, the data security in the local area network is protected, and the network security of the local area network is improved. In addition, this technical solution can ensure that the MAC address of the target network node finally determined is authentic and reliable without the introduction of blockchain technology, which reduces the difficulty of implementing the solution and is conducive to its application in more local area networks.
[0109] The ARP defense server and the ARP proxy server in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0110] The ARP defense server and ARP proxy server provided in the embodiments of the present application can be used to implement the various processes implemented in the embodiments of the ARP attack defense method described above. To avoid repetition, they will not be described here.
[0111] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned ARP attack defense method. Figure 7 A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor (processor) 710, a communication interface (Communications Interface) 720, a memory (memory) 730 and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call a computer program stored in the memory 730 and executable on the processor 710 to perform the following steps:
[0112] According to the acquired ARP request information of the first network node for the target network node, determine whether the target network node is located in the current local area network; the ARP request information carries the Internet Protocol IP address of the target network node; when it is determined that the target network node is located in the current local area network, initiate a request to obtain the ARP table entry information of the target network node to all network nodes in the current local area network; the ARP table entry information of the target network node stores the correspondence between the IP address of the target network node and the media access control MAC address; according to the acquired ARP table entry information of the target network node, determine the target MAC address corresponding to the IP address of the target network node; send the target MAC address to the first network node; the first network node is used to communicate with the target network node according to the target MAC address.
[0113] By adopting the technical solution provided by the embodiment of the present application, compared with the method in the related art in which the blockchain maintains the corresponding relationship between the IP address and the MAC address of the target host to ensure that the MAC address of the target host is authentic and reliable, the response process of the ARP request is changed. For the ARP request information of the first network node for the target network node, the ARP table entry information of the target network node can be fed back through all network nodes in the local area network where the target network node is located, so as to comprehensively determine the MAC address corresponding to the IP address of the target network node according to the multiple ARP table entry information of the target network node. In this way, if the ARP table entry information of the target network node is to be tampered, the ARP table entry information of most network nodes in the local area network needs to be tampered, which increases the tampering cost of the ARP attack. In addition, the technical solution increases the fault tolerance after tampering, that is, even if the ARP table entry information of the target network node stored by some network nodes in the local area network is maliciously modified, as long as the ARP table entry information of the target network node stored by most network nodes is correct, the ARP attack can be effectively avoided, the data security in the local area network is protected, and the network security of the local area network is improved. In addition, this technical solution can ensure that the MAC address of the target network node finally determined is authentic and reliable without the introduction of blockchain technology, which reduces the difficulty of implementing the solution and is conducive to its application in more local area networks.
[0114] The specific execution steps can refer to the various steps of the above-mentioned ARP attack defense method embodiment, and can achieve the same technical effect. To avoid repetition, they are not described here.
[0115] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices except terminals.
[0116] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0117] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).
[0118] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.
[0119] The embodiment of the present application also provides a computer-readable storage medium, which is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the various processes of the above-mentioned ARP attack defense method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0120] The processor is the processor in the electronic device described in the above embodiment. The computer readable storage medium is, for example, a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0121] The embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, each process of the above-mentioned ARP attack defense method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0122] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned ARP attack defense method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0123] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0124] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0126] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for defending against Address Resolution Protocol (ARP) attacks, characterized in that: include: Determine whether the target network node is located in the current local area network according to the acquired ARP request information of the first network node for the target network node; The ARP request information carries the Internet Protocol IP address of the target network node; In the case where it is determined that the target network node is located in the current local area network, a request for obtaining ARP table entry information of the target network node is initiated to all network nodes in the current local area network; the ARP table entry information of the target network node stores a correspondence between an IP address of the target network node and a media access control MAC address; Determine a target MAC address corresponding to the IP address of the target network node according to the acquired ARP table entry information of the target network node; The target MAC address is sent to the first network node; the first network node is used to communicate with the target network node according to the target MAC address.
2. The method according to claim 1, characterized in that The determining, according to the acquired ARP entry information of the target network node, a target MAC address corresponding to the IP address of the target network node includes: According to the acquired ARP table entry information of the target network node, counting the largest number of MAC addresses corresponding to the IP address of the target network node; The MAC address with the largest number is determined as the target MAC address.
3. The method according to claim 1, characterized in that After determining the target MAC address corresponding to the IP address of the target network node according to the acquired ARP table entry information of the target network node, the method further includes: Initiate an update request for the ARP table entry information of the target network node to all network nodes in the current local area network, wherein the update request carries a correspondence between the IP address of the target network node and the target MAC address; Wherein, all the network nodes are used to update the ARP entry information of the target network node maintained by themselves according to the update request.
4. The method according to claim 1, characterized in that: The method further comprises: When it is determined that the target network node is not located in the current local area network, returning the ARP table entry information of the next-hop router to the first network node until the local area network where the target network node is located is determined; The ARP entry information of the next-hop router stores the correspondence between the IP address and the MAC address of the next-hop router; the first network node is used to send the ARP request information for the target network node to the next-hop router according to the ARP entry information of the next-hop router.
5. The method according to claim 1, characterized in that The method further comprises: Receiving an ARP table entry information publishing request of a second network node newly connected to the current local area network; the publishing request carries a correspondence between an IP address and a MAC address of the second network node; According to the publication request, the ARP table entry information of the second network node is published to all network nodes in the current local area network.
6. A defense system against ARP attacks, characterized in that: Including ARP proxy server and ARP defense server; among them, The ARP proxy server is used to obtain ARP request information sent by the first network node for the target network node; the ARP request information carries the Internet Protocol IP address of the target network node; and send the ARP request information to the ARP defense server; The ARP defense server is used to determine whether the target network node is located in the current local area network according to the acquired ARP request information; when it is determined that the target network node is located in the current local area network, initiate a request to obtain the ARP table entry information of the target network node to all network nodes in the current local area network; the ARP table entry information of the target network node stores the correspondence between the IP address of the target network node and the media access control MAC address; according to the acquired ARP table entry information of the target network node, determine the target MAC address corresponding to the IP address of the target network node; and send the target MAC address to the ARP proxy server; The ARP proxy server is further configured to send the received target MAC address to the first network node; and the first network node is configured to communicate with the target network node according to the target MAC address.
7. An ARP defense server, characterized in that: include: A first determination module, configured to determine whether the target network node is located in the current local area network according to the acquired ARP request information of the first network node for the target network node; The ARP request information carries the Internet Protocol IP address of the target network node; an acquisition request initiation module, configured to initiate an acquisition request for the ARP table entry information of the target network node to all network nodes in the current local area network when it is determined that the target network node is located in the current local area network; the ARP table entry information of the target network node stores the correspondence between the IP address of the target network node and the media access control MAC address; A second determination module is used to determine a target MAC address corresponding to the IP address of the target network node according to the acquired ARP table entry information of the target network node; The first sending module is used to send the target MAC address to the first network node; the first network node is used to communicate with the target network node according to the target MAC address.
8. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions, wherein the computer executable instructions are configured to be executed by the processor, and the computer executable instructions are executed by the processor to implement the ARP attack defense method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the ARP attack defense method according to any one of claims 1 to 5 is implemented.
10. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the ARP attack defense method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for preventing local area network ARP defection attacks
CN101635713A
Method and device for detecting address resolution protocol attacks in local area network
CN104219339A
Virtual network security defense method and device, equipment and storage medium
CN116582357A
