Security protection method and system, electronic equipment and storage medium
By reporting access data in real time on CDN nodes, it is divided into two types of protection strategies: preset and real-time data generation, which solves the problem of unsafe factors of zero-trust architecture in business security access, and achieves more timely and efficient attack interception and Better zero-trust architecture construction.
Patent Information
- Application Number
- CN202411266007.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-11-29
AI Technical Summary
The existing zero-trust architecture has unsafe factors in business security access, and traditional border security architectures are difficult to deal with cyber threats, especially low-frequency but widely distributed attacks, which are difficult to detect and intercept in a timely manner.
By reporting access data in real time on the CDN node, it is divided into a preset first protection strategy and a second protection strategy generated based on real-time access data, reducing the computing volume and real-time requirements of the first protection strategy, and improving the second protection strategy Accuracy and accuracy, thereby achieving more timely and efficient attack request interception.
It improves the effectiveness and accuracy of security protection, helps to better build a zero-trust architecture, reduces resource consumption, and enhances detection and interception capabilities for low-frequency but widely distributed attacks.
Smart Images

Figure CN119051963A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of security protection technology, and in particular to a security protection method and system, an electronic device and a storage medium. Background Art
[0002] In the era of cloud computing and big data, the network security perimeter is gradually disintegrating, and internal and external threats are becoming more and more severe. Traditional perimeter security architecture is difficult to cope with, and zero-trust security architecture has emerged. Among them, zero-trust security architecture usually has four key capabilities: "identity as the cornerstone, business security access, continuous trust assessment, and dynamic access control".
[0003] However, although there are currently a variety of attack protection solutions, business security access still has insecurity factors, and the construction of zero-trust architecture is also threatened. Summary of the invention
[0004] The embodiments of the present application provide a security protection method and system, an electronic device and a storage medium, which are at least conducive to more timely, efficient, accurate and precise interception of attack requests, and can improve the effect of security protection, thereby helping to better build a zero-trust architecture.
[0005] According to some embodiments of the present application, a first aspect of the embodiments of the present application provides a security protection method, which is applied to a CDN node, and the method includes: reporting the access data of the node in real time; receiving a first protection strategy and processing the received request according to the first protection strategy, wherein the first protection strategy is a preset protection strategy and is triggered by an attack detected based on the real-time access data reported by several of the CDN nodes; receiving a second protection strategy and processing the received request according to the second protection strategy, wherein the second protection strategy is generated based on the access data reported by several of the CDN nodes within a preset period, and is triggered by an attack detected based on the real-time access data reported by several of the CDN nodes after the first protection strategy takes effect.
[0006] According to some embodiments of the present application, the second aspect of the embodiments of the present application also provides a security protection method, which is applied to a first server, and the method includes: obtaining access data reported in real time by a number of CDN nodes; performing attack detection in real time based on the real-time reported data currently obtained; when an attack is detected when the first protection strategy is not effective, issuing the first protection strategy to a number of CDN nodes, wherein the first protection strategy is a preset protection strategy; when an attack is detected when the first protection strategy is effective, issuing a second protection strategy to a number of CDN nodes, wherein the second protection strategy is generated based on the access data reported by the number of CDN nodes in a recent period.
[0007] According to some embodiments of the present application, a third aspect of the embodiments of the present application further provides a security protection method, which is applied to a second server, and the method includes: obtaining access data reported in real time by a number of CDN nodes; generating a second protection strategy based on the access data obtained within a period; and sending the second protection strategy to the first server, so that the first server can send the second protection strategy to a number of CDN nodes when an attack is detected when the first protection strategy takes effect.
[0008] According to some embodiments of the present application, the fourth aspect of the embodiments of the present application further provides a security protection system, including: a CDN network composed of a number of CDN nodes, a first server cluster composed of a number of first servers, and a second server, each CDN node is communicatively connected to the first server in the first server cluster, and the second server is connected to the first server in the first server cluster; wherein the CDN node is configured to implement the security protection method as described in the first aspect, the first server is configured to implement the security protection method as described in the second aspect, and the first server is configured to implement the security protection method as described in the third aspect.
[0009] According to some embodiments of the present application, the fifth aspect of the embodiments of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the security protection method as described in the first aspect, or execute the security protection method as described in the second aspect, or execute the security protection method as described in the third aspect.
[0010] According to some embodiments of the present application, the sixth aspect of the embodiments of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the security protection method as described in the first aspect, or implements the security protection method as described in the second aspect, or implements the security protection method as described in the third aspect.
[0011] The technical solution provided in the embodiment of the present application has at least the following advantages:
[0012] Based on the real-time access data reported and summarized, the protection strategies are divided into two categories: the preset first protection strategy and the second protection strategy generated based on the reported real-time access data. Since the second protection strategy can be used to make up for it later, there is no need to completely rely on the first protection strategy to meet the protection requirements at one time, that is, the requirements for the first protection strategy can be reduced, so that the amount of calculation in the generation process of the first protection strategy can be reduced, and the real-time performance of the first protection strategy can be improved. At the same time, since the first protection strategy is effective before the second protection strategy, the real-time requirements of the second protection strategy can be reduced, that is, the second protection strategy can be determined based on more access data, and the second protection strategy will be more accurate and precise, which improves the accuracy of protection. Ultimately, more timely, efficient, accurate and precise protection is achieved, the effect of security protection is improved, and it helps to better build a zero-trust architecture. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0014] Figure 1 is a schematic diagram of the structure of the safety protection system provided in the embodiment of the present application;
[0015] Figure 2 This is the process of the security protection method provided in the embodiment of this application Figure 1 ;
[0016] Figure 3 This is the process of the security protection method provided in the embodiment of this application Figure 2 ;
[0017] Figure 4 This is the process of the security protection method provided in the embodiment of this application Figure 3 ;
[0018] Figure 5 This is the process of the security protection method provided in the embodiment of this application Figure 4 ;
[0019] Figure 6 This is the process of the security protection method provided in the embodiment of this application Figure 5 ;
[0020] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] As can be seen from the background technology, there are still unsafe factors in business security access.
[0022] After analysis, it was found that the main reasons for the above problems are: 1. The attack protection software is deployed on the edge nodes. There are many machine nodes, so upgrading and maintenance will be troublesome and the upgrade cycle will be long. It is difficult to modify the function and upgrade the online interception of new attack behavior characteristics in a short time; 2. A single edge node can only detect the request traffic passing through its own node. For low-frequency but widely distributed attack methods, it is necessary to aggregate the requests of all edge nodes to detect the attack behavior, which is easy to miss the behavioral detection of certain attacks; 3. A single edge node cannot analyze and learn the user's complete behavior pattern, and cannot generate detection thresholds and protection rules that fit the user's business scenario, and thus cannot accurately intercept.
[0023] In order to solve the above problems, the embodiment of the present application provides a security protection method and system, an electronic device and a storage medium, which divides the protection strategy into two categories based on the real-time access data reported and summarized - a preset first protection strategy and a second protection strategy generated based on the reported real-time access data, wherein, since the second protection strategy can be used to make up for it later, it is not necessary to completely rely on the first protection strategy to meet the protection requirements at one time, that is, the requirements for the first protection strategy can be reduced, so that the amount of calculation in the generation process of the first protection strategy can be reduced, and the real-time performance of the first protection strategy can be improved. At the same time, since the first protection strategy is effective before the second protection strategy, the real-time performance requirements of the second protection strategy can be reduced, that is, the second protection strategy can be determined based on more access data, and the second protection strategy will be more accurate and precise, which improves the accuracy of protection. Finally, more timely, efficient, accurate and precise protection is achieved, the effect of security protection is improved, and it helps to better build a zero-trust architecture.
[0024] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present application, many technical details are provided in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.
[0025] The division of the following embodiments is for the convenience of description and shall not constitute any limitation on the specific implementation of the present application. The embodiments may be combined with each other and referenced to each other without contradiction.
[0026] In a first aspect, an embodiment of the present application provides a security protection system, which is used to provide security protection services between a client and a content provider (or, an origin server). The security protection system provided by the embodiment of the present application includes a CDN network 101, a first server cluster 102, and a second server 103. In some embodiments, for example, Figure 1 As shown, the CDN network 101 is composed of several CDN nodes 111, the first server cluster 102 is composed of several first servers 112, each CDN node 111 is communicatively connected to the corresponding first server 102, and the second server 103 is connected to each first server 112 in the first server cluster 102.
[0027] In this way, the data of each CDN node 111 can be sent to the corresponding first server 112, and the data of each first server 112 in the first server cluster 102 is further aggregated to the second server 103, so that the global data can be used for processing on the second server 103 to obtain a more complete, accurate, reliable and effective protection strategy and send it to the corresponding CDN node, so that the attack on the source site can be completely, accurately, reliably and effectively intercepted on the CDN network 101, rather than intercepted at the source site, especially being able to better intercept low-frequency but widely distributed attacks.
[0028] It can be understood that based on the above system architecture, Figure 1 As shown, a computing engine can be deployed on the CDN node 111, so that the computing power provided by the computing engine can be used to achieve second-level aggregation of access data on this node, where the access data can be access logs and other data. In this way, the requests between the client and the content provider are aggregated by the CDN nodes involved in the process of transmission through the CDN acceleration link, so that the access of the entire network can be quickly aggregated to the first server cluster, and then aggregated to the second server, forming a data cluster with the characteristic of low latency.
[0029] It should be noted that the embodiments of the present application do not limit the CDN network in the security protection system. In some embodiments, the CDN network in the security protection system can be a complete CDN network. In some embodiments, it can be understood that attack requests can basically be intercepted at several layers of CDN nodes close to users. Therefore, the CDN network in the security protection system can be composed of several layers of CDN nodes close to users in a complete CDN network. In other words, the security protection function can be deployed on some CDN nodes in a complete CDN network instead of all CDN nodes in the CDN network, etc., which will not be listed one by one here.
[0030] It should also be noted that the embodiments of the present application do not limit the first server cluster. It is understandable that the first server is a structure located between the CDN network and the second server in the security protection system, and is used to summarize the data in the CDN network and report it to the second server. Therefore, in some embodiments, the first server cluster can adopt a distributed architecture, so that the first server in the first server cluster can communicate and connect with the CDN node in the CDN network according to the principles of proximity and balance, so that the data on the CDN node is reported to the first server in the corresponding first server cluster. In some embodiments, the first server cluster may not adopt a distributed architecture. In this case, the CDN node in the CDN network can be connected to the corresponding first server in the first server cluster according to the configuration, so that the data on the CDN node is reported to the first server in the corresponding first server cluster, etc., which will not be repeated here.
[0031] Based on the security protection system provided in the above-mentioned embodiment, the embodiment of the present application also provides a corresponding security protection method, so as to further improve the security protection effect through the cooperation between the security protection methods respectively executed by the CDN node in the CDN network, the first server in the first server cluster, and the second server. The security protection method provided in the embodiment of the present application will be described below in combination with different embodiments.
[0032] In some embodiments, the embodiments of the present application provide a security protection method applied to CDN nodes. It achieves flexible, complete, accurate, reliable and effective protection by setting a two-layer security protection strategy. The process of the security protection method applied to CDN nodes is as follows: Figure 2 As shown, the following steps are included:
[0033] Step 201: Report the access data of this node in real time.
[0034] Step 202: Receive a first protection strategy and process the received request according to the first protection strategy, wherein the first protection strategy is a preset protection strategy and is triggered by an attack detected according to real-time access data reported by a number of CDN nodes.
[0035] Step 203, receiving a second protection strategy and processing the received request according to the second protection strategy, wherein the second protection strategy is generated based on access data reported by a number of CDN nodes within a preset period, and is triggered by an attack detected based on real-time access data reported by a number of CDN nodes after the first protection strategy takes effect.
[0036] In this way, based on the real-time access data reported and summarized, the protection strategies are divided into two categories: the preset first protection strategy and the second protection strategy generated based on the reported real-time access data. Since the second protection strategy can be used to make up for it later, there is no need to completely rely on the first protection strategy to meet the protection requirements at one time, that is, the requirements for the first protection strategy can be reduced, so that the amount of calculation in the generation process of the first protection strategy can be reduced, and the real-time performance of the first protection strategy can be improved. At the same time, since the first protection strategy is effective before the second protection strategy, the real-time requirements of the second protection strategy can be reduced, that is, the second protection strategy can be determined based on more access data, and the second protection strategy will be more accurate and precise, which improves the accuracy of protection. Ultimately, more timely, efficient, accurate and precise protection is achieved, the effect of security protection is improved, and it helps to better build a zero-trust architecture.
[0037] To help those skilled in the art better understand the security protection method for CDN nodes provided by the above embodiment, it will be explained below.
[0038] In step 201, it can be understood that attacks are always hidden between normal access requests. Regardless of whether an attack is detected, the access data is reported, so that it is possible to determine whether an attack exists and learn the type of attack based on sufficient and complete data, thereby avoiding missing the detection of attacks and learning the characteristics of attacks.
[0039] In step 202, the first protection strategy is not limited. The first protection strategy is pre-set, which can be a strategy that can be used to protect against attacks and is obtained in advance through experiments or historical data. For example, the first protection strategy can include intercepting a certain number of access requests initiated simultaneously to access a certain source station. For example, the first protection strategy can include intercepting access initiated by terminals with certain behavioral characteristics, and for example, releasing requests from IPs or source stations in the whitelist. In addition, the first protection strategy can support modification, that is, during the application process, relevant operation and maintenance personnel or management personnel can modify its configuration through the background management system. The first protection strategy can also be a fixed, unchangeable configuration strategy set at each startup. The content and deployment method of the first protection strategy will not be described here one by one.
[0040] It should be noted that the triggering of the first protection strategy can be implemented on the first server, that is, after the access data reported in real time by multiple CDN nodes are aggregated to the first server, the first server determines through analysis that an attack has occurred, and then triggers the first protection strategy to be sent to the corresponding CDN node. In this way, the triggering of the first protection strategy is carried out in different regions, and the triggering of the protection strategy is more refined, more in line with the real-time working characteristics of the current CDN node, and unnecessary protection will not be triggered in the area without attack, resulting in resource waste and impact on the CDN node acceleration service. The first protection strategy can also be implemented on the second server, that is, after the access data reported in real time by the global CDN node is aggregated to the second server, the second server determines through analysis that an attack has occurred, and then triggers the first protection strategy to be sent to the global CDN node, wherein the first protection strategy can be pre-stored on the second server, and when triggered, the second server sends the first protection strategy to the CDN node through the first server, or the second protection strategy can be pre-stored on the first server, and when triggered, the second server notifies the first server to send the first protection strategy, etc. In this way, the first protection strategy is triggered based on global attacks. Even low-frequency but widely distributed attacks can be detected and triggered for protection, which is more timely and more conducive to ensuring security. Of course, the first protection strategy can also be that the second server skips the first server and directly sends it to the CDN node, etc., which will not be repeated here.
[0041] In step 203, the second protection strategy is not limited, and it depends on the attack characteristics learned through the reported real-time access data. The preset period is also not limited, and it can be determined according to the security level of the network, the records of attacks, the requirements for security level, etc. For example, when it is found that the current period is more vulnerable to attacks according to the records of attacks, the preset period can be set to a shorter duration. For example, when the current security requirements are not so high, the preset period can be set to a longer duration, etc. I will not go into details here.
[0042] It should be noted that the triggering of the second protection policy can be on the first server or on the second server. For example, when the triggering of the second protection policy occurs on the first server, the second protection policy is generated by the second server according to the access data reported within a preset period and then sent to the first server. The first server continuously updates the current second protection policy. At the same time, the first server will send the second protection policy to the CDN node after the attack is triggered by the real-time access data reported after the first protection policy takes effect. For another example, the triggering of the second protection policy occurs on the second server. The second protection policy is generated by the second server according to the access data reported within a preset period, and after the attack is triggered by the real-time access data reported after the first protection policy takes effect, the second server sends the second protection policy to the CDN node through the first server, etc. I will not list them one by one here.
[0043] It should also be noted that the triggering and effectiveness of the first protection strategy is after the triggering and effectiveness of the second protection strategy. It can be understood that after the first protection strategy is triggered and takes effect, the attack will be intercepted. Therefore, based on the back-to-source characteristics of the CDN network, since the attack is intercepted on the lower-level CDN node, the attack received by the upper-level CDN node will be reduced or even disappear. Therefore, on the second server, the overall number of requests that may be attacks detected will be reduced. In this way, according to the first protection strategy, it may not be determined as an attack until the attack requests missed by the first protection strategy reach a certain level, and the attack will be determined again. At this time, the second protection strategy will be triggered and take effect, forming another layer of protection for the attack requests missed by the first protection strategy, achieving more accurate and reliable interception.
[0044] In some embodiments, considering that attacks do not always last, and in the absence of attacks, continuing to use protection strategies will lead to a waste of resources and easily affect the normal acceleration service of CDN nodes. Therefore, in some embodiments, the security protection method applied to CDN nodes also includes the following steps: after the current request reception situation meets the target condition, the first protection strategy and / or the second protection strategy are invalidated, wherein the target condition includes one or a combination of the following conditions: the current continuous effective time of the first protection strategy and / or the second protection strategy reaches the first preset time, the number of requests received by this node is less than the preset value, and the continuous time without detecting the attack reaches the second preset time.
[0045] It should be noted that the embodiment of the present application does not limit the first preset duration and the second preset duration. The first preset duration and the second preset duration can be determined according to the security level of the network, the requirements for the security level of protection, the requirements for resource consumption, etc. For example, when you want to be safer, you can set the first preset duration and the second preset duration to a longer duration. For example, when resources are limited, you can set the first preset duration and the second preset duration to a shorter duration. And the first preset duration and the second preset duration corresponding to the first protection strategy and the second protection strategy are not limited. For example, considering that after the second protection strategy fails, the first protection strategy can still be used to protect safety. Therefore, the first preset duration and the second preset duration used when the second protection strategy fails can be set to a shorter duration than the first preset duration and the second preset duration used when the second protection strategy fails, so that the first protection strategy and the second protection strategy fail successively, which is conducive to ensuring safety while reducing resource consumption. For example, in order to further reduce resource waste, the first preset time length and the second preset time length used when the second protection strategy fails can be set to the same time length, so that resource consumption caused by protection can be reduced as soon as possible and in a timely manner, thereby reducing interference with the acceleration service of the CDN node, etc., and improving user experience, etc. I will not go into details here.
[0046] It should also be noted that this embodiment does not limit the preset value, which is similar to the first preset duration, the second preset duration, etc., and can also be determined based on the security level of the network, the security requirements of the protection, the resource consumption requirements, etc. The specific values of the preset value will not be listed one by one here.
[0047] In some embodiments, taking the failure processing of the first protection strategy introduced in the protection process as an example, the process of the security protection method applied to the CDN node can also be as follows: Figure 3 As shown, the following steps are included:
[0048] Step 301: Report the access data of this node in real time.
[0049] Step 302: Receive a first protection strategy and process the received request according to the first protection strategy, wherein the first protection strategy is a preset protection strategy and is triggered by an attack detected according to real-time access data reported by a number of CDN nodes.
[0050] Step 303, when the first protection strategy is valid, receive the second protection strategy and process the received request according to the second protection strategy, wherein the second protection strategy is generated based on the access data reported by several CDN nodes within a preset period, and is triggered by an attack detected based on the real-time access data reported by several CDN nodes after the first protection strategy takes effect.
[0051] Step 304, after the current request reception situation meets the target conditions, the first protection strategy is invalidated, wherein the target conditions include one or a combination of the following conditions: the current continuous effectiveness duration of the first protection strategy reaches a first preset duration, the number of requests received by this node is less than a preset value, and the duration of no attack being detected reaches a second preset duration.
[0052] It should be noted that steps 301 to 303 in this embodiment are substantially the same as steps 201 to 203 in the aforementioned embodiment, and the main difference is that the execution of step 303 is conditional on: the first protection strategy is effective, which is relative to the implementation of the first protection strategy proposed in step 304. It is understandable that, as mentioned above, the second protection strategy is proposed mainly to intercept attacks that are missed by the first protection strategy, and therefore, the second protection strategy is superimposed on the first protection strategy, with better protection effect and balanced resource consumption. Of course, in some embodiments, the execution of step 303 may not set the condition that the first protection strategy is effective, and it will not be repeated here.
[0053] It should also be noted that the first preset time length, the second preset time length, etc. in step 304 have been explained before and will not be repeated here.
[0054] In some embodiments, the present application provides a security protection method for a first server in a first server cluster. It achieves flexible, complete, accurate, reliable, and effective protection by maintaining a two-layer security protection strategy for CDN nodes. The process of the security protection method applied to the first server is as follows: Figure 4 As shown, the following steps are included:
[0055] Step 401: Obtain access data reported in real time by a number of CDN nodes.
[0056] Step 402: Perform attack detection in real time according to the currently acquired real-time reporting data.
[0057] Step 403: When an attack is detected when the first protection strategy is not effective, the first protection strategy is sent to a plurality of CDN nodes, wherein the first protection strategy is a preset protection strategy.
[0058] Step 404: When an attack is detected while the first protection strategy is in effect, a second protection strategy is issued to a plurality of CDN nodes, wherein the second protection strategy is generated based on access data reported by the plurality of CDN nodes in a recent period.
[0059] In this way, the protection strategies are divided into two categories: the preset first protection strategy and the second protection strategy generated based on the reported real-time access data for maintenance. Since the second protection strategy can be used to make up for it later, there is no need to completely rely on the first protection strategy to meet the protection requirements at one time, that is, the requirements for the first protection strategy can be reduced, so that the amount of calculation in the generation process of the first protection strategy can be reduced, and the real-time performance of the first protection strategy can be improved. At the same time, since the first protection strategy is effective before the second protection strategy, the real-time requirements of the second protection strategy can be reduced, that is, the second protection strategy can be determined based on more access data, and the second protection strategy will be more accurate and precise, which improves the accuracy of protection. Finally, more timely, efficient, accurate and precise protection is achieved, and the effect of security protection is improved.
[0060] In order to help those skilled in the art better understand the security protection method applied to the first server provided by the above embodiment, it will be explained below.
[0061] In step 401, it is a corresponding sending and receiving step to step 201 in the aforementioned embodiment, and will not be described in detail here.
[0062] In step 402, the embodiment of the present application does not limit the method of attack detection. For example, machine learning-based attack detection can be used. Also, it can be determined whether the number of requests simultaneously received by the same source station exceeds a preset number, etc., which will not be elaborated here.
[0063] In step 403, it is a corresponding sending and receiving step to step 202 in the aforementioned embodiment, and will not be described in detail here.
[0064] In step 404, it is a corresponding sending and receiving step to step 203 in the above-mentioned embodiment, and will not be described in detail here.
[0065] It should be noted that step 403 and step 404 in this embodiment are based on the second protection strategy being superimposed on the first protection strategy to provide an implementation solution for intercepting attacks missed by the first protection strategy, wherein, relative to the second protection strategy, the first protection strategy is a preset strategy, which is more efficient and convenient to deploy, and therefore has better real-time performance, while the second protection strategy needs to be updated based on the latest data, and therefore, takes time to generate, but is more accurate, so that the second protection strategy is always implemented in conjunction with the first protection strategy, so that both the accuracy of protection and the timeliness of protection can be guaranteed.
[0066] Considering that in the existing protection scheme, the data is always judged by a window, that is, the data of a window is taken, and then the parameters such as the access frequency are determined based on the data in the window. However, this is easy to miss special types of attacks such as low-frequency attacks. Based on this, in some embodiments, in the security protection method applied to the first server, attack detection is performed in real time according to the real-time reported data currently obtained, and it is achieved in the following way: according to the real-time reported data currently obtained and the real-time reported data obtained within the third preset time period before the current moment, attack detection is performed in real time. In other words, statistics are collected in an incremental manner, rather than statistics on data within a certain window, which is more real-time.
[0067] It is also understandable that since the first server has already performed attack detection, its detection results can provide some reference for the detection of the second server, so as to help the second server better generate a second protection strategy based on the reported real-time access data. For example, in some embodiments, the process of the security protection method applied to the first server is as follows: Figure 5 As shown, the following steps are included:
[0068] Step 501: Obtain access data reported in real time by a number of CDN nodes.
[0069] Step 502: Perform attack detection in real time according to the currently acquired real-time reporting data.
[0070] Step 503: When an attack is detected when the first protection strategy is not effective, the first protection strategy is sent to a plurality of CDN nodes, wherein the first protection strategy is a preset protection strategy.
[0071] Step 504: When an attack is detected while the first protection strategy is in effect, a second protection strategy is issued to a plurality of CDN nodes, wherein the second protection strategy is generated based on access data reported by the plurality of CDN nodes in a recent period.
[0072] Step 505: When an attack is detected, the attacked domain name is sent to the second server, so that the second server can filter out attack access data according to the attacked domain name to determine the first request threshold.
[0073] Step 506: Receive the first request threshold sent by the second server, so as to perform attack detection according to the first request threshold when the first protection strategy takes effect.
[0074] That is, by further setting the first request threshold, the accuracy of attack detection can be improved through the first request threshold, and protection can be performed more timely.
[0075] To facilitate understanding of the security protection method applied to the first server provided in the above embodiment, it will be explained below.
[0076] In step 501, it is substantially the same as step 401 in the aforementioned embodiment, and will not be described in detail here.
[0077] In step 502, it is substantially the same as step 402 in the aforementioned embodiment, and will not be described in detail here.
[0078] In step 503, it is substantially the same as step 403 in the aforementioned embodiment, and will not be described in detail here.
[0079] In step 504, it is substantially the same as step 404 in the aforementioned embodiment, and will not be described in detail here.
[0080] In step 505, there is no limitation on the sending method of the domain name, which may be sending different Uniform Resource Locators (URLs) or sending other information that can uniquely identify the domain name, etc., which will not be described in detail here.
[0081] In step 506, the first request threshold is not limited, and is determined by the real-time access data currently processed and reported by the second server. It can be understood that when the second server currently detects more attacks, the first request threshold can specifically take a larger value; when the second server currently has a higher requirement for attacks, the first request threshold can take a smaller value, etc., which will not be elaborated here.
[0082] In some embodiments, the present application provides a security protection method applied to the second server. It implements complete, accurate, reliable and effective protection by providing a second protection strategy for the CDN node. The process of the security protection method applied to the second server is as follows: Figure 6 As shown, the following steps are included:
[0083] Step 601: Obtain access data reported in real time by a number of CDN nodes.
[0084] Step 602: Generate a second protection strategy based on the access data acquired within a cycle.
[0085] Step 603: Send the second protection policy to the first server, so that the first server can send the second protection policy to several CDN nodes when an attack is detected when the first protection policy is in effect.
[0086] In this way, the protection strategies are divided into two categories: the preset first protection strategy and the second protection strategy generated based on the reported real-time access data for maintenance. Since the second protection strategy can be used to make up for it later, there is no need to completely rely on the first protection strategy to meet the protection requirements at one time, that is, the requirements for the first protection strategy can be reduced, so that the amount of calculation in the generation process of the first protection strategy can be reduced, and the real-time performance of the first protection strategy can be improved. At the same time, since the first protection strategy is effective before the second protection strategy, the real-time requirements of the second protection strategy can be reduced, that is, the second protection strategy can be determined based on more access data, and the second protection strategy will be more accurate and precise, which improves the accuracy of protection. Finally, more timely, efficient, accurate and precise protection is achieved, and the effect of security protection is improved.
[0087] In order to help those skilled in the art better understand the security protection method for the application and the second server provided in the above embodiment, it will be explained below.
[0088] In step 601, it is a corresponding sending and receiving step to step 201 in the aforementioned embodiment, and will not be described in detail here.
[0089] In step 602, the embodiment of the present application does not limit the manner in which the second protection strategy is generated. For example, machine learning may be used to learn the characteristics of the attack, and the second protection strategy may be further generated based on the characteristics of the attack. Also, statistics may be collected on user behaviors of attack requests, and the second protection strategy may be further generated based on the parameters obtained from the statistics, etc. These will not be described in detail here.
[0090] In step 603, the second protection strategy is sent to the first server for pre-storage until the first server detects an attack again after the first protection strategy takes effect, and then the second protection strategy takes effect without the need for the second server to send it in real time, thereby reducing the delay in sending the second protection strategy to the CDN node and improving the timeliness of protection.
[0091] To help those skilled in the art better understand the generation of the second protection strategy provided in the embodiment of the present application, an exemplary description will be provided below.
[0092] In some embodiments, generating a second protection strategy based on access data obtained within a cycle can be achieved in the following manner: counting first target parameters of different domain names according to a preset first window, processing first target parameters of different uniform resource locators of different domain names within a fourth preset time period obtained based on the statistics, and obtaining a second request threshold; generating a second protection strategy based on the second request threshold; wherein the first target parameter includes at least one or a combination of the following parameters: the total number of requests, the actual number of back-to-source requests, and the maximum number of back-to-source requests.
[0093] In this way, by processing the access data corresponding to different domain names, it is possible to learn the behavioral patterns of each domain name being accessed, automatically generate and update domain name-level protection strategies, which are more in line with the business scenarios corresponding to different domain names, and effectively avoid omissions and false interceptions.
[0094] For example, each domain name is divided into windows of 10 seconds (i.e., the length of the first window is 10s), and the total number of requests total_req, the number of access IPs total_ip, the mean value of IP accesses and the standard deviation ip_mean and ip_std of each URL (used to characterize the domain name) of each domain name are counted. One piece of aggregate data is generated every 10s for each domain name and each URL.
[0095] Then, based on the above aggregated data, processing is performed. Specifically, the URL of each domain name is divided into windows of 1h, and the 10s aggregated data of 1 hour (h) is calculated (up to 360 data points). The median of the total number of URL requests is taken to obtain the URL attack location threshold per hour; the combined mean and combined standard deviation of total_ip, ip_mean and ip_std are calculated to obtain the frequency limit threshold per hour. Then the data of the URL of each domain name in the most recent week (i.e., the fourth time period is 1 week) (up to 168 data points) are pulled, and the attack location threshold and frequency limit threshold of the URL per hour are calculated through a time-weighted function to obtain the second request threshold, and further based on the second request threshold, the corresponding second protection strategy is generated, for example, after reaching certain thresholds, requests from certain IPs are intercepted, and after reaching certain thresholds, requests to access certain source stations are intercepted, etc.
[0096] In some embodiments, in order to facilitate the first server to better determine whether the second protection strategy is effective, the second server may also issue a certain strategy. For example, in some embodiments, the security protection method applied to the second server also includes: receiving a domain name sent by the first server; generating a first request threshold according to the domain name and the received real-time access data; and sending the first request threshold to the first server. The domain name sent by the first server is the domain name sent by the first server in step 505 in the aforementioned embodiment.
[0097] Regarding the first request threshold described in the above embodiment, it is a threshold for attack detection after the first protection strategy takes effect. The embodiment of the present application does not limit its acquisition method. For example, in some embodiments, the first request threshold is generated according to the domain name and the received real-time access data. It can be implemented in the following way: according to the preset second window, the target parameters of the received domain name are counted, and the target parameters of different domain names within the fifth preset time period obtained by statistics are processed to obtain the first request threshold; wherein the second target parameter includes at least one or a combination of the following parameters: the total number of requests, the actual number of back-to-source requests, and the maximum number of back-to-source requests.
[0098] For example, first, each domain name is divided into a window of 5 seconds (that is, the second window length is 5 seconds), and the second target parameters, namely the total number of requests for the domain name total_req (excluding CC attacks), the actual number of back-to-origin requests back_origin_req, and the maximum number of back-to-origin requests for edge nodes max_edge_req, are counted. One piece of aggregate data is generated every 5 seconds for each domain name.
[0099] Then, the following processing is performed: each domain name is divided into a window of 1 hour, and the 5s aggregated data of 1 hour (up to 720 data points) is calculated. The median of total_req, back_origin_req, and max_edge_req are taken respectively. The results of the above median are recorded as: center discovery threshold, center missed threshold, and single machine discovery threshold. Then pull the data of the domain name in the last week (that is, the fifth preset time is 1 week) (up to 168 data points), and the center discovery threshold, center missed threshold, and single machine discovery threshold of each hour are calculated through the time-weighted function to obtain the final threshold, that is, the second request threshold.
[0100] It should be noted that the above first window length, second window length, fourth preset time length, and fifth preset time length are only for illustration. In other examples, the above parameters may also select other specific values, such as adjustment according to the actual business cycle, security requirements, etc., which will not be listed one by one here.
[0101] It should also be noted that in the above examples, some data processing is introduced after obtaining the corresponding first target parameter or the second target parameter and before generating the corresponding first request threshold or the second request threshold, such as obtaining the median of the data area for 1h, etc. Its main meaning is to simplify or statistically process the data and does not represent other meanings. In some examples, other processing can also be introduced, for example, after eliminating outliers, taking the average value, etc., which will not be elaborated here.
[0102] Therefore, in the security protection system, through the security protection method provided by the above embodiment, the access data distributed on each CDN node can use the computing power of the node itself to aggregate the request into second-level aggregate data, that is, before various requests reach the source station, the access data can be reported to the first server cluster through the CDN node of the acceleration link provided by the CDN network, thereby converging to form a data set such as a message queue, so that each server in the first server cluster can perform real-time stream calculation, generate corresponding data and store it, for example, it can be stored in a distributed file system. Thus, the second server, such as a server deployed with a computing engine, can generate attack detection conditions (first request threshold) and second protection strategies (second request threshold) through data within a certain period of time in an offline manner. The first server can perform attack detection through the received real-time access data, determine whether to take effect on the preset first protection strategy to the CDN node, and intercept the attack request. When the first protection strategy cannot completely defend against the attack and there is an attack request leakage, the second protection strategy will be triggered to take effect, thereby achieving more accurate and reliable interception. Among them, the first protection strategy is implemented in a preset manner, so that it has high real-time performance, and the first protection strategy that takes effect first can still achieve protection in the generation phase of the second protection strategy that takes effect later, providing sufficient time for the generation and effectiveness of the second protection strategy. The second protection strategy is more effective than the first protection strategy, and ultimately takes into account both the timeliness and accuracy of protection.
[0103] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0104] It is not difficult to find that the above system embodiment is a system embodiment corresponding to the method embodiment, and the system embodiment can be implemented in conjunction with the method embodiment. The relevant technical details mentioned in the method embodiment are still valid in the system embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in the system embodiment can also be applied in the method embodiment.
[0105] In addition, in order to highlight the innovative part of the present application, the system embodiment does not introduce units that are not closely related to solving the technical problems proposed by the present application, but this does not mean that there are no other units in the system embodiment.
[0106] Another aspect of the present application embodiment further provides an electronic device, such as Figure 7As shown, it includes: at least one processor 701; and a memory 702 that is communicatively connected to the at least one processor 701; wherein the memory 702 stores instructions that can be executed by the at least one processor 701, and the instructions are executed by the at least one processor 701 so that the at least one processor 701 can execute the security protection method described in any of the above method embodiments.
[0107] The memory 702 and the processor 701 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 701 and the memory 702 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 701 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 701.
[0108] The processor 701 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 702 can be used to store data used by the processor 701 when performing operations.
[0109] Another aspect of the present application embodiment further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiment is implemented.
[0110] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0111] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A safety protection method, characterized in that: Applied to a CDN node, the method includes: Report the access data of this node in real time; Receiving a first protection strategy and processing the received request according to the first protection strategy, wherein the first protection strategy is a preset protection strategy and is triggered by an attack detected according to real-time access data reported by a plurality of the CDN nodes; Receive a second protection strategy and process the received request according to the second protection strategy, wherein the second protection strategy is generated based on access data reported by several of the CDN nodes within a preset period and is triggered by an attack detected based on real-time access data reported by several of the CDN nodes after the first protection strategy takes effect.
2. The safety protection method according to claim 1, characterized in that: The method further comprises: After the current request reception situation meets the target conditions, the first protection strategy and / or the second protection strategy are invalidated, wherein the target conditions include one or a combination of the following conditions: the current continuous effectiveness duration of the first protection strategy and / or the second protection strategy reaches a first preset duration, the number of requests received by this node is less than a preset value, and the duration without detecting an attack reaches a second preset duration.
3. A safety protection method, characterized in that: Applied to a first server, the method comprises: Obtain access data reported in real time by several CDN nodes; Perform attack detection in real time based on the currently acquired real-time reporting data; In the case where an attack is detected when the first protection strategy is not effective, sending the first protection strategy to a plurality of CDN nodes, wherein the first protection strategy is a preset protection strategy; When an attack is detected when the first protection strategy is in effect, a second protection strategy is sent to a number of CDN nodes, wherein the second protection strategy is generated based on access data reported by the number of CDN nodes in a recent period.
4. The safety protection method according to claim 3, characterized in that: The real-time attack detection based on the currently acquired real-time reporting data includes: Attack detection is performed in real time according to the currently acquired real-time reporting data and the real-time reporting data acquired within a third preset time period before the current moment.
5. The safety protection method according to claim 3 or 4, characterized in that: The method further comprises: In case of detecting an attack, sending the attacked domain name to the second server, so that the second server can filter out attack access data according to the attacked domain name to determine a first request threshold; The first request threshold is received from the second server, so as to perform attack detection according to the first request threshold when the first protection strategy takes effect.
6. A safety protection method, characterized in that: Applied to the second server, the method comprises: Obtain access data reported in real time by several CDN nodes; Generate a second protection strategy based on the access data acquired within a cycle; The second protection policy is sent to the first server, so that the first server can send the second protection policy to a plurality of CDN nodes when an attack is detected when the first protection policy is in effect.
7. The safety protection method according to claim 6, characterized in that: The step of generating a second protection strategy according to the access data acquired within a cycle includes: According to the preset first window, the first target parameters of different domain names are counted. The first target parameters of different domain names within a fourth preset time period obtained by statistics are processed to obtain a second request threshold; generating the second protection strategy according to the second request threshold; Among them, the first target parameter includes at least one or a combination of the following parameters: total number of requests, number of access IPs, IP access mean, and IP access standard deviation.
8. The safety protection method according to claim 6 or 7, characterized in that: The method further comprises: Receiving the domain name sent by the first server; generating a first request threshold according to the domain name and the received real-time access data; The first request threshold is sent to the first server.
9. The safety protection method according to claim 8, characterized in that: The step of generating a first request threshold according to the domain name and the received real-time access data includes: The target parameters of the received domain names are counted according to the preset second window. Processing the target parameters of different domain names within a fifth preset time period obtained by statistics to obtain the first request threshold; The second target parameter includes at least one or a combination of the following parameters: the total number of requests, the actual number of back-to-source requests, and the maximum number of back-to-source requests.
10. A safety protection system, characterized in that: include: A CDN network consisting of a plurality of CDN nodes, a first server cluster consisting of a plurality of first servers, and a second server, wherein each CDN node is communicatively connected to the first server in the first server cluster, and the second server is connected to each of the first servers in the first server cluster; Wherein, the CDN node is configured to implement the security protection method as described in claim 1 or 2, the first server is configured to implement the security protection method as described in any one of claims 3 to 5, and the first server is configured to implement the security protection method as described in any one of claims 6 to 9.
11. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the security protection method as described in claim 1 or 2, or execute the security protection method as described in any one of claims 3 to 5, or execute the security protection method as described in any one of claims 6 to 9.
12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the security protection method as claimed in claim 1 or 2, or implements the security protection method as claimed in any one of claims 3 to 5, or implements the security protection method as claimed in any one of claims 6 to 9.
