Method for defending IP spoofing attack in network based on weighted network path quantization algorithm

Through the weighted network path quantization algorithm to identify and filter IP spoof attacks, the problem of IP spoof attack defense is solved, high-precision recognition and low-consumption network defense effects are achieved, and network security is significantly improved.

CN119094222APending Publication Date: 2024-12-06HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411292065.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively defend against IP spoofing attacks. Attackers disguise themselves as trusted hosts or users by tampering with the source IP address of the data packet, resulting in network security threats and infringement of legitimate rights and interests.

Method used

The weighted network path quantization algorithm is used to identify and filter the mathematical features of the data packet network path, calculate the network path quantization value and compare it with the historical mean, determine the legal or attack traffic, and realize the defense against IP spoofing attacks.

Benefits of technology

In high-throughput scenarios, high-precision identification of IP spoofing attacks is achieved, with the average link throughput consumption less than 10%, and the attack recognition rate reaches more than 80%, effectively defending against IP spoofing attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094222A_ABST
    Figure CN119094222A_ABST
Patent Text Reader

Abstract

The invention provides an in-network IP spoofing attack defense method based on a weighted network path quantization algorithm based on the fact that an attacker of an IP spoofing attack cannot tamper a network path of a data packet. According to the method, attack data packets are identified and filtered through a proposed weighted network path quantization algorithm to achieve the purpose of defending against IP spoofing attacks, and the weighted network path quantization algorithm reflects the uniqueness of the paths through mathematical features of the network paths of the data packets and can cope with the change of legal routing. And relatively high attack identification accuracy and relatively low throughput consumption are realized. The method can be completely deployed on a programmable data plane, and IP spoofing attack defense of a linear rate is provided for an internal network of an enterprise or an organization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer network security, and in particular relates to a method for defending against IP spoofing attacks in a network based on a weighted network path quantization algorithm. Background Art

[0002] Spoofing attacks exploit the flaws in network authentication mechanisms and modify their own identity information, allowing attackers to disguise themselves as trusted users or devices, thereby conducting sabotage activities or stealing confidential information. Currently, spoofing attack methods mainly include IP spoofing, ARP spoofing, and DNS spoofing.

[0003] IP spoofing attacks take advantage of the lack of reliability of the IP protocol in the TCP / IP protocol stack to arbitrarily change the information in the TCP / IP protocol stack. By tampering with the source IP address of the data packet and taking advantage of the normal trust relationship between hosts based on the IP address, the attacker can forge his identity as a trusted host or user to achieve the purpose of illegally using online resources or hiding his identity to engage in sabotage activities. At present, there are two main types of mainstream IP spoofing attacks: one is to hide one's identity by forging an IP address and then launch a denial of service attack (DoS) to destroy the availability of the network; the other is to launch a session hijacking attack by modifying the source IP to the IP address of a trusted user to access confidential information. IP spoofing attacks seriously infringe on the legitimate rights and interests of network users and pose a huge threat to network security. However, even if the attacker can arbitrarily tamper with the information of the protocol stack, the attacker cannot modify the path that the data packet passes through in the network core because it is determined by the routing algorithm.

[0004] The emergence of programmable data plane makes up for the shortcomings of traditional software-defined network SDN. Network operators or network administrators can directly use P4 language to program the matching forwarding pipeline of programmable switches. Programmers can customize the matching header and the action to be performed, which makes the software-defined network protocol-independent and truly scalable. In addition, by offloading traditional network applications (such as load balancers, firewalls, etc.) deployed on the control plane to the data plane, the advantages of high-throughput processing of the programmable data plane can be brought into play, eliminating the communication delay between the data plane and the control plane, and realizing the real-time online deployment of network functions. It can greatly promote the innovation of network applications and network protocols. Summary of the invention

