SYN flood defending unloading method and system based on DPU, terminal and server
By performing defense analysis of SYN Flood attacks on the DPU and registering black and white lists, the problem of high cost and latency of SYN Flood attack defense methods in the existing technology is solved, and efficient attack defense and server performance improvements are achieved.
Patent Information
- Application Number
- CN202410881432.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-11-15
AI Technical Summary
The existing SYN Flood attack defense methods rely on physical devices and CPU processing, resulting in high costs and latency, reducing server efficiency and security.
Using a DPU-based method, a preliminary judgment and defense analysis of network protocol messages received by external networks is carried out, and a semi-connection information is registered using the black and white list mechanism, and the packets that are judged as attack are directly discarded to avoid CPU processing.
It reduces CPU consumption, reduces latency, improves server efficiency and security, reduces the deployment needs of external devices, and reduces the cost of data center construction.
Smart Images

Figure CN118972088A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of SYN flood attack defense, and in particular to a DPU-based SYN flood defense unloading method, system, terminal and server. Background Art
[0002] SYN Flood is one of the most popular DoS (Denial of Service) and DDoS (Distributed Denial of Service) attacks. It is an attack method that exploits TCP protocol defects to send a large number of forged TCP connection requests, causing the attacked party to exhaust resources (CPU full load or insufficient memory).
[0003] The process of SYN Flood attack is called three-way handshake in TCP protocol, and SYN Flood denial of service is achieved through three-way handshake. Figure 1 shown.
[0004] (1) The attacker sends a TCP message containing the SYN flag to the attacked server. SYN (Synchronize) is a synchronization message. The synchronization message will indicate the port used by the client and the initial sequence number of the TCP connection. At this time, the first handshake is established with the attacked server.
[0005] (2) After receiving the attacker's SYN message, the victim server will return a SYN+ACK message, indicating that the attacker's request is accepted. At the same time, the TCP sequence number is increased by one, and ACK (Acknowledgment) is confirmation, thus establishing a second handshake with the attacked server.
[0006] (3) The attacker also returns an acknowledgment message ACK to the victim server. Similarly, the TCP sequence number is increased by 1. At this point, a TCP connection is completed and the three-way handshake is completed.
[0007] In the case of a SYN Flood attack, the attacker sends a large number of SYN packets to the target server port without responding to the SYN+ACK packet returned by the server (the third step of the three-way handshake process mentioned above), causing the target server to maintain a large number of invalid half-connected session resources and be unable to respond to normal users' connection requests, thereby achieving the purpose of denial of service.
[0008] The existing SYN Flood attack defense methods basically rely on the deployment of physical security or traffic cleaning equipment outside the server, which consumes network construction costs. In addition, the defense against SYN Flood attacks is usually processed by the CPU, so when a SYN flood attack occurs, the CPU consumption increases, resulting in a large delay, thereby reducing the efficiency and security of the server. Summary of the invention
[0009] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a DPU-based SYN flood defense unloading method, system, terminal and server to solve the above-mentioned prior art problems.
[0010] To achieve the above-mentioned purpose and other related purposes, the present invention provides a DPU-based SYN flood defense unloading method, the method comprising: a DPU device applied to a corresponding target server, the method comprising: receiving a network protocol message with a target IP address as a local address from an external network; executing a preliminary SYN flood attack judgment process corresponding to the network protocol message; when the network protocol message is judged to be a SYN message and the corresponding target TCP port number is a locally open service port number already existing in the DPU configuration space, taking the network protocol message as a SYN flood attack judgment object and executing an attack defense analysis process corresponding to the network protocol message, so as to add the semi-connected quadruple information of the network protocol message to the local whitelist information or the local blacklist information based on the defense analysis result; wherein the semi-connected quadruple information comprises: a source IP address, a destination IP address, a destination TCP port number and a TCP protocol number.
[0011] In one embodiment of the present invention, the attack defense analysis process includes: recording the semi-connected five-tuple information of the network protocol message, and sending a response message corresponding to the source IP address of the network protocol message; wherein the semi-connected five-tuple information includes: source IP address, destination IP address, source TCP port number, destination TCP port number and TCP protocol number; if a valid ACK response message of the corresponding session is received within a specified time, the semi-connected four-tuple information of the network protocol message is saved to the local whitelist information, so that the network protocol message corresponding to the semi-connected four-tuple information can be directly uploaded to the CPU device of the target server for processing; if a valid ACK response message of the corresponding session is not received within the specified time, the semi-connected four-tuple information of the network protocol message is added to the local blacklist information, so that the network protocol message directly corresponding to the semi-connected four-tuple information can be discarded.
[0012] In one embodiment of the present invention, the preliminary judgment process of the SYN flood attack includes: judging whether the target TCP port number of the network protocol message is the service port information opened locally in the DPU configuration space; if so, executing the first processing process; if not, discarding the network protocol message; wherein, the first processing process includes: judging whether the network protocol message is a legitimate SYN message; if so, executing the black and white list and local semi-connection information judgment process, and judging the network protocol message as a SYN flood attack judgment object when it is judged that it is not in the black and white list and there is no matching local semi-connection information, so as to execute the attack defense analysis process corresponding to the network protocol message; if not, executing the ACK message and semi-connection information judgment process.
[0013] In one embodiment of the present invention, the black and white list and local semi-connection information judgment process includes: querying local white list information and local black list information based on the extracted semi-connection quadruple information of the network protocol message; wherein the semi-connection quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number; if the local white list information contains the semi-connection quadruple information, the network protocol message is uploaded to the CPU device of the target server for processing; if the local black list information contains the semi-connection quadruple information, the network protocol message is discarded; if the local white list information and the local black list information do not contain the semi-connection quadruple information, it is determined whether the semi-connection quadruple information of the network protocol message is the local semi-connection session information; if so, the network protocol message is discarded; if not, the network protocol message is determined as a SYN flood attack judgment object.
[0014] In one embodiment of the present invention, the ACK message and semi-connection information judgment process includes: judging whether the network protocol message is an ACK message; if so, querying the local semi-connection session information whether the extracted semi-connection five-tuple information of the network protocol message exists; if so, saving the semi-connection four-tuple information of the network protocol message to the local whitelist information; if not, discarding the network protocol message; if not, uploading the network protocol message to the CPU device of the target server for processing.
[0015] In one embodiment of the present invention, sending a response message to the source IP address of the network protocol message includes: constructing a corresponding SYN+ACK message response based on the semi-connected quintuple information of the network protocol message and sending it to the source IP address of the network protocol message.
[0016] To achieve the above-mentioned purpose and other related purposes, the present invention provides a DPU-based SYN flood defense unloading system, which is applied to a DPU device set corresponding to a target server, and the system includes: a network processing program module, which is used to receive a network protocol message with a target IP address as a local address from an external network; execute a preliminary SYNflood attack judgment process corresponding to the network protocol message; an attack defense program module, which is connected to the network processing program module, and is used to take the network protocol message as a SYN flood attack judgment object to execute an attack defense analysis process corresponding to the network protocol message when the network protocol message is judged to be a SYN message and the corresponding target TCP port number is a locally open service port number that already exists in the DPU configuration space, so as to add the semi-connected quadruple information of the network protocol message to the local whitelist information or the local blacklist information based on the defense analysis result; wherein the semi-connected quadruple information includes: a source IP address, a destination IP address, a destination TCP port number and a TCP protocol number.
[0017] To achieve the above-mentioned purpose and other related purposes, the present invention provides a DPU-based SYN flood defense unloading terminal, comprising: one or more memories and one or more processors; the one or more memories are used to store computer programs; the one or more processors are connected to the memories and are used to run the computer program to execute the DPU-based SYN flood defense unloading method.
[0018] To achieve the above-mentioned purpose and other related purposes, the present invention provides a server, comprising: a DPU device and a CPU device; wherein the DPU device is used to execute the DPU-based SYN flood defense unloading method described above; the CPU device is communicatively connected to the DPU device, and is used to process network protocol messages uploaded by the DPU device.
[0019] In one embodiment of the present invention, the server also sends the corresponding service TCP port information to the DPU configuration space through the DPU management program running thereon.
[0020] As described above, the present invention is a DPU-based SYN flood defense unloading method, system, terminal and server, which has the following beneficial effects: the present invention unloads the SYN flood defense to the DPU device, and first analyzes the network protocol message received from the external network through the DPU defense, and registers the corresponding black and white lists for the information of the relevant users, so that only the messages sent by users in the local white list are allowed to enter the CPU for processing, and the messages sent by users in the local black list are directly discarded, thereby realizing the defense against SYN flood attacks. The present invention greatly reduces the CPU consumption, and the message will not produce a large delay, thereby improving the efficiency and security of the server. It can also greatly reduce the deployment of external security detection equipment and defense cleaning equipment, reduce the construction cost of the data center, and the deployment is simple and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Shown is a flow chart of a DPU-based SYN flood defense unloading method in one embodiment of the present invention.
[0022] Figure 2 Shown is a flow chart of a DPU-based SYN flood defense unloading method in one embodiment of the present invention.
[0023] Figure 3 A schematic diagram showing the structure of a target server for an application in an embodiment of the present invention
[0024] Figure 4 Shown is a flowchart of an attack defense program in an embodiment of the present invention.
[0025] Figure 5 Shown is a structural schematic diagram of a DPU-based SYN flood defense unloading system in one embodiment of the present invention.
[0026] Figure 6 Shown is a structural schematic diagram of a DPU-based SYN flood defense unloading terminal in one embodiment of the present invention.
[0027] Figure 7 Shown is a schematic diagram of the structure of a server in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0029] It should be noted that in the following description, reference is made to the accompanying drawings, which describe several embodiments of the present invention. It should be understood that other embodiments may also be used, and that mechanical composition, structural, electrical and operational changes may be made without departing from the spirit and scope of the present invention. The following detailed description should not be considered restrictive, and the scope of the embodiments of the present invention is limited only by the claims of the published patents. The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. Spatially related terms, such as "upper", "lower", "left", "right", "below", "below", "lower", "above", "upper", etc., may be used in the text to facilitate the description of the relationship between an element or feature shown in the figure and another element or feature.
[0030] Throughout the specification, when a part is said to be "connected" to another part, this includes not only the case of "direct connection" but also the case of "indirect connection" by placing other elements therebetween. In addition, when a part is said to "include" a certain constituent element, unless otherwise stated, it does not exclude other constituent elements, but means that other constituent elements may be included.
[0031] The terms first, second and third mentioned herein are used to describe various parts, components, regions, layers and / or segments, but are not limited thereto. These terms are only used to distinguish a certain part, component, region, layer or segment from other parts, components, regions, layers or segments. Therefore, the first part, component, region, layer or segment described below may refer to the second part, component, region, layer or segment within the scope of the present invention.
[0032] Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Exceptions to this definition will only occur when the combination of elements, functions or operations is inherently mutually exclusive in some way.
[0033] The present invention discloses a DPU-based SYN flood defense unloading method. By unloading the SYN flood defense to the DPU device, the network protocol message received from the external network is first analyzed by the DPU defense, and the corresponding black and white list registration is performed for the information of the relevant users, so that only the messages sent by the users in the local white list are allowed to enter the CPU for processing, and the messages sent by the users in the local black list are directly discarded, thereby realizing the defense against the SYN flood attack. The present invention greatly reduces the CPU consumption, and the message will not produce a large delay, thereby improving the use efficiency and security of the server. It can also greatly reduce the deployment of external security detection equipment and defense cleaning equipment, reduce the construction cost of the data center, and the deployment is simple and efficient.
[0034] The following is a detailed description of the embodiments of the present invention with reference to the accompanying drawings so that those skilled in the art can easily implement the present invention. The present invention can be embodied in many different forms and is not limited to the embodiments described herein.
[0035] like Figure 1 A flowchart of a DPU-based SYN flood defense unloading method in an embodiment of the present invention is shown.
[0036] The DPU device applied to the corresponding target server is used, that is, the target server unloads the SYN flood defense to the DPU device; and when the local service program of the target server is started, the corresponding service TCP port information is sent to the DPU configuration space of the DPU device, and stored in the DPU configuration space as the locally open service port number for subsequent query.
[0037] The method comprises:
[0038] Step S1: Receive a network protocol message whose target IP address is a local address from an external network.
[0039] Specifically, a network protocol message of a TCP message type whose target IP address is a local address is received from an external network.
[0040] Step S2: executing a preliminary judgment process of a SYN flood attack corresponding to the network protocol message.
[0041] In a specific embodiment, if Figure 2 The preliminary judgment process of the SYN flood attack includes:
[0042] Determine whether the target TCP port number of the network protocol message is the service port information opened locally in the DPU configuration space; specifically, query the service port information opened locally in the DPU configuration space according to the target TCP port number of the network protocol message;
[0043] If yes, execute the first processing flow;
[0044] If not, discard the network protocol message;
[0045] Wherein, the first processing flow includes:
[0046] Determine whether the network protocol message is a legitimate SYN message;
[0047] If yes, execute the blacklist and whitelist and local semi-connection information judgment process, and if it is judged that the network protocol message is not in the blacklist and whitelist and there is no matching local semi-connection information, judge the network protocol message as a SYN flood attack judgment object, so as to execute the attack defense analysis process corresponding to the network protocol message;
[0048] If not, execute the ACK message and semi-connection information judgment process.
[0049] In a specific embodiment, if Figure 2 The blacklist and whitelist and local semi-connection information judgment process includes:
[0050] Based on the extracted semi-connected quadruple information of the network protocol message, query the local whitelist information and the local blacklist information; wherein the semi-connected quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number;
[0051] If the local whitelist information contains the semi-connected quadruple information, the network protocol message is uploaded to the CPU device of the target server for processing;
[0052] If the local blacklist information contains the semi-connected quadruple information, the network protocol message is discarded;
[0053] If the semi-connected quadruple information does not exist in the local whitelist information and the local blacklist information, it is determined whether the semi-connected quadruple information of the network protocol message is the local semi-connected session information; if so, the network protocol message is discarded; if not, the network protocol message is judged as a SYN flood attack judgment object, and the subsequent attack defense analysis process is carried out.
[0054] In a specific embodiment, if Figure 2 , the ACK message and semi-connection information judgment process includes:
[0055] Determine whether the network protocol message is an ACK message;
[0056] If yes, query the local semi-connected session information whether there is the extracted semi-connected five-tuple information of the network protocol message; if yes, save the semi-connected four-tuple information of the network protocol message to the local whitelist information; if no, discard the network protocol message;
[0057] If not, the network protocol message is uploaded to the CPU device of the target server for processing.
[0058] Step S3: When the network protocol message is judged to be a SYN message and the corresponding target TCP port number is a locally open service port number that already exists in the DPU configuration space, the network protocol message is taken as a SYN flood attack judgment object to execute the attack defense analysis process corresponding to the network protocol message, so as to add the semi-connected quadruple information of the network protocol message to the local whitelist information or the local blacklist information based on the defense analysis result.
[0059] Specifically, the semi-connection quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number.
[0060] In one embodiment, if Figure 2 , the attack defense analysis process includes:
[0061] Record the semi-connected five-tuple information of the network protocol message, and send a response message to the source IP address of the network protocol message; wherein the semi-connected five-tuple information includes: source IP address, destination IP address, source TCP port number, destination TCP port number and TCP protocol number;
[0062] If a valid ACK response message of the corresponding session is received within the specified time, the semi-connected quadruple information of the network protocol message is saved to the local whitelist information, so that the network protocol message corresponding to the semi-connected quadruple information can be directly uploaded to the CPU device of the target server for processing;
[0063] If no valid ACK response message of the corresponding session is received within the specified time, the semi-connected quadruple information of the network protocol message is added to the local blacklist information so that the network protocol message directly corresponding to the semi-connected quadruple information can be discarded later.
[0064] In one embodiment, sending a response message to the source IP address of the network protocol message includes: constructing a corresponding SYN+ACK message response based on the semi-connected quintuple information of the network protocol message and sending it to the source IP address of the network protocol message.
[0065] In one embodiment, operations such as message table entry matching can be completed with the help of dedicated chips such as TCAM integrated in the DPU device, thereby reducing the message delay caused by attack detection.
[0066] In order to better illustrate the above-mentioned DPU-based SYN flood defense unloading method, the present invention provides the following specific embodiments.
[0067] Embodiment 1: A SYN flood defense unloading method based on DPU.
[0068] The target server used in this embodiment is as follows Figure 3 The system has a system service program, a system TCP-IP protocol stack and a DPU management program on the server CPU for processing messages; the DPU device of the server application has an attack defense program and a network processing program; when the local service program of the server is started, the corresponding service TCP port information is sent to the DPU configuration space through the DPU management program running on the server.
[0069] The method comprises:
[0070] When the local service program is started, the corresponding service TCP port information is sent to the DPU configuration space through the DPU management program running on the server; the DPU receives the network protocol message from the external network, and after the network processing program analyzes it, if the target IP address is a local address, the message is a TCP SYN message, and the target TCP port number is a local open service port number that already exists in the DPU configuration space, then it enters the attack defense program for further analysis; the attack defense program mainly works to construct the corresponding SYN+ACK response message according to the SYN message and send it to the source IP address, and record the semi-connected five-tuple information (source IP address, source TCP port number, TCP protocol, destination IP address, destination TCP port number), and wait for the corresponding ACK response message to be received; if a valid ACK response message of the corresponding session is received within the specified time, the corresponding four-tuple (source IP address, TCP protocol, destination IP address, destination TCP port number) information is extracted and recorded as a whitelist, otherwise the source IP address is recorded as a blacklist. Subsequent SYN messages can first match the local black and white lists to determine whether the message is released.
[0071] Among them, Figure 4 Schematic diagram of the attack defense process in this embodiment. The attack defense process includes:
[0072] Step 1: The DPU receives a TCP message with a destination IP address as a local address from the external network through the network processing program, and queries the local open service port information in the DPU configuration space according to the destination port number of the message. If it does not exist, the message is discarded; otherwise, go to step 2;
[0073] Step 2: Determine whether the message is a legitimate SYN message. If it is a SYN message, go to step 3; otherwise, go to step 9.
[0074] Step 3: Extract the source IP address, destination IP address, destination TCP port number and TCP protocol number of the message, query the local whitelist information, and if there is a matching whitelist, send the message to the server CPU for processing; otherwise, go to step 4;
[0075] Step 4: Extract the source IP address, destination IP address, destination TCP port number and TCP protocol number of the message, query the local blacklist information, if there is a matching blacklist, the message is discarded; otherwise, go to step 5;
[0076] Step 5: Extract the source IP address, destination IP address, source TCP port number, destination TCP port number and TCP protocol number of the message, query the local semi-connected session information, if there is semi-connected information, the message is discarded, otherwise go to step 6;
[0077] Step 6: The attack defense program records the semi-connection information of the message's source IP address, destination IP address, source TCP port number, destination TCP port number, and TCP protocol number as a five-tuple, and constructs a corresponding SYN+ACK message response; waits for a specified time to confirm whether the corresponding ACK response message is received; if an ACK response is received within the specified time, go to step 7, otherwise go to step 8;
[0078] Step 7: Extract the source IP address, destination IP address, destination TCP port number and TCP protocol number of the message and save them to the local whitelist;
[0079] Step 8: Extract the source IP address, destination IP address, destination TCP port number and TCP protocol number of the message and save them to the local blacklist;
[0080] Step 9: Determine whether the received message is an ACK message. If it is not an ACK message, send it to the server CPU for processing. If it is an ACK message, go to step 10.
[0081] Step 10: Extract the source IP address, destination IP address, source TCP port number, destination TCP port number and TCP protocol number of the message, query the local semi-connected session information, if there is semi-connected information, go to step 7, otherwise discard the message;
[0082] Similar to the principle of the above embodiment, the present invention provides a DPU-based SYN flood defense unloading system.
[0083] The following provides specific embodiments in conjunction with the accompanying drawings:
[0084] like Figure 5 A structural schematic diagram of a DPU-based SYN flood defense unloading system in an embodiment of the present invention is shown.
[0085] A DPU device is applied to a corresponding target server, and the system includes:
[0086] The network processing program module 11 is used to receive a network protocol message with a target IP address as a local address from an external network; and execute a preliminary judgment process of a SYN flood attack corresponding to the network protocol message;
[0087] The attack defense program module 12 is connected to the network processing program module 11, and is used to, when the network protocol message is judged to be a SYN message and the corresponding target TCP port number is a locally open service port number that already exists in the DPU configuration space, use the network protocol message as a SYN flood attack judgment object to execute the attack defense analysis process corresponding to the network protocol message, so as to add the semi-connected quadruple information of the network protocol message to the local whitelist information or the local blacklist information based on the defense analysis result; wherein the semi-connected quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number.
[0088] It should be understood that Figure 5 The division of each module in the system embodiment is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. And these modules can be all implemented in the form of software calling through processing elements; or all implemented in the form of hardware; or some modules can be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware;
[0089] For example, each module may be one or more integrated circuits configured to implement the above method, such as: one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0090] Since the implementation principle of the DPU-based SYN flood defense unloading system has been described in the aforementioned embodiment, it will not be repeated here.
[0091] In one embodiment, the attack defense analysis process includes: recording the semi-connected five-tuple information of the network protocol message, and sending a response message to the source IP address of the network protocol message; wherein the semi-connected five-tuple information includes: source IP address, destination IP address, source TCP port number, destination TCP port number and TCP protocol number; if a valid ACK response message corresponding to the session is received within a specified time, the semi-connected four-tuple information of the network protocol message is saved to the local whitelist information, so that the network protocol message corresponding to the semi-connected four-tuple information can be directly uploaded to the CPU device of the target server for processing; if a valid ACK response message corresponding to the session is not received within the specified time, the semi-connected four-tuple information of the network protocol message is added to the local blacklist information, so that the network protocol message directly corresponding to the semi-connected four-tuple information can be discarded.
[0092] In one embodiment, the preliminary judgment process of the SYN flood attack includes: judging whether the target TCP port number of the network protocol message is the service port information opened locally in the DPU configuration space; if so, executing the first processing process; if not, discarding the network protocol message; wherein, the first processing process includes: judging whether the network protocol message is a legitimate SYN message; if so, executing the black and white list and local semi-connection information judgment process, and judging the network protocol message as a SYNflood attack judgment object when it is judged that it is not in the black and white list and there is no matching local semi-connection information, so as to execute the attack defense analysis process corresponding to the network protocol message; if not, executing the ACK message and semi-connection information judgment process.
[0093] In one embodiment, the black and white list and local semi-connection information judgment process includes: querying local white list information and local black list information based on the extracted semi-connection quadruple information of the network protocol message; wherein the semi-connection quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number; if the local white list information contains the semi-connection quadruple information, the network protocol message is uploaded to the CPU device of the target server for processing; if the local black list information contains the semi-connection quadruple information, the network protocol message is discarded; if the local white list information and the local black list information do not contain the semi-connection quadruple information, it is determined whether the semi-connection quadruple information of the network protocol message is the local semi-connection session information; if so, the network protocol message is discarded; if not, the network protocol message is determined as a SYN flood attack judgment object.
[0094] In one embodiment, the ACK message and semi-connection information judgment process includes: judging whether the network protocol message is an ACK message; if so, querying the local semi-connection session information whether there is the extracted semi-connection five-tuple information of the network protocol message; if so, saving the semi-connection four-tuple information of the network protocol message to the local whitelist information; if not, discarding the network protocol message; if not, uploading the network protocol message to the CPU device of the target server for processing.
[0095] In one embodiment, sending a response message to the source IP address of the network protocol message includes: constructing a corresponding SYN+ACK message response based on the semi-connected quintuple information of the network protocol message and sending it to the source IP address of the network protocol message.
[0096] like Figure 6 A structural schematic diagram of a DPU-based SYN flood defense unloading terminal in an embodiment of the present invention is shown.
[0097] The DPU-based SYN flood defense unloading terminal 100 includes: a memory 101 and a processor 102. The memory 101 is used to store computer programs; the processor 102 runs the computer program to implement the following Figure 1 The DPU-based SYN flood defense unloading method.
[0098] Optionally, the number of the memory 101 can be one or more, the number of the processor 102 can be one or more, and Figure 5 Take one as an example.
[0099] Optionally, the processor 102 in the DPU-based SYN flood defense offloading terminal 100 may be configured as follows: Figure 1 In the above steps, one or more instructions corresponding to the process of the application are loaded into the memory 101, and the processor 102 runs the application stored in the first memory 101, thereby achieving the following Figure 1 Various functions in the DPU-based SYN flood defense offloading method.
[0100] Optionally, the memory 101 may include but is not limited to high-speed random access memory and non-volatile memory. For example, one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices; the processor 102 may include but is not limited to a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0101] Optionally, the processor 102 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0102] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program is executed as follows: Figure 1 The DPU-based SYN flood defense unloading method shown. The computer-readable storage medium may include, but is not limited to, a floppy disk, an optical disk, a CD-ROM (read-only disk memory), a magneto-optical disk, a ROM (read-only memory), a RAM (random access memory), an EPROM (erasable programmable read-only memory), an EEPROM (electrically erasable programmable read-only memory), a magnetic card or an optical card, a flash memory, or other types of media / machine-readable media suitable for storing machine-executable instructions. The computer-readable storage medium may be a product that is not connected to a computer device, or a component that is connected to a computer device for use.
[0103] like Figure 7 A schematic diagram showing the structure of a server in an embodiment of the present invention.
[0104] The server comprises: a DPU device 1 and a CPU device 2;
[0105] The DPU device is used to execute the DPU-based SYN flood defense unloading method described in the above embodiment; the CPU device is communicated with the DPU device and is used to process the network protocol messages uploaded by the DPU device.
[0106] Specifically, the DPU device 1 receives a network protocol message whose target IP address is a local address from an external network; executes a preliminary judgment process for a SYN flood attack corresponding to the network protocol message; when the network protocol message is judged to be a SYN message and the corresponding target TCP port number is a locally open service port number that already exists in the DPU configuration space, records the semi-connected five-tuple information of the network protocol message, and sends a SYN+ACK response message to the source IP address of the network protocol message; if a valid ACK response message of the corresponding session is received within a specified time, the semi-connected four-tuple information of the network protocol message is saved to the local whitelist information, so that the network protocol message corresponding to the semi-connected four-tuple information can be directly uploaded to the CPU device 2 of the target server for processing; if a valid ACK response message of the corresponding session is not received within the specified time, the semi-connected four-tuple information of the network protocol message is added to the local blacklist information, so that the network protocol message directly corresponding to the semi-connected four-tuple information can be discarded.
[0107] Since the implementation principle of the DPU-based SYN flood defense unloading method has been described in the aforementioned embodiment, it will not be repeated here.
[0108] In one embodiment, the server also sends the corresponding service TCP port information to the DPU configuration space through the DPU management program running thereon.
[0109] Compared with the prior art, the present invention has the following advantages:
[0110] 1. The current mainstream SYN flood defense method basically relies on the deployment of physical security or traffic cleaning equipment on the periphery of the server, which has high deployment and operation and maintenance costs. The present invention supports SYN flood defense in a DPU offloading manner, which can be flexibly deployed with the server and has great cost advantages.
[0111] 2. By simulating the normal TCP protocol interaction process at the DPU network card hardware level, the corresponding attack source can be efficiently identified and filtered without affecting the access requests of normal users.
[0112] In summary, the DPU-based SYN flood defense unloading method, system, terminal and server of the present invention, by unloading the SYN flood defense to the DPU device, first analyzes the network protocol message received from the external network through the DPU defense, and registers the corresponding black and white lists for the information of the relevant users, so that only the messages sent by users in the local white list are allowed to enter the CPU for processing, and the messages sent by users in the local black list are directly discarded, thereby realizing the defense against SYN flood attacks. While the present invention greatly reduces the CPU consumption, the message will not produce a large delay, and the use efficiency and security of the server are improved. It can also greatly reduce the deployment of external security detection equipment and defense cleaning equipment, reduce the construction cost of the data center, and the deployment is simple and efficient. Therefore, the present invention effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.
[0113] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A DPU-based SYN flood defense unloading method, characterized in that: The method is applied to a DPU device corresponding to a target server, and includes: Receive a network protocol message with a destination IP address as a local address from an external network; Execute a preliminary judgment process of a SYN flood attack corresponding to the network protocol message; When the network protocol message is judged to be a SYN message and the corresponding target TCP port number is a locally open service port number that already exists in the DPU configuration space, the network protocol message is taken as a SYN flood attack judgment object to execute the attack defense analysis process corresponding to the network protocol message, so as to add the semi-connected quadruple information of the network protocol message to the local whitelist information or the local blacklist information based on the defense analysis result; wherein the semi-connected quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number.
2. The DPU-based SYN flood defense unloading method according to claim 1, characterized in that: The attack defense analysis process includes: Record the semi-connected five-tuple information of the network protocol message, and send a response message to the source IP address of the network protocol message; wherein the semi-connected five-tuple information includes: source IP address, destination IP address, source TCP port number, destination TCP port number and TCP protocol number; If a valid ACK response message of the corresponding session is received within the specified time, the semi-connected quadruple information of the network protocol message is saved to the local whitelist information, so that the network protocol message corresponding to the semi-connected quadruple information can be directly uploaded to the CPU device of the target server for processing; If no valid ACK response message of the corresponding session is received within the specified time, the semi-connected quadruple information of the network protocol message is added to the local blacklist information so that the network protocol message directly corresponding to the semi-connected quadruple information can be discarded later.
3. The DPU-based SYN flood defense unloading method according to claim 2, characterized in that: The SYNflood attack preliminary judgment process includes: Determine whether the target TCP port number of the network protocol message is the service port information opened locally in the DPU configuration space; If yes, execute the first processing flow; If not, discard the network protocol message; Wherein, the first processing flow includes: Determine whether the network protocol message is a legitimate SYN message; If yes, execute the blacklist and whitelist and local semi-connection information judgment process, and if it is judged that the network protocol message is not in the blacklist and whitelist and there is no matching local semi-connection information, judge the network protocol message as a SYN flood attack judgment object, so as to execute the attack defense analysis process corresponding to the network protocol message; If not, execute the ACK message and semi-connection information judgment process.
4. The DPU-based SYN flood defense unloading method according to claim 3, characterized in that: The blacklist and whitelist and local semi-connection information judgment process includes: Querying local whitelist information and local blacklist information based on the extracted semi-connected quadruple information of the network protocol message; wherein the semi-connected quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number; If the local whitelist information contains the semi-connected quadruple information, the network protocol message is uploaded to the CPU device of the target server for processing; If the local blacklist information contains the semi-connected quadruple information, the network protocol message is discarded; If the semi-connection quadruple information does not exist in the local whitelist information and the local blacklist information, determine whether the semi-connection quadruple information of the network protocol message is local semi-connection session information; if so, discard the network protocol message; if not, determine the network protocol message as a SYN flood attack judgment object.
5. The DPU-based SYN flood defense unloading method according to claim 3, characterized in that: The ACK message and semi-connection information judgment process includes: Determine whether the network protocol message is an ACK message; If yes, query the local semi-connected session information whether there is the extracted semi-connected five-tuple information of the network protocol message; if yes, save the semi-connected four-tuple information of the network protocol message to the local whitelist information; if no, discard the network protocol message; If not, the network protocol message is uploaded to the CPU device of the target server for processing.
6. The DPU-based SYN flood defense unloading method according to claim 2, characterized in that: Sending a reply message to the source IP address of the network protocol message includes: Based on the semi-connected five-tuple information of the network protocol message, a corresponding SYN+ACK message response is constructed and sent to the source IP address of the network protocol message.
7. A DPU-based SYN flood defense unloading system, characterized in that: A DPU device is applied to a corresponding target server, and the system includes: A network processing program module is used to receive a network protocol message with a target IP address as a local address from an external network; and execute a preliminary judgment process of a SYN flood attack corresponding to the network protocol message; An attack defense program module is connected to the network processing program module and is used to, when the network protocol message is judged to be a SYN message and the corresponding target TCP port number is a locally open service port number that already exists in the DPU configuration space, use the network protocol message as a SYN flood attack judgment object to execute an attack defense analysis process corresponding to the network protocol message, so as to add the semi-connected quadruple information of the network protocol message to the local whitelist information or the local blacklist information based on the defense analysis result; wherein the semi-connected quadruple information includes: source IP address, destination IP address, destination TCP port number and TCP protocol number.
8. A DPU-based SYN flood defense unloading terminal, characterized in that: include: one or more memories and one or more processors; The one or more memories are used to store computer programs; The one or more processors, connected to the memory, are configured to run the computer program to perform the method according to any one of claims 1 to 7.
9. A server, characterized in that: include: DPU device and CPU device; Wherein, the DPU device is used to perform the DPU-based SYN flood defense unloading method according to any one of claims 1 to 7; The CPU device is communicatively connected with the DPU device, and is used for processing the network protocol messages uploaded by the DPU device.
10. The server according to claim 9, characterized in that: The server also sends the corresponding service TCP port information to the DPU configuration space through the DPU management program running thereon.
