Reflection attack protection method, system, medium and electronic device
By mirroring and self-learning the server incoming traffic, analyzing and protecting TCP reflection attacks, the TCP reflection attack protection problem in the existing technology is solved, efficient and automatic adjustment of protection strategies is achieved, and the risk of manslaughter and operation and maintenance costs are reduced.
Patent Information
- Application Number
- CN202211679580.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-12-26
AI Technical Summary
The existing technology is difficult to effectively protect against TCP reflective attacks. Traditional protection solutions have high operation and maintenance costs, high risk of manslaughter, low protection efficiency, and cannot meet the protection needs of network sensitive services.
By mirroring the incoming traffic flowing into the server, the baseline data of the destination IP is obtained by self-learning, analyzing whether it is subject to TCP reflection attacks, and real-time protection is carried out based on the baseline data, dynamically adjusting the protection strategy, reducing the risk of manslaughter, and improving the protection effect.
It realizes automatic, real-time and dynamic protection strategy adjustments, reduces the risk of manslaughter, improves the protection effect, avoids server paralysis, and ensures business stability. There is no need for manual analysis and configuration of protection strategies, reduces operation and maintenance costs, and no additional requirements. Deploy the proxy IP.
Smart Images

Figure CN115987651B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a reflection attack protection method, system, medium and electronic device. Background Art
[0002] Reflection attack means that the attacker controls the botnet to forge the IP of the victim and send a request message to the server that has opened a specific service in the public network, so that the server will respond to the victim with a response message that is several times larger than the request message, so that the victim receives a large amount of junk traffic, and finally realizes the reflection amplification attack on the victim. Therefore, there is an urgent need for a reflection attack protection method with high protection efficiency and good protection effect. Summary of the invention
[0003] 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.
[0004] In a first aspect, the present disclosure provides a reflection attack protection method, comprising: mirroring the incoming traffic flowing into the server to obtain mirror traffic; self-learning the mirror traffic, taking the destination IP as the statistical object, and counting the source ports with business traffic in the source ports of each of the destination IPs as the baseline data corresponding to the destination IP; analyzing the mirror traffic to detect whether the destination IP is subject to a TCP reflection attack; if it is detected that the destination IP is subject to the TCP reflection attack, reflection attack protection is performed based on the baseline data corresponding to the destination IP.
[0005] In a second aspect, the present disclosure provides a reflection attack protection system, comprising: a mirroring module, for mirroring the incoming traffic flowing into the server to obtain mirrored traffic; a protection module, for self-learning the mirrored traffic, taking the destination IP as the statistical object, counting the source ports of each of the source ports of the destination IP that have business traffic as the baseline data corresponding to the destination IP, analyzing the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack, and if it is detected that the destination IP is subject to the TCP reflection attack, performing reflection attack protection based on the baseline data corresponding to the destination IP.
[0006] 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 steps of any one of the methods described in the first aspect of the present disclosure.
[0007] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in the first aspect of the present disclosure.
[0008] By adopting the above technical solution, when a TCP reflection attack is detected, TCP reflection attack protection is performed based on the baseline data obtained by self-learning the mirror traffic. This means that through self-learning, the baseline data can change dynamically in real time as the mirror traffic changes. Therefore, automatic, real-time and dynamic adjustment of the protection strategy is achieved, which reduces the risk of false positives, improves the protection effect, avoids the server from being paralyzed due to attacks and ensures business stability. There is no need for manual analysis and configuration of protection strategies, thereby improving protection efficiency, no need for manual maintenance and adjustment of protection strategies, thereby reducing operation and maintenance costs, and no need to deploy additional proxy IPs, thereby improving scenario applicability.
[0009] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] 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:
[0011] Figure 1 A schematic diagram showing the TCP reflection attack process.
[0012] Figure 2 A schematic diagram showing a TCP reflection attack based on a middlebox.
[0013] Figure 3 A schematic diagram showing a scenario in which a proxy IP is deployed in front of a server.
[0014] Figure 4 The present invention is a flowchart of a reflection attack protection method according to an embodiment of the present invention.
[0015] Figure 5 The present invention is a flowchart of performing self-learning on mirrored traffic to determine baseline data according to an embodiment of the present disclosure.
[0016] Figure 6 This is another flowchart of performing self-learning on mirrored traffic to determine baseline data according to an embodiment of the present disclosure.
[0017] Figure 7 It is a flowchart of reflection attack protection based on baseline data according to an embodiment of the present disclosure.
[0018] Figure 8 It is a schematic block diagram of a reflection attack protection system according to an embodiment of the present disclosure.
[0019] Fig. 9 It is another schematic block diagram of a reflection attack protection system according to an embodiment of the present disclosure.
[0020] Fig.10 It is a flow chart of traffic self-learning of a reflection attack protection system according to an embodiment of the present disclosure.
[0021] Fig.11 It is a protection flow diagram of the reflection attack protection system according to an embodiment of the present disclosure.
[0022] Fig.12 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0023] 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.
[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] 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.
[0026] 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.
[0027] 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".
[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 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.
[0030] 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.
[0031] 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.
[0032] 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.
[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) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0034] A distributed denial of service (DDoS) attack refers to an attack method in which hackers control botnets distributed throughout the Internet to launch a large number of malicious requests to the target server, causing the target server to be unable to respond to normal business requests and resulting in a denial of service.
[0035] Among the various types of DDoS attacks, reflective DDoS attacks are the most common. The principle is that the attacker controls a botnet to forge the victim's IP address and send a request message to a server that has opened a specific service on the public network. This causes the server to send a response message that is several times larger than the request message to the victim, causing the victim to receive a large amount of junk traffic, ultimately achieving a reflective amplification attack on the victim.
[0036] A specific service that is used as a reflection amplification attack is a service based on the User Datagram Protocol (UDP), such as Domain Name Server (DNS), Network Terminal Protocol (NTP), Simple Service Discovery Protocol (SSDP), Memcached, etc.
[0037] Another type of reflection attack is the reflection attack based on the Transmission Control Protocol (TCP). Figure 1 Figure 1 shows a schematic diagram of the TCP reflection attack process. Figure 1 As shown, attacker 1 controls botnet 2 to forge the IP of victim 4 through IP address spoofing, and initiates a connection request (i.e., syn message) to TCP server 3 on the public network; after receiving the connection request, TCP server 3 returns a syn / ack reply message to victim 4, causing victim 4 to receive a large number of syn / ack reply messages that do not belong to its own connection process, and eventually causing victim 4's bandwidth, CPU and other resources to be exhausted, thereby denying service.
[0038] Compared with traditional UDP reflection attacks, the attack traffic of TCP reflection attacks strictly follows the specifications of the TCP / IP protocol stack (that is, there is protocol stack behavior). Therefore, the difficulty of defending against TCP reflection attacks is much greater than that of defending against traditional UDP reflection attacks. The main characteristics of TCP reflection attacks are:
[0039] (1) By using TCP reflection attacks, attackers can turn attack traffic into real IP attacks (that is, from the perspective of the attacked, the attack traffic all comes from real TCP servers, and the source IP is real). This makes it difficult for traditional reverse challenge protection technology to effectively protect against TCP reflection attacks.
[0040] (2) The reflected SYN / ACK response message has protocol stack behavior, which makes it more difficult to identify and protect, and the attack traffic is more likely to be transparent. Transparent transmission means that the attack traffic bypasses the protection strategy of the protection system and directly reaches the attacked person.
[0041] (3) TCP reflection attacks use public network servers to launch attacks. The attack traffic is closer to business traffic and is more concealed when mixed with other TCP attacks.
[0042] Therefore, compared with traditional TCP attack methods with forged sources, TCP reflection attacks are more concealed and more difficult to defend against.
[0043] Figure 2 Figure 1 shows a schematic diagram of a TCP reflection attack based on a middlebox. Figure 2 As shown, attacker 1 controls botnet 2 to forge the IP of victim 4 and send syn and unregistered domain name request to TCP server 3; since middlebox 5 does not verify the TCP bidirectional session, it is deceived by attacker 1 and sends unregistered domain name interception; during the interception, a response message containing a blocking page is returned to victim 4, thereby ultimately amplifying the attack traffic. Figure 2 The reflection attack shown in the figure exploits the vulnerability that some middleboxes (usually the filing system) do not or cannot strictly follow the TCP protocol stack, and carefully constructs a specific request to trigger the middlebox 5 to return an interception page to the victim 4. Since the interception page is often larger than the request itself, the attack traffic is ultimately amplified.
[0044] The current protection solutions for TCP reflection attacks mainly include: manually blocking specific TCP source ports, limiting or blocking syn / ack message rates, and hard resistance based on proxy IP. The principles of these protection solutions are as follows:
[0045] (1) Manually block specific TCP source ports
[0046] Since the source ports of TCP servers currently used for reflection attacks on the Internet are fixed (usually 80 / 443 / 22 / 21 / 3389 and other commonly used TCP service ports), and reflection attacks cannot forge or modify these source ports, when a TCP reflection attack occurs, if it is confirmed that the server does not access these ports externally, you can manually block specific TCP source ports to prevent TCP reflection attacks.
[0047] (2) syn / ack message rate limit or ban
[0048] TCP reflection attacks are implemented through the syn / ack messages responded by the TCP server, so when protecting against them, you can limit the rate of syn / ack messages to mitigate the attack. Alternatively, if it is confirmed that the attacked server will not actively initiate a TCP connection to the outside world (that is, the attacked server will not normally have syn / ack messages), then you can manually block syn / ack messages to achieve TCP reflection attack protection.
[0049] (3) Hard resistance based on proxy IP
[0050] Some servers will deploy proxy IP (reverse proxy) in front of them, such as Figure 3 As shown. In the scenario where the proxy IP is deployed, client 6 needs to establish a TCP connection with proxy IP 7 first. After the TCP connection is established, proxy IP 7 then establishes a TCP connection with server 8 and forwards the request of client 6 to server 8. However, the attack traffic of TCP reflection attack does not establish a TCP connection with the destination IP (that is, server 8), so proxy IP 7 will directly discard these attack messages without TCP connection, and the attack traffic will not be transparently transmitted to the backend server 8.
[0051] These TCP reflection attack protection solutions have the following disadvantages:
[0052] (1) Disadvantages of manually blocking specific TCP source ports
[0053] Manually directly blocking specific TCP source ports can protect against TCP reflection attack traffic, but its policy operation and maintenance costs are very high. If the business of the protected destination IP changes, it is necessary to evaluate and adjust the policy in a timely manner, otherwise there is a risk of false positives. For example, the protected destination IP did not have inbound traffic from TCP source port 80 before, so TCP source port 80 was blocked for TCP reflection attack protection. However, if the business changes one day and inbound traffic from TCP source port 80 is required, normal business will be mistakenly killed. Moreover, the evaluation and deployment of this policy requires manual participation, and the protection efficiency is too low. Therefore, factors such as high operation and maintenance costs and low efficiency are obvious disadvantages of this protection solution.
[0054] (2) Disadvantages of limiting or blocking syn / ack messages
[0055] Although TCP reflection attacks can be protected to a certain extent by blocking or limiting the speed of syn / ack messages, there are still problems such as high operation and maintenance costs, high risk of false positives, and low protection efficiency. It cannot meet the protection needs of services, especially those that are sensitive to the network.
[0056] (3) Disadvantages of hard resistance based on proxy IP
[0057] Although proxy IP can intercept TCP reflection attack traffic and there is no risk of false positives, (a) not all servers will deploy proxy IPs because proxy IPs have disadvantages such as single point failure, network delay, and high cost. Only some specific and large businesses will use proxy IPs, while most business servers will actively provide external services. (b) Proxy IP itself is not a professional anti-attack device and its performance is limited. If it is attacked by TCP reflection and the attack traffic is large, it is likely to paralyze the proxy IP and ultimately damage the business. Therefore, protection against TCP reflection attacks cannot rely solely on proxy IPs, but requires professional anti-attack equipment and protection algorithms.
[0058] Figure 4 FIG. 1 is a flow chart of a reflection attack protection method according to an embodiment of the present disclosure. Figure 4 As shown, the reflection attack protection method includes the following steps S41 to S44.
[0059] In step S41, the inbound traffic flowing into the server is mirrored to obtain mirrored traffic.
[0060] Inbound traffic refers to the traffic flowing into the server that provides services to the outside world. The server that provides services to the outside world usually communicates with the Internet Service Provider (ISP) network through the ingress switch, which carries the traffic within the entire server and the traffic accessed by the Internet.
[0061] In some embodiments, an optical splitter may be deployed between the ISP network and the ingress switch, and the incoming traffic may be mirrored through the optical splitter.
[0062] In step S42, self-learning is performed on the mirrored traffic, and the destination IP is used as the statistical object. The source ports of each destination IP that have service traffic are counted as baseline data corresponding to the destination IP.
[0063] In this disclosure, the destination IP refers to an IP that provides services externally and may be subject to TCP reflection attacks.
[0064] In step S43, the mirrored traffic is analyzed to detect whether the destination IP is subject to a TCP reflection attack.
[0065] In step S44, if it is detected that the destination IP is subject to a TCP reflection attack, reflection attack protection is performed based on the baseline data corresponding to the destination IP.
[0066] By adopting the above technical solution, when a TCP reflection attack is detected, TCP reflection attack protection is performed based on the baseline data obtained by self-learning the mirror traffic. This means that through self-learning, the baseline data can change dynamically in real time as the mirror traffic changes. Therefore, automatic, real-time and dynamic adjustment of the protection strategy is achieved, which reduces the risk of false positives, improves the protection effect, avoids the server from being paralyzed due to attacks and ensures business stability. There is no need for manual analysis and configuration of protection strategies, thereby improving protection efficiency, no need for manual maintenance and adjustment of protection strategies, thereby reducing operation and maintenance costs, and no need for additional deployment of proxy IPs, thereby improving scenario applicability.
[0067] In some embodiments, the analysis of the mirrored traffic in step S43 to detect whether the destination IP is subject to a TCP reflection attack can be implemented in the following manner.
[0068] First, the destination IP is used as the statistical object, and the total amount of hit traffic related to the destination IP that matches and hits the preset reflection port list is counted. The preset reflection port list is used to maintain the TCP reflection port used by the attack. For example, the source port to which the mirrored traffic is to flow (that is, the destination port of the mirrored traffic) can be matched with the preset reflection port list, and the total traffic of all hit source ports that hit the preset reflection port list for each destination IP is counted to obtain the total amount of hit traffic. Then, when the total amount of hit traffic is greater than the first threshold, it is determined that the destination IP is subject to a TCP reflection attack.
[0069] The preset reflection port list can be obtained in the following manner: extracting ports commonly used by hackers for TCP reflection attacks based on TCP reflection attack cases, and adding the extracted ports to the list to form a preset reflection port list. Ports commonly used by hackers for TCP reflection attacks include but are not limited to: 21, 22, 23, 80, 443, 8080, 3389, 81, 1900, 8443, 8880, etc. By extracting ports commonly used by hackers for TCP reflection attacks from reflection attack cases, the performance and protection effect of the reflection attack protection method according to the embodiment of the present disclosure can be improved.
[0070] The first threshold value may be manually configured or determined by self-learning. For example, the inbound traffic of the source port used as the TCP reflection attack when the destination IP is attacked by TCP reflection may be self-learned to determine the appropriate size of the first threshold value according to the self-learning result.
[0071] For example, assuming that hitting the source ports includes hitting source port 1, hitting source port 2, hitting source port 3, hitting source port 4, and hitting source port 5, where hitting source port 1, hitting source port 2, and hitting source port 3 belong to the first destination IP, and hitting source port 4 and hitting source port 5 belong to the second destination IP, then: the inbound traffic hitting source port 1, the inbound traffic hitting source port 2, and the inbound traffic hitting source port 3 can be added together. If the total amount of hit traffic obtained by adding together exceeds the first threshold, it is determined that the first destination IP is subject to a TCP reflection attack; similarly, the inbound traffic hitting source port 4 and the inbound traffic hitting source port 5 can be added together. If the total amount of hit traffic obtained by adding together exceeds the first threshold, it is determined that the second destination IP is subject to a TCP reflection attack.
[0072] In the absence of a TCP reflection attack, the total amount of hit traffic of all source ports of the destination IP usually does not change much. However, if the total amount of hit traffic of all source ports of the destination IP exceeds the first threshold, it means that the destination IP may have suffered a TCP reflection attack.
[0073] In some embodiments, the analysis of the mirrored traffic in step S43 to detect whether the destination IP is subject to a TCP reflection attack may also be implemented in the following manner.
[0074] First, the destination IP is used as the statistical object, and the total amount of hit traffic related to the destination IP that matches and hits the preset reflection port list is counted. The preset reflection port list is used to maintain the TCP reflection port used by the attack. This has been described in detail in the previous text and will not be repeated here. Then, the flow ratio of the inbound flow and the outbound flow related to the destination IP is counted. Then, when the total amount of hit traffic is greater than the first threshold and the flow ratio is greater than the second threshold, it is determined that the destination IP is subjected to a TCP reflection attack, wherein the second threshold is greater than 1.
[0075] The inbound traffic related to the destination IP refers to the sum of the inbound traffic of all source ports on the destination IP (including source ports that hit and source ports that do not hit). The outbound traffic related to the destination IP refers to the sum of the outbound traffic of all source ports on the destination IP (including source ports that hit and source ports that do not hit).
[0076] The second threshold may be a positive number greater than 1, for example, 2 or other values.
[0077] The purpose of adding the condition "the ratio of the inbound traffic to the outbound traffic related to the destination IP is greater than the second threshold" is to reduce the risk of false positives, because in the case of TCP reflection attacks, the destination IP (that is, the attacked) will not respond, so the public network inbound traffic will be larger than the outbound traffic. In the case of normal business traffic, since the destination IP will interact with the client, the difference between the public network inbound traffic and the outbound traffic will not be too large.
[0078] By adopting the above technical solution, it is possible to effectively detect whether the destination IP is subject to a TCP reflection attack.
[0079] Figure 5 FIG. 1 is a flow chart of self-learning mirrored traffic to determine baseline data according to an embodiment of the present disclosure. Figure 5 As shown, the self-learning process includes steps S51 to S54.
[0080] In step S51, the mirrored traffic is filtered to obtain target mirrored traffic belonging to a preset reflection port list, where the preset reflection port list is used to maintain TCP reflection ports used in attacks.
[0081] For example, by matching the source port to which the mirrored traffic is to flow with the preset reflector port list, the traffic of the source port that does not belong to the preset reflector port list in the mirrored traffic can be filtered out, and the target mirrored traffic of the source port that belongs to the preset reflector port list can be obtained. The preset reflector port list has been described in detail in the previous text and will not be repeated here.
[0082] In step S52, data decontamination processing is performed on the target mirrored traffic to obtain target pure mirrored traffic, and the data decontamination processing is used to remove traffic related to network attack alarms from the target mirrored traffic.
[0083] In some embodiments, the traffic that hits the source port in the second period before and after the destination IP to which the source port belongs is attacked by the network can be removed from the target mirror traffic to achieve data decontamination processing and obtain the target pure mirror traffic.
[0084] The second time period can be set based on experience or obtained through self-learning. For example, the inbound traffic before and after the target IP is attacked by the network is self-learned to determine the approximate time period of the inbound traffic before and after the target IP is attacked by the network as attack traffic, so that the appropriate value of the second time period can be determined based on the self-learning result. For example, the second time period can be one hour or other values.
[0085] Taking the second period of 1 hour as an example, in this step, the traffic within 1 hour before the destination IP is attacked by the network and within 1 hour after the destination IP is attacked by the network is deleted.
[0086] By eliminating the traffic in the second period before and after the network attack, possible attack traffic can be eliminated, ensuring the accuracy of the baseline data determined subsequently, because the baseline data actually studies normal business traffic, not attack traffic.
[0087] In step S53, the source port of the destination IP is taken as the statistical object, and the pure traffic of each source port of the destination IP within the first time period is counted based on the target pure mirror traffic.
[0088] In some embodiments, based on the target pure mirror traffic, the pure traffic of each source port hitting the destination IP in the most recent first time period can be counted every second time period. The second time period can be set according to actual conditions, for example, it can be 1 hour or other values. The first time period can also be set according to actual conditions, for example, it can be 24 hours or other values. The pure traffic in the most recent first time period can be reflected in the form of the number of data records.
[0089] Taking the second time period of 1 hour and the first time period of 24 hours as an example, in this step, the number of data records of each source port hit in the last 24 hours from the current statistical time can be counted every 1 hour. For example, if in the last 24 hours, data record 1 records the pure flow of destination IP 1 hitting source port 1, and data record 2 records the pure flow of destination IP 1 hitting source port 1, it is considered that there are 2 data records of destination IP 1 hitting source port 1 in the last 24 hours.
[0090] The above data records can be obtained in the following manner.
[0091] Taking the first time period as the granularity, the number of packets of each destination IP that hits the source port of the preset reflection port list in each first time period is counted to obtain data records about each hit source port. By only counting the data records of the hit source port, the amount of statistics can be greatly reduced. The first time period can be set as needed, for example, it can be one minute, five minutes or other values.
[0092] For example, suppose that: the first time period is one minute; the destination IP includes the first destination IP and the second destination IP, wherein the first destination IP has two source ports that hit the preset reflection port list, namely, hit source port 1 and hit source port 2, and the second destination IP has no source port that hits the preset reflection port list; and there is traffic with timestamps from 12:01 to 12:03 in the target pure mirror traffic. Then, according to the number of packets that hit source port 1 and hit source port 2 respectively within the minute from 12:01 to 12:02, one data record of hitting source port 1 and one data record of hitting source port 2 can be obtained, and according to the number of packets that hit source port 1 and hit source port 2 respectively within the minute from 12:02 to 12:03, another data record of hitting source port 1 and another data record of hitting source port 2 can be obtained.
[0093] An example of a data record that hits a source port is shown in Table 1.
[0094]
[0095] Table 1 Data records of hitting source ports
[0096] In step S54, the destination IP is taken as the statistical object, and the source port whose pure traffic reaches the preset traffic threshold is counted as the baseline data corresponding to the destination IP. If the pure traffic of a certain hit source port reaches the preset traffic threshold within the first time period, it means that the corresponding hit source port has normal business traffic, and in this case, the corresponding hit source port can be recorded in the baseline data. Otherwise, if the pure traffic of a certain hit source port is lower than the preset traffic threshold within the first time period, it means that the corresponding hit source port does not have normal business traffic, and in this case, the corresponding hit source port will not be recorded in the baseline data.
[0097] Still taking the traffic in the first time period in the form of the number of data records as an example for explanation. If the number of data records that hit a source port reaches a preset number, the hit source port is added to the baseline data. The preset number can be set based on experience or determined by self-learning. For example, the preset number can be 3 or other values.
[0098] Table 2 shows an example of baseline data. That is, the baseline data is based on the destination IP and summarizes all hit source ports for each destination IP. Since in step S53, the data records of the hit source port in the most recent first time period are counted every second time period, the baseline data will be fully updated every second time period.
[0099]
[0100] Table 2 Baseline data
[0101] By adopting the above technical solution, it is possible to determine the source port with normal business traffic in the destination IP through self-learning of inbound traffic, and then generate corresponding baseline data for each destination IP, thereby providing a data cleaning basis for subsequent TCP reflection attack protection.
[0102] Figure 6 FIG. 2 is another flow chart of self-learning of mirrored traffic according to an embodiment of the present disclosure. Figure 6 As shown, in Figure 5 On the basis of, before step S52, that is, performing data de-noising processing on the target mirror traffic to obtain the target pure mirror traffic, the self-learning process according to the embodiment of the present disclosure also includes step S52a: performing data denoising processing on the target mirror traffic, wherein the data denoising processing is used to remove data records whose number of messages per minute is less than a third threshold from the target mirror traffic.
[0103] The method of obtaining data records is similar to that described above and will not be repeated here.
[0104] The third threshold is determined according to non-business behavior, for example, it can be set to 100. Non-business behavior refers to behavior other than business behavior, such as scanning, etc. Business behavior refers to the behavior of providing services to the outside. For example, the behavior of a game server providing game services to the outside is a business behavior, and the behavior of a website providing website access to the outside is also a business behavior. In short, business behavior is the behavior of a client accessing a server to communicate data to complete business interaction.
[0105] By eliminating data records with a number of messages per minute less than the third threshold, it is possible to avoid interference of non-business traffic data with subsequent self-learning processes.
[0106] Figure 7 FIG. 1 is a flow chart of TCP reflection attack protection based on baseline data according to an embodiment of the present disclosure. Figure 7 As shown, the process of performing TCP reflection attack protection based on baseline data includes steps S441 to S442.
[0107] In step S441, when it is detected that the destination IP is subjected to a TCP reflection attack, a protection instruction is initiated, and the protection instruction is used to instruct to start protection for the destination IP.
[0108] In step S442, in response to the protection instruction, according to the destination IP indicated in the protection instruction, the baseline data corresponding to the destination IP is searched, and based on the baseline data corresponding to the destination IP, the incoming traffic of the destination IP is checked, and the traffic in the incoming traffic of the destination IP that hits the preset reflection port list but does not hit the source port of the baseline data is intercepted. The preset reflection port list is used to maintain the TCP reflection ports exploited by the attack.
[0109] In some embodiments, when checking the incoming traffic of the destination IP, the incoming traffic can be first pulled from the ingress switch, and then the pulled incoming traffic is checked.
[0110] In some embodiments, the traction of inbound traffic can be achieved in the following manner. That is, the protection system using the TCP reflection attack protection method according to the embodiment of the present disclosure can establish a Border Gateway Protocol (BGP) neighbor with the ingress switch in advance. When it is necessary to start TCP reflection attack protection for a certain destination IP, the protection system can traction the inbound traffic from the ingress switch. There are various ways of traction. One of the traction methods may include: the protection system sends a 32-bit route of the destination IP for which TCP reflection attack protection needs to be started to the ingress switch. After the ingress switch receives the 32-bit route, it will forward the inbound traffic corresponding to the destination IP to the protection system based on the longest mask match, thereby achieving the traction of the inbound traffic.
[0111] Next, an example is given to describe "intercepting the traffic of the source port of the destination IP that hits the preset reflection port list but does not hit the baseline data in the incoming traffic". Assume that the source ports of the first destination IP that needs to start TCP reflection attack protection include source port 1, source port 2, and source port 3, among which source port 1 hits both the preset reflection port list and the baseline data, source port 2 hits the preset reflection port list but does not hit the baseline data, and source port 3 hits neither the preset reflection port list nor the baseline data. This means that the service traffic of source port 1 and source port 3 is normal service traffic, and the service traffic of source port 2 is attack traffic. Therefore, the incoming traffic of source port 2 is cleaned (for example, intercepted). In this way, the attack traffic can be intercepted without affecting the normal service traffic.
[0112] That is, "hitting the preset reflection port list" indicates that the source port is likely to be attacked by TCP reflection, and "not hitting the baseline data" indicates that the source port itself is not the port used by the business traffic, which further confirms that the source port is attacked by TCP reflection.
[0113] In addition, after intercepting the attack traffic, the unintercepted traffic can be injected back to the ingress switch, so that the ingress switch can transmit the injected ingress traffic to the corresponding destination.
[0114] By adopting the above technical solution, the attack traffic can be effectively cleaned and the normal traffic is not affected by the cleaning operation, thereby effectively realizing TCP reflection attack protection.
[0115] In some embodiments, the method according to the embodiment of the present disclosure may further include: when it is detected that the destination IP is no longer subject to a TCP reflection attack, the interception action is automatically stopped. That is, if no TCP reflection attack is detected, there is no need to perform TCP reflection attack protection based on baseline data, that is, the TCP reflection attack protection operation is automatically stopped.
[0116] Figure 8 FIG. 1 is a schematic block diagram of a reflection attack protection system according to an embodiment of the present disclosure. Figure 8 As shown, the reflection attack protection system includes: a mirroring module 81, which is used to mirror the incoming traffic flowing into the server to obtain mirrored traffic; a protection module 82, which is used to self-learn the mirrored traffic, take the destination IP as the statistical object, count the source ports of each destination IP with business traffic as the baseline data corresponding to the destination IP, and analyze the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack. If it is detected that the destination IP is subject to a TCP reflection attack, reflection attack protection is performed based on the baseline data corresponding to the destination IP.
[0117] By adopting the above technical solution, when a TCP reflection attack is detected, TCP reflection attack protection is performed based on the baseline data obtained by self-learning the mirror traffic. This means that through self-learning, the baseline data can change dynamically in real time as the mirror traffic changes. Therefore, automatic, real-time and dynamic adjustment of the protection strategy is achieved, which reduces the risk of false positives, improves the protection effect, avoids the server from being paralyzed due to attacks and ensures business stability. There is no need for manual analysis and configuration of protection strategies, thereby improving protection efficiency, no need for manual maintenance and adjustment of protection strategies, thereby reducing operation and maintenance costs, and no need to deploy additional proxy IPs, thereby improving scenario applicability.
[0118] In some embodiments, the protection module 82 performs self-learning on the mirrored traffic, takes the destination IP as the statistical object, and counts the source ports of each destination IP that have business traffic as the baseline data corresponding to the destination IP, including: filtering the mirrored traffic to obtain the target mirrored traffic belonging to the preset reflection port list, the preset reflection port list is used to maintain the TCP reflected ports used by the attack; performing data de-dirty processing on the target mirrored traffic to obtain the target pure mirrored traffic, the data de-dirty processing is used to remove the traffic related to the network attack alarm from the target mirrored traffic; taking the source port of the destination IP as the statistical object, based on the target pure mirrored traffic, counting the pure traffic of each source port of the destination IP within a first time period; taking the destination IP as the statistical object, counting the source ports of the destination IP whose pure traffic within the first time period reaches a preset traffic threshold as the baseline data corresponding to the destination IP.
[0119] In some embodiments, the protection module 82 analyzes the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack, including: taking the destination IP as the statistical object, counting the total amount of hit traffic related to the destination IP that matches and hits a preset reflection port list, the preset reflection port list is used to maintain the TCP reflection ports exploited by the attack; counting the traffic ratio of the inbound traffic and outbound traffic related to the destination IP; when the total amount of hit traffic is greater than a first threshold and the traffic ratio is greater than a second threshold, it is determined that the destination IP is subject to a TCP reflection attack, wherein the second threshold is greater than 1.
[0120] In some embodiments, the protection module 82 analyzes the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack, including: taking the destination IP as the statistical object, counting the total amount of hit traffic related to the destination IP that matches and hits a preset reflection port list, the preset reflection port list is used to maintain the TCP reflection ports exploited by the attack; when the total amount of hit traffic is greater than a first threshold, it is determined that the destination IP is subject to a TCP reflection attack.
[0121] In some embodiments, if the protection module 82 detects that the destination IP is subject to a TCP reflection attack, it performs reflection attack protection based on the baseline data corresponding to the destination IP, including: when it is detected that the destination IP is subject to a TCP reflection attack, initiating a protection instruction, the protection instruction is used to instruct to start protection for the destination IP; in response to the protection instruction, according to the destination IP indicated in the protection instruction, searching for the baseline data corresponding to the destination IP, based on the baseline data corresponding to the destination IP, checking the incoming traffic of the destination IP, intercepting the traffic of the incoming traffic of the destination IP that hits the preset reflection port list but does not hit the source port of the baseline data, the preset reflection port list is used to maintain the TCP reflection ports exploited by the attack.
[0122] In some embodiments, the protection module 82 is also used to automatically stop the interception action when it is detected that the destination IP is no longer subject to TCP reflection attacks.
[0123] In some embodiments, the protection module 82 is further used to: perform data denoising on the target mirror traffic before performing data denoising on the target mirror traffic to obtain the target pure mirror traffic, wherein the data denoising is used to remove data records whose number of messages per minute is less than a third threshold from the target mirror traffic.
[0124] Fig. 9 8 is another schematic block diagram of a reflection attack protection system according to an embodiment of the present disclosure. In the schematic block diagram, the mirror module 81 is implemented by an optical splitter, and the protection module 82 includes a detection subsystem 821, a control center 822 and a protection subsystem 823. Fig. 9 The ISP network 91, ingress switch 92, access switch 93 and destination IP 94 are components in the existing network architecture.
[0125] The optical splitter 81 is deployed between the ISP network 91 and the ingress switch 92. The optical splitter 81 copies the incoming traffic to obtain the mirrored traffic, and forwards the mirrored traffic to the detection subsystem 821, so as to perform subsequent TCP reflection attack detection and traffic self-learning.
[0126] The detection subsystem 821 collects data on the mirrored traffic in real time (for example, the operation described in the aforementioned step S51) and performs data denoising (for example, the operation described in the aforementioned step S52a) and then reports the data to the control center 822 to complete the traffic data collection.
[0127] The detection subsystem 821 will also detect TCP reflection attack behavior (for example, the operation of detecting TCP reflection attack described above). If a TCP reflection attack is detected, the detection result (for example, alarm information) will be reported to the control center 822 in real time.
[0128] After receiving the flow data reported by the detection subsystem 821, the control center 822 performs data decryption processing on the flow data (for example, the operation described in the aforementioned step S52) and calculates and generates baseline data (for example, the operations described in the aforementioned steps S53 and S54).
[0129] After receiving the TCP reflection attack alarm, the control center 822 sends a protection instruction to the protection subsystem 823 to protect the destination IP attacked by the TCP reflection attack, and at the same time sends the baseline data related to the destination IP attacked by the TCP reflection attack to the protection subsystem 823.
[0130] After receiving the protection instruction, the protection subsystem 823 performs traffic cleaning on the destination IP attacked by TCP reflection according to the baseline data, and dynamically adjusts the cleaning strategy based on the baseline data to achieve the best protection effect. The cleaned traffic will reach each destination IP 94 via the access switch 93.
[0131] Fig.10 It is a flow chart of traffic self-learning of a reflection attack protection system according to an embodiment of the present disclosure.
[0132] like Fig.10 As shown, the optical splitter 81 transmits the mirrored traffic to the detection subsystem 821. After receiving the mirrored traffic, the detection subsystem 821 filters the data of the public network inbound traffic (i.e., the mirrored traffic) to obtain the target mirrored traffic belonging to the preset reflection port list, that is, the source port to which the mirrored traffic is to flow is matched with the preset reflection port list, so as to only statistically analyze the traffic that hits the source port in the preset reflection port list. This has been described in detail in the previous text and will not be repeated here.
[0133] Then, the detection subsystem 821 takes the hit source port as the statistical object and uses the first time period as the granularity to count the number of packets hitting each source port to obtain data records of each hit source port. The detailed statistical method of data records has been described in detail above and will not be repeated here.
[0134] Then, the detection subsystem 821 performs data denoising. That is, in order to prevent the flow data of non-business behaviors such as scanning from interfering with the subsequent logic, the detection subsystem 821 will filter out the data records whose number of messages in the first period is less than a preset number (for example, 100), and the filtered data will be reported to the control center 822.
[0135] Then, the control center 822 needs to perform data de-dirt processing after receiving the data record reported by the detection subsystem 821. That is, the traffic related to the network attack alarm is removed from the target mirror traffic. This has been described in detail in the previous text and will not be repeated here.
[0136] Then, the control center 822 periodically performs the following operations every second time period: taking the hit source port as an object, counting the data records of the object in the most recent first time period, if the number of data records reaches a preset number, it is determined that the hit source port has normal business traffic, and the hit source port is recorded in the baseline data. This has been described in detail in the previous text and will not be repeated here.
[0137] Then, the control center 822 takes the destination IP as the statistical object, summarizes all the source ports that hit the destination IP, and finally generates corresponding baseline data for each destination IP. This has been described in detail in the previous text and will not be repeated here.
[0138] By adopting Fig.10 The technical solution can self-learn the mirrored traffic, so that the baseline data can change dynamically in real time with the change of the mirrored traffic. Through the real-time dynamic change of the baseline data, the protection strategy can be adjusted automatically, in real time and dynamically, reducing the risk of false positives, improving the protection effect, avoiding the server from being paralyzed due to attacks and ensuring business stability. There is no need for manual analysis and configuration of protection strategies, thereby improving protection efficiency, no need for manual maintenance and adjustment of protection strategies, thereby reducing operation and maintenance costs, and no need to deploy additional proxy IPs, thereby improving scenario applicability.
[0139] Fig.11 It is a protection flow diagram of the reflection attack protection system according to an embodiment of the present disclosure.
[0140] like Fig.11 As shown, the detection subsystem 821 performs real-time analysis on the mirrored traffic to detect TCP reflection attacks. The detection method of TCP reflection attacks has been described in detail above and will not be repeated here.
[0141] If the detection subsystem 821 finds that a destination IP is attacked by TCP reflection, it will generate an alarm message and upload it to the control center 822. The alarm message includes: the timestamp of the attack, the attacked destination IP, and the attack type (for example, TCP reflection attack).
[0142] Then, when the control center 822 receives the alarm information that a certain destination IP is attacked by TCP reflection attack, it sends a protection instruction to the protection subsystem 823, so that the protection subsystem 823 can start TCP reflection attack protection for the attacked destination IP. At the same time, the control center 822 searches the baseline data for the corresponding baseline information according to the alarm destination IP, and sends it to the protection subsystem 823.
[0143] Then, after receiving the protection instruction, the protection subsystem 823 starts the TCP reflection attack protection for the attacked destination IP. The protection subsystem 823 can perform TCP reflection attack protection in the following manner: the protection subsystem 823 establishes a BGP neighbor with the inlet switch 92 in advance. When it is necessary to start the TCP reflection attack protection for a certain destination IP, the 32-bit route of the attacked destination IP is sent to the inlet switch 92. The inlet switch 92 will forward the inbound traffic of the attacked destination IP to the protection subsystem 823 based on the longest mask match. The protection subsystem 823 checks the inbound traffic of the attacked destination IP, and based on the baseline data corresponding to the destination IP, cleans the traffic of the source port of the destination IP attacked by TCP reflection attack, which hits the preset reflection port list but does not hit the baseline data, from the inbound traffic, thereby intercepting the attack traffic, and the normal traffic is not affected.
[0144] Then, if the TCP reflection attack stops, the protection subsystem 823 will automatically stop the cleaning action.
[0145] By adopting the above technical solutions, automatic, real-time and dynamic adjustment of protection strategies is achieved, which reduces the risk of false positives, improves protection effects, avoids server paralysis due to attacks and ensures business stability. There is no need for manual analysis and configuration of protection strategies, thereby improving protection efficiency, no need for manual maintenance and adjustment of protection strategies, thereby reducing operation and maintenance costs, and no need for additional deployment of proxy IPs, thereby improving scenario applicability.
[0146] Reference below Fig.12 , which shows a schematic diagram of the structure of an electronic device 600 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, laptop computers, 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.12 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.
[0147] like Fig.12 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0148] Typically, the following devices may be connected to the I / O interface 605: an input device 606 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 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.12 The electronic device 600 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.
[0149] 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 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0150] 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 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 can 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, which carries a computer-readable program code. 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. Computer readable signal media may also be any computer readable medium other than computer readable storage media, 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 appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0151] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may 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.
[0152] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0153] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: mirrors the incoming traffic flowing into the server to obtain mirrored traffic; performs self-learning on the mirrored traffic, takes the destination IP as the statistical object, and counts the source ports with business traffic in the source ports of each destination IP as the baseline data corresponding to the destination IP; analyzes the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack; if it is detected that the destination IP is subject to the TCP reflection attack, performs reflection attack protection based on the baseline data corresponding to the destination IP.
[0154] 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 the case of 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).
[0155] 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.
[0156] 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.
[0157] 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.
[0158] 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 device, 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.
[0159] According to one or more embodiments of the present disclosure, Example 1 provides a reflection attack protection method, including: mirroring the incoming traffic flowing into the server to obtain mirrored traffic; performing self-learning on the mirrored traffic, taking the destination IP as the statistical object, and counting the source ports of each of the destination IPs with business traffic as the baseline data corresponding to the destination IP; analyzing the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack; if it is detected that the destination IP is subject to the TCP reflection attack, performing reflection attack protection based on the baseline data corresponding to the destination IP.
[0160] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the self-learning of the mirrored traffic is performed, and the destination IP is taken as the statistical object, and the source ports of each source port of the destination IP that have business traffic are counted as the baseline data corresponding to the destination IP, including: filtering the mirrored traffic to obtain target mirrored traffic belonging to a preset reflection port list, and the preset reflection port list is used to maintain the TCP reflected ports exploited by the attack; performing data de-dirting processing on the target mirrored traffic to obtain target pure mirrored traffic, and the data de-dirting processing is used to remove traffic related to network attack alarms from the target mirrored traffic; taking the source port of the destination IP as the statistical object, and counting the pure traffic of each source port of the destination IP within a first time period based on the target pure mirrored traffic; taking the destination IP as the statistical object, counting the source ports whose pure traffic reaches the preset traffic threshold as the baseline data corresponding to the destination IP.
[0161] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein the analysis of the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack includes: taking the destination IP as a statistical object, counting the total amount of hit traffic related to the destination IP that matches and hits a preset reflection port list, wherein the preset reflection port list is used to maintain the TCP reflection ports exploited by the attack; counting the traffic ratio of the inbound traffic and the outbound traffic related to the destination IP; when the total amount of hit traffic is greater than a first threshold and the traffic ratio is greater than a second threshold, determining that the destination IP is subject to the TCP reflection attack, wherein the second threshold is greater than 1.
[0162] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein the analysis of the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack includes: taking the destination IP as a statistical object, counting the total amount of hit traffic related to the destination IP that matches and hits a preset reflection port list, wherein the preset reflection port list is used to maintain the TCP reflection ports exploited by the attack; when the total amount of hit traffic is greater than a first threshold, it is determined that the destination IP is subject to the TCP reflection attack.
[0163] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein if it is detected that the destination IP suffers from the TCP reflection attack, reflection attack protection is performed based on the baseline data corresponding to the destination IP, including: when it is detected that the destination IP suffers from the TCP reflection attack, a protection instruction is initiated, and the protection instruction is used to instruct to start protection for the destination IP; in response to the protection instruction, according to the destination IP indicated in the protection instruction, the baseline data corresponding to the destination IP is searched, and based on the baseline data corresponding to the destination IP, the incoming traffic of the destination IP is checked, and the traffic in the incoming traffic of the destination IP that hits a preset reflection port list but does not hit the source port of the baseline data is intercepted, and the preset reflection port list is used to maintain the TCP reflection ports exploited by the attack.
[0164] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, wherein the method further includes: when it is detected that the destination IP is no longer subject to the TCP reflection attack, automatically stopping the interception action.
[0165] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 2, wherein, before performing data de-dirting processing on the target mirror traffic to obtain the target pure mirror traffic, the method further includes: performing data denoising processing on the target mirror traffic, wherein the data denoising processing is used to remove data records whose number of messages per minute is less than a third threshold from the target mirror traffic.
[0166] 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.
[0167] 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.
[0168] 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 reflection attack protection method, characterized in that: include: Mirror the inbound traffic flowing into the server to obtain mirrored traffic; The mirrored traffic is self-learned, with the destination IP as the statistical object, and the source ports with service traffic in the source ports of each destination IP are counted as the baseline data corresponding to the destination IP; Analyze the mirrored traffic to detect whether the destination IP is subject to a TCP reflection attack; If it is detected that the destination IP is subjected to the TCP reflection attack, the inbound traffic of the destination IP is checked based on the baseline data corresponding to the destination IP, and the traffic in the inbound traffic of the destination IP that hits the preset reflection port list but does not hit the source port of the baseline data is intercepted to perform reflection attack protection, wherein the preset reflection port list is used to maintain the TCP reflection port used by the attack; The self-learning of the mirrored traffic, taking the destination IP as the statistical object, and counting the source ports with service traffic in the source ports of each of the destination IPs as the baseline data corresponding to the destination IP, includes: Filtering the mirrored traffic to obtain target mirrored traffic belonging to the preset reflector port list; Performing data de-dirt processing on the target mirrored traffic to obtain target pure mirrored traffic, wherein the data de-dirt processing is used to remove traffic related to the network attack alarm from the target mirrored traffic; Taking the source port of the destination IP as the statistical object, based on the target pure mirror traffic, counting the pure traffic of each source port of the destination IP within the first time period; The destination IP is taken as a statistical object, and source ports of the pure traffic reaching a preset traffic threshold are counted as baseline data corresponding to the destination IP.
2. The method according to claim 1, characterized in that The analyzing the mirrored traffic to detect whether the destination IP is subjected to a TCP reflection attack includes: Taking the destination IP as the statistical object, the total amount of hit traffic related to the destination IP that matches and hits the preset reflection port list is counted; Count the traffic ratio of the inbound traffic and the outbound traffic related to the destination IP; When the total amount of hit traffic is greater than a first threshold and the traffic ratio is greater than a second threshold, it is determined that the destination IP is subject to the TCP reflection attack, wherein the second threshold is greater than 1.
3. The method according to claim 1, characterized in that The analyzing the mirrored traffic to detect whether the destination IP is subjected to a TCP reflection attack includes: Taking the destination IP as the statistical object, the total amount of hit traffic related to the destination IP that matches and hits the preset reflection port list is counted; When the total amount of hit traffic is greater than a first threshold, it is determined that the destination IP is subject to the TCP reflection attack.
4. The method according to claim 1, characterized in that: If it is detected that the destination IP is subjected to the TCP reflection attack, the inbound traffic of the destination IP is checked based on the baseline data corresponding to the destination IP, and the traffic of the inbound traffic of the destination IP that hits the preset reflection port list but does not hit the source port of the baseline data is intercepted, including: When it is detected that the destination IP is subjected to the TCP reflection attack, a protection instruction is initiated, wherein the protection instruction is used to instruct to start protection for the destination IP; In response to the protection instruction, according to the destination IP indicated in the protection instruction, the baseline data corresponding to the destination IP is searched, and based on the baseline data corresponding to the destination IP, the incoming traffic of the destination IP is checked, and the traffic in the incoming traffic of the destination IP that hits the preset reflection port list but does not hit the source port of the baseline data is intercepted.
5. The method according to claim 4, characterized in that The method further comprises: When it is detected that the destination IP is no longer subject to the TCP reflection attack, the interception action is automatically stopped.
6. The method according to claim 1, characterized in that Before performing data de-dirt processing on the target mirrored traffic to obtain the target pure mirrored traffic, the method further includes: The target mirrored traffic is subjected to data denoising processing, wherein the data denoising processing is used to remove data records having a number of messages per minute less than a third threshold value from the target mirrored traffic.
7. A reflection attack protection system, characterized in that: include: A mirror module is used to mirror the inbound traffic flowing into the server to obtain mirrored traffic; A protection module, used for self-learning the mirror traffic, taking the destination IP as the statistical object, counting the source ports with business traffic in the source ports of each destination IP as the baseline data corresponding to the destination IP, analyzing the mirror traffic to detect whether the destination IP is subject to a TCP reflection attack, and if it is detected that the destination IP is subject to the TCP reflection attack, performing reflection attack protection based on the baseline data corresponding to the destination IP; The protection module includes a detection subsystem, a control center and a protection subsystem, wherein: The detection subsystem is used for: Filtering the mirrored traffic to obtain target mirrored traffic belonging to a preset reflection port list, wherein the preset reflection port list is used to maintain TCP reflection ports used by attacks; The control center is used to: Performing data de-dirt processing on the target mirror traffic to obtain target pure mirror traffic, wherein the data de-dirt processing is used to remove traffic related to network attack alarms from the target mirror traffic, taking the source port of the destination IP as the statistical object, and counting the pure traffic of each source port of the destination IP within a first time period based on the target pure mirror traffic, taking the destination IP as the statistical object, and counting the source ports whose pure traffic reaches a preset traffic threshold as the baseline data corresponding to the destination IP; The protection subsystem is used to check the incoming traffic of the destination IP based on the baseline data corresponding to the destination IP if it is detected that the destination IP is subject to the TCP reflection attack, and intercept the traffic in the incoming traffic of the destination IP that hits the preset reflection port list but does not hit the source port of the baseline data, so as to perform the reflection attack protection.
8. 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 6 are implemented.
9. 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 6.