[0005] Based on the fact that the attacker of IP spoofing attack cannot tamper with the network path of the data packet, the present invention proposes a network IP spoofing attack defense method based on a weighted network path quantization algorithm. The method identifies and filters the attack data packet through the proposed weighted network path quantization algorithm to achieve the purpose of defending against IP spoofing attack. The weighted network path quantization algorithm reflects the uniqueness of the path through the mathematical characteristics of the network path of the data packet and can cope with the change of the legal route. The method can be fully deployed in the programmable data plane to provide line-rate IP spoofing attack defense for the internal network of an enterprise or organization.

[0006] The technical solution adopted by the present invention to achieve the above-mentioned object is as follows: the defense method for filtering IP spoofing attacks has the following three steps: network path quantization value calculation, flow feature statistics, and attack flow filtering.

[0007] 1. Network path quantization value calculation. The weighted network path quantization algorithm performs chain hash operations on all MAC addresses in the network path that each data packet passes through, and weights the operation process according to the number of hops of the data packet to calculate the network path quantization value of each data packet. Every time a data packet passes through a router, the network path quantization value is calculated according to the weighted path quantization algorithm. The packet header carries the latest calculated network path quantization value and hop count to enter the next router for further iteration;

[0008] 2. Flow feature statistics. Real-time calculation of the historical average of the network path quantization value of legitimate traffic, and storage through a mapping table of the historical average and IP or IP prefix;

[0009] 3. Attack flow filtering. For each data packet arriving at the router where the mapping table is located, the network path quantization value it carries is compared with the historical mean of the network path quantization value corresponding to the same IP or IP prefix in the mapping table. If the absolute value of the difference between the network path quantization value carried by the data packet and the historical mean in the mapping table is greater than or equal to β times the historical mean, it is determined to be an IP spoofing data packet and a packet drop operation is performed on it, thereby achieving the purpose of defending against IP spoofing attacks; otherwise, it is regarded as a legitimate traffic data packet and flow feature statistics are performed.

[0010] Experimental verification shows that this method can achieve high-precision identification of two major IP spoofing attacks in high-throughput scenarios, with the average link throughput consumption lower than 10% and the average attack recognition rate exceeding 80% under certain parameter settings. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 This is a schematic diagram of the DDoS attack process based on IP spoofing.

[0012] Figure 2 Schematic diagram of the session hijacking attack process based on IP spoofing.

[0013] Figure 3 Schematic diagram of the core idea of ​​the weighted network path quantization algorithm.

[0014] Figure 4 Schematic diagram of the calculation process of the weighted network path quantization algorithm. DETAILED DESCRIPTION

[0015] The present invention is further described below in conjunction with the accompanying drawings.

[0016] Figure 1 The following is a schematic diagram of the DDoS attack process based on IP spoofing. Attackers usually control a botnet consisting of multiple hosts through worm viruses and use forged source IP addresses to hide their identities, thereby bypassing defense measures such as firewalls and launching distributed denial of service (DDoS) attacks or distributed low-rate denial of service (DLDoS) attacks, greatly reducing the availability of key links.

[0017] Figure 2 The following is a diagram of the session hijacking attack process based on IP spoofing. The session hijacking attack is initiated by sniffing the sequence number of a legitimate TCP connection. The attacker disguises himself as a legitimate user who initiates the session by modifying the source IP address to the IP address of the target of attack, sniffs the sequence number of the TCP connection, uses the correct sequence number to establish a connection with the recipient of the session, and suppresses the victim's traffic through a denial of service attack, in order to achieve the purpose of impersonating a trusted user to access the user's privacy information.

[0018] Figure 3 The following is a schematic diagram of the core idea of ​​the weighted network path quantization algorithm. Assume that hosts h1, h2, and h3 represent the subnets where legitimate users within an enterprise or organization are located. These legitimate users may represent internal employees of an enterprise or organization, who can access internal resources by authenticating and establishing a connection with the subnet where the internal server (h4) is located. Host h5 represents the network segment where the attacker is located, S1, S2, and S3 represent the gateways of the internal legitimate users, internal servers, and attacker subnets, respectively, and autonomous systems AS1 and AS2 are used to represent the core part of the network. Assume that legitimate users (h1-h3) within an enterprise or organization and attacker h5 must establish a connection with the internal server h4 through autonomous system AS2, and the attacker must also go through autonomous system AS1.

