Flow processing method and device, medium and electronic equipment
By detecting and intercepting the incoming traffic of the QUIC protocol network, the problem of abnormal traffic identification and interception during DDoS attacks in the QUIC protocol network is solved, the server stability and protection efficiency are improved, and labor costs are reduced.
Patent Information
- Application Number
- CN202310525725.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2024-11-12
AI Technical Summary
In the QUIC protocol network, when the server is attacked by a distributed denial of service DDoS, it is difficult for the existing technology to effectively identify and intercept abnormal traffic, resulting in the risk of accidental damage and transmission of normal traffic, and the protection efficiency is low and labor costs are high.
Through the detection module, the incoming traffic flowing to the server is mirrored and analyzed to determine whether it is subject to DDoS attack. When determining the attack, it intercepts packets with abnormal message format, including further intercepting packets with normal message format forged packets with normal message format. , avoid abnormal traffic flowing into the server.
It effectively avoids server downtime caused by abnormal traffic, improves server stability, reduces accidental damage to normal traffic, improves protection efficiency, and reduces labor costs.
Smart Images

Figure CN118944901A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] 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).
[0003] Currently, when a server is attacked by abnormal traffic, the method of limiting the traffic speed of each client is used to reduce the attack on the server. However, this method may 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.
[0004] Therefore, how to identify the traffic generated by the QUIC protocol is an urgent problem to be solved. Summary of the invention
[0005] This summary is provided to introduce concepts in a brief form 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.
[0006] In a first aspect, the present disclosure provides a traffic processing method, comprising:
[0007] Detect incoming traffic to the server to determine whether the server is under a distributed denial of service (DDoS) attack;
[0008] 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;
[0009] An abnormal message in a first message is intercepted, wherein the first message is a message with a normal message format.
[0010] In a second aspect, the present disclosure provides a flow processing device, comprising:
[0011] A detection module, the 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;
[0012] A first protection module, wherein the first protection module is used to determine whether a message format of a 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 messages with abnormal message formats, wherein the incoming traffic is generated based on a fast user datagram protocol network connection QUIC protocol;
[0013] A second protection module, 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
[0014] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the program is executed by a processing device.
[0015] In a fourth aspect, the present disclosure provides an electronic device, including:
[0016] a storage device having a computer program stored thereon;
[0017] A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.
[0018] Through the above technical solution, 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, so as to avoid abnormal traffic flowing into the server and causing the server to crash, thereby improving the stability of the server.
[0019] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages and aspects of the 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 the originals and elements are not necessarily drawn to scale. In the drawings:
[0021] Figure 1 is a system architecture diagram of a protection device according to an exemplary embodiment of the present disclosure;
[0022] Figure 2 is a flow chart of a traffic processing method according to an exemplary embodiment of the present disclosure;
[0023] Figure 3 is a flowchart of step 202 according to an exemplary embodiment of the present disclosure;
[0024] Figure 4 is a schematic diagram of protection logic of a traffic processing method according to an exemplary embodiment of the present disclosure;
[0025] Figure 5 is an interaction diagram showing an abnormal client receiving a response message according to an exemplary embodiment of the present disclosure;
[0026] Figure 6 is an interaction diagram of a normal client receiving a response message according to an exemplary embodiment of the present disclosure;
[0027] Figure 7 is a schematic diagram showing components of a message according to an exemplary embodiment of the present disclosure;
[0028] Figure 8 is a block diagram of a traffic processing device according to an exemplary embodiment of the present disclosure;
[0029] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Embodiments of the present disclosure will be described in more detail below 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 being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0031] 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.
[0032] The term "including" and its variations used herein are open inclusions, 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"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present 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.
[0034] It should be noted that the modifications of "one" and "plurality" 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, it should be understood as "one or more".
[0035] 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.
[0036] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present 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.
[0037] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0038] As an optional but non-limiting implementation, in response to receiving an active request from the user, 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. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0039] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0040] 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) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0041] Distributed Denial of Service (DDoS) attacks are attacks that control botnets distributed across the Internet to initiate a large number of malicious service requests to the server, causing the server to be unable to respond to normal service requests initiated by normal clients, resulting in a denial of service attack. For example, the botnet controls abnormal clients to send a large amount of forged abnormal traffic based on the QUIC protocol to the server, forcing the server to be busy processing a large amount of abnormal traffic, causing the server's resources to be exhausted, or the server's network card is blocked by abnormal traffic, eventually causing the server to crash and be unable to provide services normally. The attack method that causes the server to crash through forged abnormal traffic based on the QUIC protocol is called QUICFlood below.
[0042] 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.
[0043] 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 the protection measures against QUICFlood. In addition, 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, the 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.
[0044] 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 geographic location. Both of these methods will cause accidental damage to normal traffic and cause the risk of abnormal traffic transparent transmission. Casual damage means that since speed limiting is indiscriminate packet loss, when the QUIC traffic of a normal client is particularly large, it may cause packet loss 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 attacks, even if each abnormal client is speed-limited, the abnormal traffic after the speed limit is still large, resulting in the abnormal traffic still causing actual damage to the server.
[0045] 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.
[0046] 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 in conjunction with the accompanying drawings.
[0047] Figure 1 is an architecture diagram of a system for implementing a traffic processing method according to an exemplary embodiment of the present disclosure. Figure 1, the system may include protection equipment, optical splitter, core switch and access switch, the protection equipment may include detection module and protection module, wherein the protection module may include first protection module, second protection module and control center. The Internet Service Provider (ISP) is responsible for providing access network services to clients, and an optical splitter is deployed between the ISP network and the core switch. The optical splitter copies the incoming traffic initiated by the client and flowing to the server, obtains the mirror traffic and forwards it to the detection module, so as to realize self-learning of attack threshold and DDoS attack detection. The detection module analyzes the mirror traffic to determine whether the server is attacked by distributed denial of service DDoS, and sends alarm information and traffic data to the control center when it detects that the server is attacked by distributed denial of service DDoS; after receiving the alarm information, the control center will send the protection instruction of 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 attacked by DDoS to the protection module by declaring 32-bit BGP (Border Gateway Protocol) routing, and intercept the detected abnormal traffic. 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 the normal business requests of normal clients.
[0048] Figure 2 is a flow chart of a traffic processing method according to an exemplary embodiment of the present disclosure. The traffic processing method can be based on Figure 1 The protective equipment described in Figure 2 , the traffic processing method may include the following steps:
[0049] Step 201, detect the incoming traffic to the server to determine whether the server is attacked by a distributed denial of service (DDoS).
[0050] Among them, inbound traffic refers to the traffic flowing to the server that provides external services.
[0051] 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 attacked by a distributed denial of service DDoS attack. The fixed coefficient here can be configured manually.
[0052] On this basis, in actual applications, the detection module detects the mirrored traffic obtained by mirroring the incoming traffic flowing to the server, and counts the total number of real-time packets of port 443 of the server 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.
[0053] Step 202, when it is determined that the server is attacked by a distributed denial of service DDoS, determine whether the message format of the message in the incoming traffic is normal, and intercept the message with abnormal message format, wherein the incoming traffic is generated based on the Fast User Datagram Protocol Network Connection QUIC protocol.
[0054] The specific implementation of step 202 may refer to the following related embodiments, which will not be described in detail in this embodiment.
[0055] Step 203: intercepting abnormal messages in the first message, wherein the first message is a message with a normal message format.
[0056] The specific implementation of step 203 may refer to the following related embodiments, which will not be described in detail in this embodiment.
[0057] 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, 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 from flowing into the server and causing the server to crash, thereby improving the stability of the server.
[0058] 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 the normal traffic.
[0059] In some embodiments, the above 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; 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.
[0060] 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, when 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 to intercept abnormal traffic.
[0061] In some embodiments, the above step 202 may include: when it is determined that the server is attacked by a distributed denial of service DDoS, determining that the third message in the incoming traffic has a message header that is a long header data packet; 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.
[0062] 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, when 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 to intercept abnormal traffic.
[0063] In addition, the specific implementation method for determining whether a message in the traffic is a short header data packet or a long header data packet can refer to the following related embodiments.
[0064] 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 can be further combined to determine whether the message format of the message is normal. The message type can include initial, 0-RTT, handshake, and Retry.
[0065] For example, the above 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.
[0066] The second preset byte is smaller than the third preset byte, and the third preset byte may be 1200 bytes.
[0067] It is worth noting that the initial message is a message of the message type initial, and the initial message is used to initiate the target client request to establish a connection. And for the initial message, in order to avoid the limitation of reflection amplification attack, the length of the UDP payload of the initial message needs to be greater than the length corresponding to 1200 bytes.
[0068] 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.
[0069] Among them, the implementation method for determining whether the third message is an initial message can refer to the following related embodiments.
[0070] Figure 3 FIG. 2 is a flowchart of step 202 according to an exemplary embodiment of the present disclosure. Figure 3 , including the following steps:
[0071] Step 301, obtaining the inbound traffic to port 443 of the server.
[0072] Among them, step 301 is actually Figure 1 That is, if it is determined that the server is under a distributed denial of service (DDoS) attack, the inbound traffic to port 443 of the server can be obtained, and the abnormal traffic in the inbound traffic can be intercepted.
[0073] Step 302: determine whether the value of the most significant bit of the first byte of the UDP payload of the message is 0.
[0074] Among them, step S303 is actually the process of determining whether the message header of the message is a long header data packet or a short header data packet, that is, determining the second message whose message header is a short header data packet in the incoming traffic and determining the third message whose message header is a long header data packet in the incoming traffic.
[0075] 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.
[0076] When it is determined that the value of the most significant bit of the first byte of the UDP payload of the message is 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.
[0077] 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, 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 the length corresponding to 24 bytes, it is determined that the message format of the message is 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 other methods different from 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, which is not repeated in this embodiment.
[0078] Wherein, when 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 be executed to determine whether the length of the UDP payload of the message is less than the length corresponding to the second preset byte. Further, when 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.
[0079] 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.
[0080] Wherein, step 307 is an implementation method of 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.
[0081] As mentioned above, different bits in a byte can be represented by a mask, so the third and fourth bits of the byte can also be understood as bits with a mask of 0x030.
[0082] 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, and step 305 is continued.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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 executed 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.
[0087] 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.
[0088] Among them, 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 QUIC behavior detection strategy corresponding to the message type of the first message can 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.
[0089] Reference Figure 4 The protection logic shown is that when the detection module detects that the server is under DDoS attack, the traffic sent to port 443 of the server will be directed to the protection module. The protection module first detects the message format and intercepts messages with abnormal message formats. For forged messages with normal message formats, the module intercepts abnormal messages in the forged messages with normal message formats based on the first protection sub-strategy or the second protection sub-strategy. It also injects traffic back into normal traffic so that the server can process normal traffic normally. It is worth noting that Figure 4 The implementation method of detecting the message format in can refer to the implementation method of the above step 202, and this embodiment will not be described in detail here.
[0090] 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 the abnormal messages in the first message, so as to improve the practicality of the solution and effectively improve the protection effect on abnormal traffic.
[0091] 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 based on different message types.
[0092] First, the message type can be divided into initial message and non-initial message, wherein the non-initial message can be, for example, the above-mentioned message type 0-RTT message and the message type handshake message, etc. 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 the response message to the client instead of the server, otherwise it will cause the packet num space of the client to be inconsistent with the packet num space of the server, so that the entire QUIC session can only be interrupted and reconnected. The initial message is the first message used to establish a QUIC session, so even if the protection system returns the response message to the client instead of the server, it only asks the client to resend the initial message to retry to establish the connection, 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 exemplarily described below.
[0093] 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 by the following reverse challenge algorithm: for the initial message in the first message, a reply 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; when the initial message resent by the target client does not carry random characters, it returns to execute the step of sending a reply message to the target client corresponding to the initial message on behalf of the server for the initial message in the first message, so as to intercept abnormal messages with normal message formats.
[0094] Among them, the initial message is used for the target client to request to establish 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 for the message, a corresponding Hash value is generated, and the Hash value can be used as a random character. The source value can be configured, for example, by a five-tuple corresponding to the message and a preset value. The preset value can be configured according to actual conditions. In addition, the explanation of the five-tuple refers to the following related embodiments.
[0095] 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. Therefore, 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.
[0096] Figure 5 is an interaction 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 response messages 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.
[0097] It is worth noting that, since the abnormal client can first detect whether the format of the message is normal when resending the initial message, if it is detected that the 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;
[0098] 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.
[0099] 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.
[0100] In some embodiments, the protection device can count the number of times a reply message is sent to the same client. For example, after the number of times a reply message is sent to client A reaches a preset number, the protection device can stop sending reply messages to client A on behalf of the server, thereby reducing the resource loss of the protection device. In this embodiment, since the traffic of client A has not passed the verification of carrying random characters, the traffic of client A will not be injected back to the server, thereby intercepting the 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.
[0101] Figure 6 is an interaction diagram of 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 replies to the normal client with a response message on behalf of the server, and carries random characters in the response message. The protection device sends the response message carrying the random characters to the normal client; after receiving the response message, the normal client processes the response message to obtain random characters, and resends the initial message to the protection device, and the resent initial message carries random characters; after receiving the initial message resent by the normal client, the protection device verifies whether the initial message carries random characters. If the re-received initial message carries random characters, the protection device adds the IP address of the normal client to the trust list and sends a connection interruption message to the normal client; after receiving the connection interruption message, the normal client interrupts the connection established with the protection device and resends the initial message. The IP address of the client corresponding to the initial message is in the trust list, so the initial message will directly reach the server.
[0102] 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 disconnect message to the normal client, thereby interrupting the connection between the target client and the protection device.
[0103] It is worth noting that after a normal client interrupts the connection 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 strategy, but directly reaches the server, reducing the resource usage of the protection device, thereby completing the normal session connection between the client and the server.
[0104] The trust list can be stored in the protection device. In addition, the effective time for the client's IP address to be added to the trust list can be set. After the client's IP address is added to the trust list for a period exceeding the corresponding effective time, the client's IP address is deleted from the trust list. In this way, the storage pressure of the protection device can be reduced.
[0105] As described above, the reverse challenge algorithm can successfully distinguish between abnormal clients and normal clients, so that the traffic initiated by the abnormal clients can be intercepted, while the normal traffic initiated by the normal clients can be processed by the server. However, in order to reduce the impact on the client, the reverse challenge algorithm only targets 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.
[0106] As shown in the above-mentioned message type, the non-initial message may be, for example, the above-mentioned message type of 0-RTT and the message type of handshake, and so on.
[0107] Among them, the number of appearances of the target session identifier in the sessions within the first preset time reaches the first preset number, and the first preset time and the first preset number can be set according to actual conditions. For example, the first preset number can be 5 times, that is, if a session identifier appears in 5 sessions within the first preset time, it is characterized as the target session identifier.
[0108] The session identifier is CID (connection ID). In the QUIC protocol, the server uses different CIDs for different sessions. The CIDs used by messages belonging to different sessions are different, and the CIDs used by messages belonging to the same session are the same. Therefore, if the same CID appears in multiple different sessions within a short period of time, it can be indicated that the CID is forged, and the corresponding message can also be determined to be an abnormal message.
[0109] Among them, the message carrying the target session identifier can be determined from the non-initial messages in the first message in the following way: 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.
[0110] The quintuple 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.
[0111] Referring to Table 1 below, Table 1 shows quintuple information of 5 messages within the first preset time and the CIDs corresponding to the messages.
[0112] Srcip Srcport Dstip Dstport Protocol CID 1.1.1.1 1234 2.2.2.2 443 UDP 4e2bc9dcc7a37 1.1.1.2 1234 2.2.2.2 443 UDP 4e2bc9dcc7a37 1.1.1.2 2455 2.2.2.2 443 UDP 4e2bc9dcc7a37 1.1.1.3 2411 2.2.2.2 443 UDP 4e2bc9dcc7a37 1.1.1.3 12345 2.2.2.2 443 UDP 4e2bc9dcc7a37
[0113] Table 1
[0114] 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 5 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 5 messages are QUIC messages of different sessions, but the CIDs corresponding to these 5 sessions are the same, which indicates that the CID is the target session identifier, and the messages carrying the CID can be determined as abnormal messages.
[0115] Through the above method, abnormal messages can be determined based on the distribution of session identifiers corresponding to the messages, and the abnormal messages can be discarded, thereby intercepting abnormal traffic; and CID is data transmitted in plain text, so the purpose of intercepting abnormal traffic can be achieved without a key.
[0116] 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: determining the message carrying the target payload from the non-initial messages in the first message; and discarding the message carrying the target payload.
[0117] The following table 2 briefly illustrates the components of the message:
[0118] IP header UDP Header QUIC long / short header QUIC Payload
[0119] Table 2
[0120] Among them, 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 the QUIC-based message may be referred to as the QUIC payload.
[0121] The target payload is a payload that appears a second preset number of times in all payloads within the second preset time. The second preset time and the second preset number can be set according to actual conditions. For example, the second preset number can be 100 times. If a payload appears 100 times in all payloads within the second preset time, the payload is characterized as the target payload. It can be understood that all payloads within the second preset time can be equivalent to all messages within the second preset time. Here, the message can be, for example, the first message.
[0122] It is worth noting that the protection system cannot decrypt the QUIC payload without the key, and thus cannot verify based on data whether the message carrying the QUIC payload is a normal message. However, since the QUIC payload is encrypted randomly, it must change 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 is forged by an abnormal client.
[0123] 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 is discarded, thereby achieving the purpose of intercepting abnormal traffic without the need for a key.
[0124] In addition, in order to reduce the amount of calculation of the protection equipment, 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 bytes and second preset bytes, and a payload that appears a second preset number of times in all payloads within the second preset time.
[0125] Reference Figure 7 , the preset bytes may be 4 bytes. If a QUIC payload with the same first 4 bytes and last 4 bytes appears a second preset number of times in all QUIC payloads within a second preset time, then the QUIC payload is the target payload.
[0126] In some embodiments, for non-initial messages with normal message formats, implementation methods related to Table 1 and Table 2 may be simultaneously used to intercept abnormal messages in forged messages with normal message formats.
[0127] Based on the same inventive concept, the embodiment of the present disclosure also provides a flow processing device, Figure 8 is a block diagram of a traffic processing device according to an exemplary embodiment of the present disclosure. Figure 8 , the device 800 comprises:
[0128] A detection module 801, which 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;
[0129] A first protection module 802, wherein the 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;
[0130] The second protection module 803 is used to intercept abnormal messages in the first message, wherein the first message is a message with a normal message format.
[0131] In some embodiments, the first protection module 802 includes:
[0132] A first determination submodule is used to determine, when it is determined that the server is attacked by a distributed denial of service DDoS, that the message header in the incoming traffic is a second message of a short header data packet;
[0133] A second determining submodule, configured 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;
[0134] The third determination submodule is 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.
[0135] In some embodiments, the first protection module 802 includes:
[0136] A fourth determination submodule is used to determine, when it is determined that the server is attacked by a distributed denial of service DDoS, a third message whose message header in the incoming traffic is a long header data packet;
[0137] The fifth determination submodule is 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.
[0138] In some embodiments, the first protection module 802 further includes:
[0139] a sixth determination submodule, configured 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, the initial message being used to initiate a target client request of the initial message to establish a connection;
[0140] The seventh determination submodule is 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.
[0141] In some embodiments, the first protection module 802 further includes:
[0142] an eighth determination submodule, configured 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;
[0143] The ninth determination submodule is 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.
[0144] In some embodiments, the second protection module 803 includes:
[0145] A first acquisition submodule, used to acquire a message type of a first message for a first message;
[0146] The first interception submodule is used to intercept abnormal messages in the first message according to a protection strategy corresponding to the message type of the first message.
[0147] In some embodiments, the first interception submodule is used to:
[0148] 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 user instructs 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;
[0149] receiving an initial message resent by the target client, and verifying whether the initial message resent by the target client carries the random character;
[0150] 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 normal message format.
[0151] In some embodiments, the apparatus 800 further includes:
[0152] A sending module is used to add the target client to a trust list and send a connection interruption message to the target client when the initial message resent by the target client carries the random characters, 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.
[0153] In some embodiments, the second protection module 803 further includes:
[0154] a tenth determination submodule, configured to determine 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 the first preset time a first preset number of times;
[0155] The second interception submodule is used to discard the message carrying the target session identifier.
[0156] In some embodiments, the second protection module 803 further includes:
[0157] An eleventh determination submodule, configured to determine a message carrying a target payload from the 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;
[0158] The third interception submodule is used to discard the message carrying the target payload.
[0159] In some embodiments, the target payload is a payload whose first preset byte and second preset byte are identical, and which appears a second preset number of times in all payloads within a second preset time.
[0160] Among them, 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.
[0161] Based on the same inventive concept, an embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the above method are implemented.
[0162] Based on the same inventive concept, an embodiment of the present disclosure provides an electronic device, including:
[0163] a storage device having a computer program stored thereon;
[0164] A processing device is used to execute the computer program in the storage device to implement the steps of the above method.
[0165] Reference below Fig. 9 , which shows a schematic diagram of the structure of an electronic device (such as the above-mentioned protection device, server or client) 900 suitable for implementing the 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, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0166] like Fig. 9 As shown, 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. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. 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.
[0167] Typically, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touch pad, 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 Fig. 9 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0168] 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 contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a 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 executed.
[0169] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit 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 of the above.
[0170] In some embodiments, the electronic device can communicate using any currently known or future 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 future developed network.
[0171] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0172] The computer-readable medium carries one or more programs. When the 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.
[0173] 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a 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., via the Internet using an Internet service provider).
[0174] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0175] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.
[0176] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, 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 chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0177] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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.
[0178] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. 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 a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0179] 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 are 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.
[0180] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A traffic processing method, characterized in that: Performed by protective equipment, including: 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 attacked by a distributed denial of service DDoS, 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; An abnormal message in a first message is intercepted, wherein the first message is a message with a normal message format.
2. The method according to claim 1, characterized in that 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; 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 method according to claim 1, characterized in that 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 third message of a long header data packet; 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 method according to claim 3, characterized in that 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 method according to claim 4, characterized in that 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 method according to any one of claims 1 to 5, characterized in that: Intercepting the abnormal message in the first message includes: For a first message, obtaining a message type of the first message; According to a protection strategy corresponding to the message type of the first message, abnormal messages in the first message are intercepted.
7. The method according to claim 6, characterized in that 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 user instructs 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; receiving an initial message resent by the target client, and verifying whether the initial message resent by the target client carries the random character; 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 normal message format.
8. The method according to claim 7, characterized in that The method further comprises: 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, characterized in that 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 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 first preset number of times; The message carrying the target session identifier is discarded.
10. The method according to claim 6, characterized in that 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; The message carrying the target payload is discarded.
11. The method according to claim 10, characterized in that 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.
12. A flow processing device, characterized in that: include: A detection module, the 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, wherein the first protection module is used to determine whether a message format of a 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 messages with abnormal message formats, 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.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 11 are implemented.
14. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Method and device for identifying attack
CN102882894A
Method and network equipment for obtaining fingerprint characteristics of network attack messages
CN107404459A
Message processing method and device
CN110138797A
Message sending end identification method and device and computer readable storage medium
CN111147524A
Message processing method, device and equipment and computer readable storage medium
CN112751815A
Cited By
Traffic processing method and apparatus, and medium and electronic device
EP4557669A1
