Traffic processing method and apparatus, and medium and electronic device
By detecting and intercepting the incoming traffic of QUIC protocol network connections, and combining the reverse challenge algorithm to identify abnormal traffic, the threat of QUICFlood attack to the server is solved, and effective protection against DDoS attacks and improving server stability is achieved.
Patent Information
- Application Number
- PCT/CN2024/090467
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-10
- Filing Date
- 2024-04-29
- Publication Date
- 2024-11-14
AI Technical Summary
The existing technology is difficult to effectively protect the distributed denial of service DDoS attacks under the QUIC protocol network connection, especially the QUICFlood attack, which leads to the exhaustion or crash of server resources, and conventional protection methods will cause the risk of accidental injury or transmission to normal traffic.
Through the detection module, mirror and analyze the incoming traffic flowing to the server, determine whether it is subject to DDoS attack, use the protection module to intercept abnormal messages, including detecting and intercepting the message format, use the reverse challenge algorithm to identify abnormal traffic, and use the reverse challenge algorithm to identify abnormal traffic, and use the Implement targeted protection policies for message types.
Effectively intercept abnormal traffic, prevent server crashes, reduce the risk of accidental injury to normal traffic, improve server stability, and reduce the protection efficiency of labor costs.
Smart Images

Figure CN2024090467_14112024_PF_FP_ABST
Abstract
Description
Traffic processing method, device, medium and electronic equipment
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese application with application number 202310525725.1 and application date May 10, 2023, and claims its priority. The disclosed content of the Chinese application is hereby introduced as a whole into this application. Technical Field
[0003] The present disclosure relates to the field of computer technology, and in particular to a traffic processing method, device, medium, and electronic device. Background Art
[0004] The Quick UDP Internet Connection (QUIC) protocol is an encrypted and connection-oriented protocol developed based on UDP (User Datagram Protocol). It can achieve reliable transmission, congestion control, data encryption, and better support multiplexing, connection migration and other features. It can provide faster, more efficient and simpler encrypted traffic communication than TCP (Transmission Control Protocol) + TLS (Transport Layer Security).
[0005] Summary of the Invention
[0006] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] In a first aspect, the present disclosure provides a traffic processing method, including: detecting incoming traffic flowing to a server to determine whether the server is attacked by a distributed denial of service (DDoS); when it is determined that the server is attacked by a distributed denial of service (DDoS), determining whether the message format of the message in the incoming traffic is normal, and intercepting messages with abnormal message formats, wherein the incoming traffic is generated based on the Fast User Datagram Protocol (QUIC) protocol; and intercepting abnormal messages in a first message, wherein the first message is a message with a normal message format.
[0008] In a second aspect, the present disclosure provides a traffic processing device, including: a detection module, used to detect incoming traffic flowing to a server, and determine whether the server is attacked by a distributed denial of service DDoS; a first protection module, used to determine whether the message format of the message in the incoming traffic is normal when it is determined that the server is attacked by a distributed denial of service DDoS, and intercept messages with abnormal message formats, wherein the incoming traffic is generated based on the Fast User Datagram Protocol Internet Connection QUIC protocol; and a second protection module, used to intercept abnormal messages in the first message, wherein the first message is a message with a normal message format.
[0009] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the traffic processing method described in the first aspect.
[0010] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device storing a computer program; and a processing device for executing the computer program in the storage device to implement the traffic processing method described in the first aspect.
[0011] In a fifth aspect, the present disclosure provides a computer program, comprising: instructions, which, when executed by a processor, cause the processor to execute the traffic processing method described in the first aspect.
[0012] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:
[0014] FIG1 is an architecture diagram of a system for implementing a traffic processing method according to an exemplary embodiment of the present disclosure;
[0015] FIG2 is a flow chart showing a method for processing traffic according to an exemplary embodiment of the present disclosure;
[0016] FIG3 is a flowchart showing step 202 according to an exemplary embodiment of the present disclosure;
[0017] FIG4 is a schematic diagram of protection logic of a traffic processing method according to an exemplary embodiment of the present disclosure;
[0018] FIG5 is an interaction diagram showing an abnormal client receiving a response message according to an exemplary embodiment of the present disclosure;
[0019] FIG6 is an interaction diagram showing a normal client receiving a response message according to an exemplary embodiment of the present disclosure;
[0020] FIG7 is a schematic diagram showing components of a message according to an exemplary embodiment of the present disclosure;
[0021] FIG8 is a block diagram of a traffic processing device according to an exemplary embodiment of the present disclosure;
[0022] FIG9 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0025] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0026] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0027] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0029] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0030] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0031] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0032] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0033] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0034] A Distributed Denial of Service (DDoS) attack is a method of attack that controls botnets distributed across the internet to launch a large number of malicious service requests to servers, causing the servers to be unable to respond to normal service requests initiated by legitimate clients, resulting in a denial of service. For example, a botnet controls abnormal clients to send a large amount of forged abnormal traffic based on the QUIC protocol to a server, forcing the server to be busy processing the large amount of abnormal traffic, resulting in the exhaustion of server resources, or the server's network interface card being blocked by the abnormal traffic, ultimately causing the server to crash and be unable to provide normal external services. Hereinafter, the attack method of causing server crashes through forged abnormal traffic based on the QUIC protocol is referred to as QUICFlood.
[0035] Among them, QUICFlood mainly includes two types. One is a QUIC message with a normal forged message format and the target port is set to port 443. The other is a QUIC message with a randomly filled UDP payload and the target port is set to port 443. Port 443 is the port used by the QUIC protocol.
[0036] Compared with other DDoS attack methods, the QUIC protocol itself is based on the UDP protocol, but the protection of the UDP protocol is relatively weak, which ultimately leads to serious inadequacy of protection measures against QUICFlood. Moreover, since normal QUIC messages are generally encrypted, and the protection equipment upstream of the server cannot decrypt them due to the lack of keys, it is impossible to distinguish whether the QUIC message is normal QUIC traffic or forged abnormal QUIC traffic by verifying the transmitted data. In addition, if the attacked server itself provides QUIC services to the outside world, normal business is normal traffic based on the QUIC protocol, and the attacker forges abnormal traffic based on QUIC, so it is difficult to distinguish the two from the traffic itself, which ultimately makes protection difficult.
[0037] Based on this, for QUICFlood, the server avoids causing server crashes by not providing QUIC services or limiting the speed of client traffic. For example, the server can prohibit the provision of QUIC services by directly closing port 443, or the server can limit the speed of client traffic based on the client's IP (Internet Protocol) address and source geographical location. Both of these methods will cause accidental damage to normal traffic and the risk of abnormal traffic being transmitted through. Casual damage means that since speed limiting is indiscriminate packet loss, when the QUIC traffic of a normal client is particularly large, it may be lost due to exceeding the speed limit threshold. Transparent transmission means that since the attacker can control a large number of abnormal clients with different IP addresses to launch an attack, even if each abnormal client is speed-limited, the final abnormal traffic after speed limiting is still large, resulting in the abnormal traffic still causing actual damage to the server.
[0038] Therefore, in the related art, when the server is attacked by abnormal traffic, the method of limiting the traffic speed of each client is adopted to reduce the attack on the server, but this method will cause accidental damage to normal traffic. If the number of abnormal clients is large and the abnormal traffic is still large, there may be a risk of transparent transmission, that is, the abnormal traffic will still cause actual damage to the server.
[0039] In addition, it is usually necessary to manually configure traffic speed limit policies based on actual business scenarios. For example, speed limit based on source IP, speed limit based on source geographic location, or directly shut down the server's QUIC service. Therefore, the protection efficiency is low and the labor cost is high.
[0040] In view of this, the embodiments of the present disclosure provide a traffic processing method, device, medium, and electronic device. The embodiments of the present disclosure are further explained below with reference to the accompanying drawings.
[0041] FIG1 is an architectural diagram of a system for implementing a traffic processing method according to an exemplary embodiment of the present disclosure. Referring to FIG1 , the system may include a protection device, an optical splitter, a core switch, and an access switch. The protection device may include a detection module and a protection module, wherein the protection module may include a first protection module, a second protection module, and a control center. An Internet Service Provider (ISP) is responsible for providing access network services to clients. An optical splitter is deployed between the ISP network and the core switch. The optical splitter replicates the incoming traffic initiated by the client and flowing to the server, obtains mirrored traffic, and forwards it to the detection module to achieve self-learning of attack thresholds and DDoS attack detection. The detection module analyzes the mirrored traffic to determine whether the server is under a distributed denial of service (DDoS) attack, and sends an alarm message and traffic data to the control center when it detects that the server is under a distributed denial of service (DDoS) attack. After receiving the alarm message, the control center will send a protection instruction for the server corresponding to the traffic data to the protection module. After receiving the protection instruction, the protection module will draw the incoming traffic of the server under DDoS attack to the protection module by declaring 32-bit BGP (Border Gateway Protocol) routing, intercept the detected abnormal traffic, and the intercepted abnormal traffic will not be sent to the server to avoid the server crashing due to processing a large amount of abnormal traffic; the detected normal traffic will be injected back to the server through the access switch for processing, so that the server can successfully respond to normal business requests from normal clients.
[0042] FIG2 is a flow chart showing a method for processing traffic according to an exemplary embodiment of the present disclosure. The method for processing traffic may be executed by the protection device described in FIG1 . Referring to FIG2 , the method for processing traffic may include steps 201 to 203 .
[0043] Step 201: Detect incoming traffic to the server to determine whether the server is under a distributed denial of service (DDoS) attack.
[0044] Inbound traffic refers to the traffic flowing to the server that provides external services.
[0045] For example, the detection module will pre-mirror the incoming traffic to the server to obtain mirrored traffic, take each server as the statistical object, count the total number of packets on port 443 of each server per second in a preset time period, calculate the average value based on the statistical results, and use the product of the average value and a fixed coefficient as the attack threshold for whether the server is under a distributed denial of service DDoS attack. The fixed coefficient here can be configured manually.
[0046] On this basis, in actual applications, the detection module detects the mirrored traffic obtained by mirroring the inbound traffic flowing to the server, and counts the total number of real-time packets of the server's port 443 in real time. When the total number of real-time packets exceeds the attack threshold, it is determined that the server is under a distributed denial of service DDoS attack; conversely, when the total number of real-time packets does not exceed the attack threshold, it is determined that the server is not under a distributed denial of service DDoS attack.
[0047] Therefore, in some embodiments, step 201 includes: detecting the mirrored traffic obtained by mirroring the incoming traffic flowing to the server to count the total number of real-time packets of port 443 of the server in real time, wherein port 443 is the port used by the QUIC protocol; when the total number of real-time packets is greater than the attack threshold, determining that the server is under a distributed denial of service DDoS attack; and when the total number of real-time packets is less than or equal to the attack threshold, determining that the server is not under a distributed denial of service DDoS attack.
[0048] In step 202, when it is determined that the server is attacked by a distributed denial of service (DDoS), it is determined whether the message format of the message in the incoming traffic is normal, and the message with an abnormal message format is intercepted, wherein the incoming traffic is generated based on the Fast User Datagram Protocol network connection (QUIC) protocol.
[0049] The specific implementation of step 202 may refer to the following related embodiments, which will not be described in detail in this embodiment.
[0050] Step 203: intercepting abnormal messages in the first message, wherein the first message is a message with a normal message format.
[0051] The specific implementation of step 203 may refer to the following related embodiments, which will not be described in detail in this embodiment.
[0052] Through the above method, for the traffic of the Fast User Datagram Protocol network connection QUIC protocol, when the server is attacked by a distributed denial of service DDoS attack, the detected messages with abnormal message formats are intercepted, and the messages with normal message formats are further detected, and the abnormal messages in the messages with normal message formats are intercepted, thereby avoiding abnormal traffic flowing into the server and causing server crashes, thereby improving the stability of the server.
[0053] It is worth noting that, for the normal messages in the first message, they can be injected back to the server for processing, so that the server can process normal traffic.
[0054] In some embodiments, the above-mentioned step 202 may include: in the case where it is determined that the server is attacked by a distributed denial of service DDoS, determining that the message header in the incoming traffic is a second message with a short header data packet; in the case where the length of the UDP payload of the second message is less than the length corresponding to the first preset byte, determining that the message format of the second message is abnormal and discarding the second message; and in the case where the length of the UDP payload of the second message is greater than or equal to the length corresponding to the first preset byte, determining that the message format of the second message is normal.
[0055] For example, the first preset byte may be 24 bytes. The structure of the short header data packet determines that the payload length of the UDP payload is greater than or equal to the length corresponding to 24 bytes. Therefore, if the length of the UDP payload of the second message is less than the length corresponding to 24 bytes, it can be determined that the message format of the second message is abnormal, and the second message is discarded, thereby intercepting the abnormal traffic.
[0056] In some embodiments, the above step 202 may include: when it is determined that the server is under a distributed denial of service DDoS attack, determining that the message header in the incoming traffic is a third message with a long header data packet; and when the length of the UDP payload of the third message is less than the length corresponding to the second preset byte, determining that the message format of the third message is abnormal, and discarding the third message.
[0057] For example, the second preset byte may be 48 bytes. The structure of the long header data packet determines that the payload length of the UDP payload is greater than or equal to the length corresponding to 48 bytes. Therefore, if the length of the UDP payload of the third message is less than the length corresponding to 48 bytes, it can be determined that the message format of the third message is abnormal, and the third message is discarded, thereby intercepting the abnormal traffic.
[0058] In addition, for the specific implementation of determining whether a message in the traffic is a short header data packet or a long header data packet, reference may be made to the following related embodiments.
[0059] In some embodiments, when the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte, the message type of the third message may be further combined to determine whether the message format of the message is normal. For example, the message type may include initial, 0-RTT, handshake, and retry.
[0060] For example, the above-mentioned step 202 may also include: when the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte, determining whether the third message is an initial message; when the third message is an initial message and the length of the UDP payload of the third message is less than the length corresponding to the third preset byte, determining that the message format of the third message is abnormal and discarding the third message; when the third message is not an initial message and the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte, determining that the message format of the third message is normal; when it is determined that the third message is an initial message and the length of the UDP payload of the third message is greater than or equal to the length corresponding to the third preset byte, determining that the message format of the third message is normal.
[0061] The second preset byte is smaller than the third preset byte. For example, the third preset byte may be 1200 bytes.
[0062] It's worth noting that an initial message, defined as a message of type "initial," is used by the target client to initiate a connection request. To prevent amplification attacks, the UDP payload length of the initial message must be greater than 1200 bytes.
[0063] Therefore, when the third message is the initial message and the length of the UDP payload of the third message is less than the length corresponding to the third preset byte, the message format of the third message is determined to be abnormal, and the third message is discarded to intercept the abnormal traffic.
[0064] The implementation method for determining whether the third message is an initial message may refer to the following related embodiments.
[0065] Fig. 3 is a flow chart showing step 202 according to an exemplary embodiment of the present disclosure. Referring to Fig. 3 , step 202 includes the following steps 301 to 308 .
[0066] Step 301: Obtain the inbound traffic to port 443 of the server.
[0067] Step 301 is actually the process of pulling inbound traffic in Figure 1. That is, if it is determined that the server is under a distributed denial of service (DDoS) attack, the inbound traffic flowing to port 443 of the server can be obtained and the abnormal traffic in the inbound traffic can be intercepted.
[0068] Step 302: Determine whether the value of the most significant bit of the first byte of the UDP payload of the message is 0.
[0069] Among them, step S303 is actually the process of determining whether the message header is a long header data packet or a short header data packet, that is, determining the second message in the incoming traffic whose message header is a short header data packet and determining the third message in the incoming traffic whose message header is a long header data packet.
[0070] Among them, a byte includes eight bits, the position of each bit can be represented by a mask, and the most significant bit can also be understood as the bit of the mask 0x80.
[0071] When the value of the most significant bit of the first byte of the UDP payload of the message is determined to be 0, the message is determined to be the second message, and step 303 is continued to determine whether the length of the UDP payload of the message is less than the length corresponding to 24 bytes.
[0072] For a message whose message header is a short header data packet, if the length of the UDP payload of the message is less than the length corresponding to 24 bytes, the message format of the message is determined to be abnormal and the message is discarded; if the length of the UDP payload of the message is greater than or equal to the length corresponding to 24 bytes, the message format of the message is determined to be normal, and step 305 is executed to detect whether the message is an abnormal message, and if it is determined that the message is an abnormal message, the message is intercepted. It is worth noting that the message detected in step 305 is a message with a normal message format. Step 305 uses a method other than message format detection to determine whether the message is normal, and the implementation method of step 305 can refer to the implementation method of step 203. This embodiment will not be described in detail here.
[0073] If it is determined that the value of the most significant bit of the first byte of the UDP payload of the message is not 0, the message is determined to be the third message, and step 306 is continued to determine whether the length of the UDP payload of the message is less than the length corresponding to the second preset byte. Furthermore, if it is determined that the value of the most significant bit of the first byte of the UDP payload of the message is 1, the message is determined to be the third message.
[0074] For a message whose message header is a long header data packet, if the length of the UDP payload of the message is less than the length corresponding to 48 bytes, it is determined that the message format of the message is abnormal and the message is discarded; if the length of the UDP payload of the message is greater than or equal to 48 bytes, step 307 is executed to determine whether the values of the third and fourth bits of the first byte of the UDP payload of the message are 0x00.
[0075] Step 307 is an implementation method for determining whether the message is an initial message. Specifically, whether the message is an initial message is determined by identifying the values of the third and fourth bits of the byte.
[0076] As mentioned above, different bits in a byte can be represented by a mask. Therefore, the third and fourth bits of a byte can also be understood as bits with a mask of 0x030.
[0077] If the values of the third and fourth bits of the first byte of the UDP payload of the message are not 0x00, it is determined that the message is not an initial message, and step 305 is continued.
[0078] When the values of the third and fourth bits of the first byte of the UDP payload of the message are 0x00, the message is determined to be an initial message, and step 308 is continued to determine whether the length of the UDP payload of the message is less than the length corresponding to 1200 bytes.
[0079] If the length of the UDP payload of the message is less than the length corresponding to 1200 bytes, it is determined that the message format of the message is abnormal, and step 304 is continued.
[0080] If the length of the UDP payload of the message is greater than or equal to the length corresponding to 1200 bytes, it is determined that the message format of the message is normal, and step 305 is continued.
[0081] When the values of the third and fourth bits of the first byte of the UDP payload of the message are not 0x00, it is determined that the message is not an initial message. Since step 307 is performed when the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte, it can be determined that the message format of the third message is normal, and step 305 is continued.
[0082] In some embodiments, the above-mentioned step of intercepting abnormal messages in the first message may include: obtaining the message type of the first message for the first message; and intercepting the abnormal messages in the first message according to the protection strategy corresponding to the message type of the first message.
[0083] For example, the protection strategy may include a first protection sub-strategy and a second protection sub-strategy. For first messages of different message types, the QUIC reverse challenge algorithm strategy or the QUIC behavior detection strategy corresponding to the message type of the first message may be used to intercept abnormal messages in the first message. The first protection sub-strategy here corresponds to the QUIC reverse challenge algorithm strategy, and the second protection sub-strategy here corresponds to the QUIC behavior detection strategy.
[0084] Referring to the protection logic shown in FIG4 , when the detection module detects that the server is under DDoS attack, the traffic sent to port 443 of the server will be pulled to the protection module. The protection module first detects the message format of the message to intercept messages with abnormal message formats. For forged messages with normal message formats, the module then intercepts abnormal messages in the forged messages with normal message formats based on the first protection sub-strategy or the second protection sub-strategy; and injects traffic back into normal traffic so that the server can process normal traffic normally. It is worth noting that the implementation method of the message format detection in FIG4 can refer to the implementation method of step 202 above, and this embodiment will not be repeated here.
[0085] Through the above method, for a forged message with a normal message format, it may still be abnormal traffic, because in order to further intercept abnormal messages, the protection strategy corresponding to the message type of the first message is used to intercept the abnormal messages in the first message; and taking into account the difference in message types, the present disclosure proposes protection strategies for different message types to intercept abnormal messages in the first message, so as to improve the practicality of the solution and effectively improve the protection effect on abnormal traffic.
[0086] The specific selection of the first protection sub-strategy or the second protection sub-strategy needs to be determined according to the message type of the first message. The following explains the selection of different protection sub-strategies for different message types.
[0087] First, the message types can be divided into initial messages and non-initial messages, where non-initial messages can be, for example, the above-mentioned messages with a message type of 0-RTT and a message with a message type of handshake, etc. As for the initial message, the QUIC reverse challenge algorithm strategy is adopted to intercept abnormal messages. The reason is that in the data transmission based on the QUIC protocol, the packet num mechanism of the QUIC protocol determines that the protection device cannot return a response message to the client instead of the server, otherwise it will cause the client's packet num space to be inconsistent with the server's packet num space, resulting in the entire QUIC session having to be interrupted and reconnected. The initial message is the first message used to establish a QUIC session, so even if the protection system returns a response message to the client instead of the server, it only asks the client to resend the initial message and try to establish a connection again, which has little impact on the client. Therefore, for the initial message, the reverse challenge algorithm can be used to intercept the abnormal message in the first message. The reverse challenge algorithm is exemplified below.
[0088] The above-mentioned step of intercepting abnormal messages in the first message according to the protection strategy corresponding to the message type of the first message can be implemented through the following reverse challenge algorithm: for the initial message in the first message, a response message is sent to the target client corresponding to the initial message on behalf of the server; the initial message resent by the target client is received, and it is verified whether the initial message resent by the target client carries random characters; if the initial message resent by the target client does not carry random characters, the step of returning to execute the initial message in the first message, sending a response message to the target client corresponding to the initial message on behalf of the server, so as to intercept abnormal messages in messages with normal message formats.
[0089] The initial message is used by the target client to request a connection, and the response message carries random characters. The random characters can be implemented based on a random number generation algorithm, that is, based on the source value given in the message, a corresponding hash value is generated, and the hash value can be used as the random character. The source value can be configured, for example, using the quintuple corresponding to the message and a preset value. The preset value can be configured according to actual conditions. For an explanation of the quintuple, refer to the following related embodiments.
[0090] It is worth noting that the abnormal client does not process the reply message, that is, the initial message resent by the abnormal client will not carry the random characters generated by the server, while the normal client processes the reply message, that is, the initial message resent by the normal client will carry the random characters generated by the server, so that whether the target client is a normal client can be determined based on whether the initial message resent by the target client carries random characters.
[0091] Figure 5 is an interactive diagram of an abnormal client receiving a response message according to an exemplary embodiment of the present disclosure. Referring to Figure 5, the protection device generates a response message carrying random characters for the initial message sent by the abnormal client. Since the connection is not established, the abnormal client resends the initial message to try to connect, and the resent initial message does not carry random characters. The protection device verifies that the newly received initial message does not carry random characters. The protection device will continue to send a response message carrying random characters to the abnormal client. By analogy, the abnormal traffic is intercepted by the protection device, thereby preventing the abnormal traffic from reaching the server.
[0092] It is worth noting that since the abnormal client resends the initial message, it is possible to first detect whether the message format is normal. If it is detected that the message format of the resent initial message is abnormal, it is directly intercepted without the need to use the protection strategy corresponding to the initial message for detection.
[0093] However, since the initial message sent by the abnormal client before resending the initial message is a forged message with a normal message format, after that, the subsequent messages sent by the abnormal client may all be forged messages with a normal message format. Therefore, in another embodiment, for the initial message sent by the target client that is re-received, it is possible to directly verify whether the initial message carries random characters, eliminating the need to detect whether the message format is normal.
[0094] Through the above method, there is no need to upload the key to the protection device. The reverse challenge algorithm can be used to identify abnormal traffic, and only the reverse challenge algorithm is used to intercept the initial message, thereby reducing the impact on the client.
[0095] In some embodiments, the protection device can count the number of response messages sent to the same client. For example, after the number of response messages sent to client A reaches a preset number, the protection device can stop sending response messages to client A on behalf of the server, thereby reducing resource consumption of the protection device. In this embodiment, since the traffic of client A also fails the verification of carrying random characters, the traffic of client A will not be injected back to the server, thereby also being able to intercept abnormal traffic initiated by client A. In some embodiments, when the initial message resent by the target client carries random characters, the target client is added to the trust list and a disconnection message is sent to the target client.
[0096] Figure 6 is an interactive diagram illustrating a normal client receiving a response message according to an exemplary embodiment of the present disclosure. Referring to Figure 6 , after receiving the initial message sent by the normal client for the first time, the protection device sends a response message to the normal client on behalf of the server, including a random character in the response message. The protection device then sends the response message containing the random character to the normal client. After receiving the response message, the normal client processes the response message to obtain the random character and resends the initial message to the protection device, also including the random character in the resent initial message. After receiving the initial message resent by the normal client, the protection device verifies whether the initial message contains the random character. If the resent initial message contains the random character, the protection device adds the normal client's IP address to the trust list and sends a disconnect message to the normal client. After receiving the disconnect message, the normal client terminates its current connection with the protection device and resends the initial message. Since the IP address of the client corresponding to the initial message is in the trust list, the initial message will reach the server directly.
[0097] It is worth noting that since the initial message resent by the target client establishes a connection between the protection device and the normal client, in order for the normal client to establish a connection with the server, the protection device needs to send a connection interrupt message to the normal client, thereby interrupting the connection between the target client and the protection device.
[0098] It is worth noting that after a normal client interrupts the connection established with the protection device, since the messages generated by the clients added to the trust list will be sent directly to the server, the initial message sent by the normal client after receiving the interruption message does not need to be checked for normal message format and corresponding protection policy, but directly reaches the server, reducing the resource usage of the protection device and thus completing the normal session connection between the client and the server.
[0099] For example, a trust list can be stored on the protection device. Furthermore, a time limit can be set for a client's IP address to be added to the trust list. After a client's IP address has been added to the trust list for a certain period of time, the client's IP address is removed from the trust list. This reduces the storage pressure on the protection device.
[0100] As mentioned above, the reverse challenge algorithm can successfully distinguish between abnormal clients and normal clients, so that the traffic initiated by abnormal clients can be intercepted, while the normal traffic initiated by normal clients can be processed by the server. However, in order to reduce the impact on the client, the reverse challenge algorithm is only for the initial message. Therefore, in some embodiments, for non-initial messages, the above-mentioned step of intercepting abnormal messages in the first message according to the protection strategy corresponding to the message type of the first message can be implemented in the following way: determine the message carrying the target session identifier from the non-initial messages in the first message, and discard the message carrying the target session identifier.
[0101] As shown in the above message types, non-initial messages may be, for example, messages with the message type of 0-RTT and messages with the message type of handshake, and so on.
[0102] The target session identifier appears in the sessions within the first preset time a first preset number of times. The first preset time and the first preset number of times can be set according to actual conditions. For example, the first preset number of times can be 5 times. That is, if a session identifier appears in 5 sessions within the first preset time, the session identifier is characterized as the target session identifier.
[0103] The session identifier is also known as the connection ID (CID). In the QUIC protocol, the server uses different CIDs for different sessions. Messages belonging to different sessions use different CIDs, while messages belonging to the same session use the same CID. Therefore, if the same CID appears in multiple different sessions within a short period of time, it can be considered a forged CID, and the corresponding messages can be determined to be abnormal.
[0104] For example, the message carrying the target session identifier can be determined from the non-initial messages in the first message in the following manner: obtain the five-tuple information corresponding to the non-initial message in the first message, and determine the message carrying the target session identifier from the non-initial messages in the first message based on the five-tuple information.
[0105] The five-tuple information may include, for example, source IP, source port, destination IP, destination port and protocol type. The protocol type and destination port are used to identify whether the message is a QUIC message based on the QUIC protocol. The source IP is the IP address corresponding to the client, and the destination IP is the IP address corresponding to the server. If any of the source IP and source port are different, it can be indicated that the sessions are different.
[0106] Refer to Table 1 below, which shows the quintuple information of 5 messages within the first preset time and the CIDs corresponding to the messages.
[0107] Table 1
[0108] In Table 1 above, Srcip represents the source IP address, Srcport represents the source port, Dstip represents the server IP address, Dstport represents the server port, and Protocol represents the protocol type. From the server IP address, server port and protocol type in Table 1, it can be seen that the above five messages are QUIC messages sent to port 443 of the server, and at least one of the source port and source IP address in the above five messages is different. It can be determined that the above five messages are QUIC messages of different sessions, but the CIDs corresponding to these five sessions are the same, indicating that the CID is the target session identifier, and the messages carrying the CID can be determined as abnormal messages.
[0109] Through the above method, abnormal messages can be determined based on the distribution of session identifiers corresponding to the messages and discarded, thereby intercepting abnormal traffic; and CID is data transmitted in plain text, so the purpose of intercepting abnormal traffic can be achieved without the need for a key.
[0110] In some embodiments, for non-initial messages, the above-mentioned step of intercepting abnormal messages in the first message based on the protection strategy corresponding to the message type of the first message can be implemented in the following manner: determining the message carrying the target payload from the non-initial messages in the first message; and discarding the message carrying the target payload.
[0111] The following table 2 briefly illustrates the components of the message:
[0112] Table 2
[0113] The IP header in Table 2 may include fields such as Srcip, Dstip, and Protocol in Table 1 above, the QUIC long / short header in Table 2 may include fields such as CID in Table 1 above, the UDP header in Table 2 may include fields such as Srcport and Dstport in Table 1 above, and the QUIC long / short header and QUIC payload may be collectively referred to as data payload. It is worth noting that the payload carried by a QUIC-based message may be referred to as a QUIC payload.
[0114] The target payload is a payload that appears a second preset number of times among all payloads within the second preset time. The second preset time and the second preset number can be set based on actual conditions. For example, the second preset number can be 100 times. If a payload appears 100 times among all payloads within the second preset time, the payload is identified as the target payload. It is understood that all payloads within the second preset time can be equivalent to all messages within the second preset time, and the message here can be, for example, the first message.
[0115] It's worth noting that the protection system cannot decrypt the QUIC payload without the key, making it impossible to verify based on the data that the message carrying the QUIC payload is legitimate. However, since the QUIC payload is randomly encrypted, it inevitably changes randomly, and the same payload will not appear repeatedly in a short period of time. If the same payload appears too many times in a short period of time, it can be proved that the payload was forged by a malicious client.
[0116] Therefore, if within a short period of time, it is detected that the same payload appears in all payloads within a short period of time a second preset number of times, then the payload can be determined as the target payload, and the message corresponding to the target payload can also be determined to be an abnormal message, and the determined abnormal message can be discarded, thereby achieving the purpose of intercepting abnormal traffic without a key.
[0117] In addition, in order to reduce the computational complexity of the protection device, whether it is the same payload can be determined based on whether the data corresponding to the fixed byte position of the payload is the same, that is, the target payload can also be a payload with the same first preset byte and second preset byte, and a payload that appears a second preset number of times in all payloads within the second preset time.
[0118] 7 , the preset bytes may be 4 bytes. If a QUIC payload with the same first and last 4 bytes appears a second preset number of times in all QUIC payloads within a second preset time period, the QUIC payload is the target payload.
[0119] In some embodiments, for non-initial messages with normal message formats, the implementation methods related to Table 1 and Table 2 may be simultaneously used to intercept abnormal messages in forged messages with normal message formats.
[0120] Based on the same inventive concept, an embodiment of the present disclosure further provides a traffic processing device. FIG8 is a block diagram of a traffic processing device according to an exemplary embodiment of the present disclosure. Referring to FIG8 , the device 800 includes: a detection module 801 , a first protection module 802 , and a second protection module 803 .
[0121] The detection module 801 is used to detect the inbound traffic flowing to the server to determine whether the server is under a distributed denial of service (DDoS) attack.
[0122] The first protection module 802 is used to determine whether the message format of the message in the incoming traffic is normal when it is determined that the server is attacked by a distributed denial of service DDoS, and to intercept the message with an abnormal message format, wherein the incoming traffic is generated based on the Fast User Datagram Protocol Internet Connection QUIC protocol.
[0123] The second protection module 803 is configured to intercept abnormal messages in the first message, wherein the first message is a message with a normal message format.
[0124] In some embodiments, the first protection module 802 includes: a first determination submodule, used to determine that the message header in the incoming traffic is a second message with a short header data packet when it is determined that the server is attacked by a distributed denial of service DDoS; a second determination submodule, used to determine that the message format of the second message is abnormal and discard the second message when the length of the UDP payload of the second message is less than the length corresponding to the first preset byte; and a third determination submodule, used to determine that the message format of the second message is normal when the length of the UDP payload of the second message is greater than or equal to the length corresponding to the first preset byte.
[0125] In some embodiments, the first protection module 802 includes: a fourth determination submodule, used to determine that the third message in the incoming traffic has a long header data packet as the message header when it is determined that the server is attacked by a distributed denial of service DDoS; and a fifth determination submodule, used to determine that the message format of the third message is abnormal and discard the third message when the length of the UDP payload of the third message is less than the length corresponding to the second preset byte.
[0126] In some embodiments, the first protection module 802 also includes: a sixth determination submodule, used to determine whether the third message is an initial message when the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte, and the initial message is used to initiate the target client request of the initial message to establish a connection; and a seventh determination submodule, used to determine that the message format of the third message is abnormal and discard the third message when the third message is the initial message and the length of the UDP payload of the third message is less than the length corresponding to the third preset byte, and the second preset byte is less than the third preset byte.
[0127] In some embodiments, the first protection module 802 also includes: an eighth determination submodule, used to determine that the message format of the third message is normal when the third message is not the initial message and the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte; and a ninth determination submodule, used to determine that the message format of the third message is normal when it is determined that the third message is the initial message and the length of the UDP payload of the third message is greater than or equal to the length corresponding to the third preset byte.
[0128] In some embodiments, the second protection module 803 includes: a first acquisition submodule, used to obtain the message type of the first message for the first message; and a first interception submodule, used to intercept abnormal messages in the first message according to a protection strategy corresponding to the message type of the first message.
[0129] In some embodiments, the first interception submodule is used to: for the initial message in the first message, send a reply message to the target client corresponding to the initial message instead of the server, the initial message is used for the target client to request to establish a connection, the reply message carries random characters, and the reply message is used to instruct the target client to resend the initial message, and the initial message resent by the abnormal client does not carry the random characters, and the initial message resent by the normal client carries the random characters; receive the initial message resent by the target client, and verify whether the initial message resent by the target client carries the random characters; and if the initial message resent by the target client does not carry the random characters, return to execute the step of sending a reply message to the target client corresponding to the initial message instead of the server for the initial message in the first message, so as to intercept the abnormal message in the message with normal message format.
[0130] In some embodiments, the device 800 also includes: a sending module, used to add the target client to the trust list and send a connection interruption message to the target client when the initial message resent by the target client carries the random character, wherein the connection interruption message is used to interrupt the connection between the target client and the protection device, and the message generated by the client added to the trust list is directly sent to the server.
[0131] In some embodiments, the second protection module 803 also includes: a tenth determination submodule, used to determine the message carrying the target session identifier from the non-initial message in the first message, wherein, in the QUIC protocol, the session identifiers used by messages belonging to different sessions are different, and the target session identifier appears in the session within the first preset time a first preset number of times; and a second interception submodule, used to discard the message carrying the target session identifier.
[0132] In some embodiments, the tenth determination submodule is used to obtain the five-tuple information corresponding to the non-initial message in the first message, and based on the five-tuple information, determine the message carrying the target session identifier from the non-initial message in the first message, wherein the five-tuple information includes source IP, source port, target IP, target port and protocol type.
[0133] In some embodiments, the second protection module 803 also includes: an eleventh determination submodule, used to determine a message carrying a target payload from non-initial messages in the first message, wherein the target payload is a payload that appears a second preset number of times among all payloads within a second preset time; and a third interception submodule, used to discard the message carrying the target payload.
[0134] In some embodiments, the target payload is a payload having the same first preset byte and second preset byte, and is a payload that appears a second preset number of times in all payloads within a second preset time.
[0135] In some embodiments, the detection module 801 is used to detect the mirrored traffic obtained by mirroring the incoming traffic flowing to the server, so as to count the total number of real-time packets of port 443 of the server in real time, wherein the port 443 is the port used by the QUIC protocol. When the total number of real-time packets is greater than the attack threshold, it is determined that the server is under a distributed denial of service DDoS attack; and when the total number of real-time packets is less than or equal to the attack threshold, it is determined that the server is not under a distributed denial of service DDoS attack.
[0136] The implementation of each module in the above-mentioned device 800 can refer to the above-mentioned method embodiment, and this embodiment will not be described in detail here.
[0137] Based on the same inventive concept, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the above-mentioned traffic processing method when executed by a processing device.
[0138] Based on the same inventive concept, an embodiment of the present disclosure provides an electronic device, comprising: a storage device storing a computer program; and a processing device for executing the computer program in the storage device to implement the above-mentioned traffic processing method.
[0139] Reference is now made to FIG9 , which illustrates a schematic diagram of the structure of an electronic device (e.g., the aforementioned protective device, server, or client) 900 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG9 is merely an example and should not limit the functionality and scope of use of the embodiment of the present disclosure.
[0140] As shown in Figure 9, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0141] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although FIG9 shows the electronic device 900 with various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0142] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0143] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0144] In some embodiments, the electronic devices can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0145] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0146] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: detects the incoming traffic flowing to the server to determine whether the server is attacked by a distributed denial of service DDoS; when it is determined that the server is attacked by a distributed denial of service DDoS, determines whether the message format of the message in the incoming traffic is abnormal, and intercepts the message with abnormal message format, wherein the incoming traffic is generated based on the Fast User Datagram Protocol Network Connection QUIC protocol; intercepts abnormal messages in the first message, wherein the first message is a message with a normal message format.
[0147] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0149] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.
[0150] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0151] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0152] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0153] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0154] In some embodiments of the present disclosure, a computer program is further provided, comprising: instructions, which, when executed by a processor, cause the processor to perform the traffic processing method as described above.
[0155] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.
Claims
1. A traffic processing method, performed by a protection device, comprising: Detect incoming traffic to the server to determine whether the server is under a distributed denial of service (DDoS) attack; In the case where it is determined that the server is under a distributed denial of service (DDoS) attack, determining whether a message format of a message in the incoming traffic is normal, and intercepting a message with an abnormal message format, wherein the incoming traffic is generated based on a fast user datagram protocol network connection (QUIC) protocol; and An abnormal message in a first message is intercepted, wherein the first message is a message with a normal message format.
2. The traffic processing method according to claim 1, wherein: In the case where it is determined that the server is attacked by a distributed denial of service (DDoS), determining whether the message format of the message in the incoming traffic is normal, and intercepting the message with abnormal message format, includes: In the case where it is determined that the server is attacked by a distributed denial of service (DDoS), determining that the message header in the incoming traffic is a second message of a short header data packet; When the length of the UDP payload of the second message is less than the length corresponding to the first preset byte, determining that the message format of the second message is abnormal, and discarding the second message; and When the length of the UDP payload of the second message is greater than or equal to the length corresponding to the first preset byte, it is determined that the message format of the second message is normal.
3. The traffic processing method according to claim 1, wherein: In the case where it is determined that the server is attacked by a distributed denial of service (DDoS), determining whether the message format of the message in the incoming traffic is normal, and intercepting the message with abnormal message format, includes: In the case where it is determined that the server is attacked by a distributed denial of service (DDoS), determining that the header of the inbound traffic is a third message with a long header data packet; and When the length of the UDP payload of the third message is less than the length corresponding to the second preset byte, it is determined that the message format of the third message is abnormal, and the third message is discarded.
4. The traffic processing method according to claim 3, wherein: In the case where it is determined that the server is attacked by a distributed denial of service (DDoS), determining whether the message format of the message in the incoming traffic is normal, and intercepting the message with an abnormal message format, further includes: In a case where the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte, determining whether the third message is an initial message, the initial message being used to initiate a target client request of the initial message to establish a connection; When the third message is the initial message and the length of the UDP payload of the third message is less than the length corresponding to the third preset byte, it is determined that the message format of the third message is abnormal and the third message is discarded, and the second preset byte is less than the third preset byte.
5. The traffic processing method according to claim 4, wherein: In the case where it is determined that the server is attacked by a distributed denial of service (DDoS), determining whether the message format of the message in the incoming traffic is normal, and intercepting the message with an abnormal message format, further includes: When the third message is not the initial message and the length of the UDP payload of the third message is greater than or equal to the length corresponding to the second preset byte, determining that the message format of the third message is normal; When it is determined that the third message is the initial message and the length of the UDP payload of the third message is greater than or equal to the length corresponding to the third preset byte, it is determined that the message format of the third message is normal.
6. The traffic processing method according to any one of claims 1 to 5, wherein: Intercepting the abnormal message in the first message includes: For a first message, obtaining a message type of the first message; and According to a protection strategy corresponding to the message type of the first message, abnormal messages in the first message are intercepted.
7. The traffic processing method according to claim 6, wherein: The intercepting the abnormal message in the first message according to the protection strategy corresponding to the message type of the first message includes: For an initial message in the first message, sending a response message to a target client corresponding to the initial message on behalf of the server, wherein the initial message is used by the target client to request to establish a connection, the response message carries random characters, and the response message is used to instruct the target client to resend the initial message, and the initial message resent by the abnormal client does not carry the random characters, and the initial message resent by the normal client carries the random characters; Receive the initial message resent by the target client, and verify the initial message resent by the target client whether the text carries the random characters; and In the case that the initial message resent by the target client does not carry the random characters, the step of returning to execute the initial message in the first message, replacing the server with the step of sending a response message to the target client corresponding to the initial message, so as to intercept the abnormal message in the message with normal message format.
8. The traffic processing method according to claim 7, further comprising: In the case where the initial message resent by the target client carries the random characters, the target client is added to the trust list, and a connection interruption message is sent to the target client, wherein the connection interruption message is used to interrupt the connection between the target client and the protection device, and the message generated by the client added to the trust list is directly sent to the server.
9. The method according to claim 6, wherein: The intercepting the abnormal message in the first message according to the protection strategy corresponding to the message type of the first message includes: Determining a message carrying a target session identifier from non-initial messages in the first message, wherein in the QUIC protocol, messages belonging to different sessions use different session identifiers, and the target session identifier appears in the session within a first preset time a number of times reaching a first preset number; and The message carrying the target session identifier is discarded.
10. The traffic processing method according to claim 9, wherein: Determining a message carrying a target session identifier from non-initial messages in the first message includes: Acquire five-tuple information corresponding to the non-initial message in the first message, wherein the five-tuple information includes a source IP, a source port, a target IP, a target port, and a protocol type; and According to the quintuple information, a message carrying the target session identifier is determined from non-initial messages in the first message.
11. The traffic processing method according to claim 6, wherein: The intercepting the abnormal message in the first message according to the protection strategy corresponding to the message type of the first message includes: Determine a message carrying a target payload from non-initial messages in the first message, wherein the target payload is a payload that appears a second preset number of times among all payloads within a second preset time; and The message carrying the target payload is discarded.
12. The traffic processing method according to claim 11, wherein: The target payload is a payload with the same first preset byte and the same second preset byte, and is a payload that appears a second preset number of times in all payloads within a second preset time.
13. The traffic processing method according to any one of claims 1 to 12, wherein: Detect incoming traffic to the server to determine whether the server is under a distributed denial of service (DDoS) attack, including: Detecting the mirrored traffic obtained by mirroring the incoming traffic to the server to count the total number of real-time packets of port 443 of the server in real time, wherein port 443 is the port used by the QUIC protocol; When the total amount of real-time packets is greater than the attack threshold, it is determined that the server is under a distributed denial of service DDoS attack; and When the total amount of real-time packets is less than or equal to the attack threshold, it is determined that the server is not attacked by a distributed denial of service DDoS.
14. A flow processing device, comprising: A detection module is used to detect the incoming traffic flowing to the server to determine whether the server is attacked by a distributed denial of service (DDoS); A first protection module is used to determine whether the message format of the message in the incoming traffic is normal when it is determined that the server is attacked by a distributed denial of service DDoS, and intercept the message with an abnormal message format, wherein the incoming traffic is generated based on a fast user datagram protocol network connection QUIC protocol; The second protection module is used to intercept abnormal messages in the first message, wherein the first message is a message with a normal message format.
15. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processing device, the traffic processing method according to any one of claims 1 to 13 is implemented.
16. An electronic device comprising: a storage device having a computer program stored thereon; and A processing device for executing the computer program in the storage device to implement the method of claims 1 to 13. Any traffic processing method described in any one of the preceding claims.
17. A computer program comprising: Instructions, when executed by a processor, cause the processor to perform the traffic processing method according to any one of claims 1 to 13.
Citation Information
Patent Citations
WiMAX system as well as device and method for defending DDoS attack
CN102026199A
Method and device for detecting attack of DDoS (distributed denial of service)
CN104348811A
Defense method and device for distributed denial of service attack and server
CN114039763A
Sealing glass composition improved bond strength and sealing meterial using the same, heat exchanger
KR102768411B1