[0019] Among them, the data packets that the attacker wants to send must pass through the S8 and S9 routers in AS1, and the attacker and the legitimate user must pass through the S4, S5 and S7 routers in AS2, as shown by the solid line, and due to the decision changes of the routing algorithm within the autonomous system AS1, the traffic of the attacker and the legitimate user may undergo routing changes in AS1, and their network paths are diverted as shown by the dotted line. The attacker (h5) may disguise himself as a legitimate employee (h1-h3) within an enterprise or organization through IP spoofing, launch a DoS attack to attack the bottleneck link (between routers S7 and S3) that accesses the internal server (h4) to reduce the availability of the internal network, or launch a session hijacking attack through IP spoofing to impersonate an internal user and establish a connection with the server to steal confidential information within the enterprise or organization.

[0020] However, no matter how the attacker forges his identity through IP spoofing, the network path of the attack data packet is not easily modified. In addition, due to the spatial match between the attacker's attack target and the access target of the internal legitimate user, the attack traffic and the legitimate traffic are relatively similar in the core part of the network, especially near the destination. Due to the physical difference between the attacker and the legitimate user (assuming that the attacker cannot control the internal employees of the enterprise to carry out malicious activities), that is, the difference in the space where the two are located and the network card devices used, there are significant differences in the front characteristics of the path near the source, that is, the path shown by the dotted line composed of line segments and points in the figure.

[0021] Therefore, the design should reflect as many differences as possible in the front of the path and as few differences as possible in the back of the path. For routing changes of legitimate traffic, since routing changes of packets are mainly determined by routing algorithms in the core part of the network, such as routing algorithms between or within autonomous systems, corresponding to the two autonomous systems (AS1 and AS2) shown in the figure, routing changes mainly occur in the back half of the network path. Therefore, if the differences in the network path can be reflected by the algorithm, and such differences appear more in the front of the path and less in the back of the path, then even if the legitimate route has changed, it is still possible to distinguish attack traffic from legitimate traffic.

[0022] Figure 4 The figure is a diagram of the calculation process of the weighted network path quantization algorithm. The network path that the data packet passes through contains a certain number of routers and links between routers. According to the routing algorithm, the data packet enters the next link from the router's exit, and then leaves the link from the router entrance at the other end of the link to continue routing. Therefore, the path can be regarded as a collection of n MAC addresses, which are exactly the MAC addresses of the router port network cards that the data packet passes through, such as Figure 4 MAC iThese MAC addresses can be chained and hashed, and the intermediate hash results can be placed in the packet header using the protocol independence of the P4 language, and then updated on the next router.

[0023] Since the algorithm needs to focus on the characteristics of the front part of the network path and consider less the characteristics of the back part of the network path. Therefore, the algorithm also needs to weight each operation. The closer to the front part of the network path, the greater the weight, and the closer to the back part, the smaller the weight. The algorithm weights the operation process through shift operations and reflects the relative position of the operation process in the path. In order to weaken the mathematical characteristics of the back part of the path, the algorithm logically shifts the operand to the right according to the number of hops of the data packet in the network path. The number of bits shifted to the right each time is positively correlated with the number of hops of the data packet. However, due to the unique structure of the MAC address, the first three bytes represent the hardware manufacturer's number, and the last three bytes indicate the product serial number. The algorithm needs to perform special processing on the MAC address during each calculation process.

[0024] Since the algorithm needs to reflect the differences in network paths through the MAC address, and the differences in the first three bytes used to indicate the hardware vendor in the MAC address on network devices within an enterprise or organization may be much smaller than the last three bytes used to indicate the device number, a simple right shift weighting of the MAC address may weaken the part with larger differences in the MAC address. To this end, the MAC address needs to be specially processed using the method shown in the following formula: MAC i[0:F_Hop] =MAC i &((1 <F_Hop)-1) MAC i It is the MAC address of the egress port of the router where the data packet is located or the ingress port of the next router. i[0:F_Hop ] is MAC i The part that disappears after the right shift operation. F_Hop is a function of the number of hops and is positively correlated with the number of hops of the packet. The specific function can be set by the network administrator and represents the weight in the algorithm. The algorithm first extracts the bit string that is about to shift and disappear in the MAC address through a mask to reduce the damage of the shift operation to the difference characteristics of the MAC address.

[0025] Then, the original MAC address MAC i The string MAC of the least significant F_Hop bit that is about to be shifted and disappear i[0:F_Hop] With MAC i The hash operation is performed on the most significant non-zero bit after the F_Hop bit is right-shifted, as shown in the following formula: MAC′ i =(MAC i >>F_Hop)hash(MAC i[0:F_Hop]<(48-2×F_Hop)) The purpose of this is to preserve the parts of the MAC address that differ more, while diluting the parts that differ less.

[0026] Finally, the hash value H obtained by the last hash operation is calculated according to the following method i-1 And the MAC address MCD′ that will participate in the calculation this time i Hash to get the latest hash value H i : H i =MAC′ i hash H i-1 Among them, H 0 It is the starting MAC address of the path, which may be the MAC address of the network card of the sender's host.

[0027] It is worth noting that the original MAC address MAC involved in the calculation process i Including the MAC address of the router egress port where the data packet is located, and the MAC address of the next hop router ingress port determined by the routing algorithm. In other words, the above three equations need to be calculated twice. In this way, all MAC addresses on the network path through which the data packet passes can be calculated to maximize the display of path information.

[0028] Even if the routing difference at the back of the path has little effect on the weighted path quantization value, the path quantization value cannot remain unchanged. To this end, the algorithm uses an exponentially weighted moving average (EWMA) to describe the historical mean of the path quantization value of the internal user in the recent period of time, as shown in the following formula: EWMA n =α×H in +(1-α)×EWMA n-1 Where n is the number of a data packet, and the starting EWMA value is the starting value H of the path quantization value. 0 The idea of ​​the algorithm is to treat the 48-bit path quantization value containing all MAC address information on the path as a 48-bit unsigned integer, which has a certain size and can participate in mathematical operations.

[0029] Since the design goal is to provide IP spoofing defense for the internal network of an enterprise or organization, it is only necessary to deploy a mapping table of the internal legitimate user IP or IP prefix to the EWMA value of the network path quantization value at the subnet gateway where the internal server is located or at the bottleneck link entrance to the subnet. For each arriving data packet, it will inevitably carry a path quantization value. If the absolute value of the difference between the path quantization value and the EWMA value of the path quantization value of the same IP or IP prefix is ​​greater than or equal to β times the EWMA value of the path quantization value, then |H is satisfied. in -EWMA n |≥β×EWMA n , it is classified as attack traffic and dropped immediately, without including its path quantization value in the calculation of EWMA. in It is the path quantization value of legitimate user data packet n from the same IP or IP prefix calculated on a certain hop router i. n It is the EWMA value of the path quantization value of the legitimate user IP or IP prefix. β is an empirical value that can be set by the network administrator or learned through machine learning methods. If the path quantization values ​​carried by the packets from the same source are significantly different, then according to the weighted path quantization algorithm, the front characteristics of the network path passed by the new packet must be significantly different from the actual situation. This indicates that the packet is not sent by a legitimate internal user.

Claims

1. In-network IP spoofing attack defense method based on weighted network path quantization algorithm, Features This method is fully deployed on the programmable data plane and filters IP spoofing attacks based on a weighted network path quantization algorithm. The filtering of IP spoofing attacks has the following three steps: Step 1, network path quantization value calculation: The weighted network path quantization algorithm performs chain hash operations on all MAC addresses in the network path passed by each data packet, and weights the operation process according to the number of hops of the data packet to calculate the network path quantization value of each data packet. Each time a data packet passes through a router, the network path quantization value is calculated according to the weighted path quantization algorithm. The packet header carries the latest calculated network path quantization value and the number of hops to enter the next router for further iteration. The weighted network path quantization algorithm includes two steps: weighting and iteration. Step 2: Flow feature statistics: Calculate the historical average of the network path quantization value of the legitimate traffic in real time, and store it through a mapping table between the historical average and the IP or IP prefix; Step 3, attack flow filtering: For each data packet arriving at the router where the mapping table described in step 2 is located, the network path quantization value carried by it is compared with the historical mean of the network path quantization value corresponding to the same IP or IP prefix in the mapping table. If the absolute value of the difference between the network path quantization value carried by the data packet and the historical mean in the mapping table is greater than or equal to β times the historical mean, it is determined to be an IP spoofing data packet and a packet drop operation is performed on it. Otherwise, it is regarded as a data packet of legitimate traffic and the flow feature statistics of step 2 are performed.

2. According to the method for defending against IP spoofing attacks in a network based on a weighted network path quantization algorithm as described in claim 1, It is characterized in that The detailed operation process of the two main steps of the weighted network path quantization algorithm based on which the network path quantization value calculation in step 1 is based is as follows: 1) Weighting: Use the following formula to weight the operation process: MAC i[0:F_Hop] =MAC i &((1<<F_Hop)-1) MAC′ i =(MAC i >>F_Hop)hash(MAC i[0:F_Hop] <<(48-2×F_Hop)) Among them, MAC i It is the MAC address of the egress port of the router where the data packet is located or the MAC address of the ingress port of the next router. F_Hop is a function of the number of hops of the data packet. It can be set by the network administrator or operator and is positively correlated with the number of hops. i[0:F_Hop] Yes for MAC i The part of the low-significant bits that will disappear after the right shift operation, MAC′ i MAC i The high-significant bit after right shift F_Hop bit and MAC i[0:F_Hop] The result of the hash operation; 2) Iteration: Iteration operation is performed through the following formula: H i =MAC′ i hash H i-1 Among them, H i-1 is the network path quantization value carried by the header of the current data packet, H 0 It is the mac address of the host network card of the data packet sender, H i It is the result of this iterative operation, that is, the latest quantized value of the network path.

3. According to the method for defending against IP spoofing attacks in a network based on a weighted network path quantization algorithm as described in claim 1, It is characterized in that Step 2 uses the exponentially weighted moving average (EWMA) to reflect the historical average level of the network path quantization value of the legitimate traffic. The calculation method is as follows: EWMA n =α×H in +(1-a)×EWMA n-1 Among them, H in It is the network path quantization value obtained by the latest iteration operation carried by the nth data packet. EWMA n-1 It is the latest EWMA value before the nth data packet arrives at the mapping table. 0 is the quantized value of the network path carried by the first legal data packet, α is a proportional value. Since the programmable chip does not support division operations, α should be a power of 0.

5.

4. According to the method for defending against IP spoofing attacks in a network based on a weighted network path quantization algorithm as described in claim 1, It is characterized in that Step 3 compares the network path quantization value carried by the newly arrived data packet with the corresponding EWMA value in the mapping table by the following formula. When the absolute value of the difference between the network path quantization value carried by the data packet and the recent historical mean of the network path quantization value corresponding to the same IP or IP prefix in the mapping table is greater than or equal to the historical mean EWMA n β times, that is, satisfying |H in -EWNA n |≥β×EWAM n , the data packet is determined to be an IP spoofing data packet, where β is an empirical value ranging between 0 and 1.