Network security protection method, device and equipment and computer readable storage medium
By analyzing the time series of access devices, predicting their visits and identifying abnormal access, the problem that the existing technology cannot detect new network attacks in a timely manner, realizing timely intercepting abnormal accesses, and improving the efficiency and accuracy of network security protection.
Patent Information
- Application Number
- CN202310504826.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-08
AI Technical Summary
The existing technology cannot effectively and promptly detect and intercept new cyber attacks, especially before network firewall manufacturers release corresponding detection strategies, the victim server may have been successfully attacked.
By detecting the time series of the access device, predicting its access volume in the current time window, and identifying an abnormal access device based on the difference between the actual and predicted access, thereby detecting and intercepting abnormal access in a timely manner.
Without the need to obtain the characteristics of network requests in advance, it can quickly identify and intercept abnormal access, improve the timeliness and accuracy of network security protection, and prevent losses caused by network attacks.
Smart Images

Figure CN118921177A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to computer network technology, and in particular to a network security protection method, device, equipment and computer-readable storage medium. Background Art
[0002] Since the world-renowned open source log component Apache Log4j was exposed to have a serious high-risk remote code execution vulnerability, cyber attackers have repeatedly tried to exploit this vulnerability to execute malicious code attacks, and all types of online applications, open source software, cloud platforms, and email services may face network security risks. The impact of this vulnerability lasts for a long time. In the next decade, the vulnerable version will still exist in computer systems for a long time. The impact of this vulnerability is also wide, affecting more than 60,000 open source software and more than 300,000 open source software packages worldwide. In addition, the vulnerability is extremely harmful. Once a computer is attacked, it will cause great losses.
[0003] Generally speaking, when a network attack is discovered, it is necessary to wait for the network firewall manufacturer to release a targeted detection strategy for the network attack. Then, users or enterprises can detect and intercept the network attack by updating the network firewall to avoid losses from the same attack again. However, when a new type of network attack appears, it takes a long time for the network firewall manufacturer to release the corresponding detection strategy for the new type of network attack, and during this period the victim server may have been successfully attacked. Therefore, the existing technology cannot effectively detect the new type of network attack. Summary of the invention
[0004] The embodiments of the present application provide a network security protection method, apparatus, electronic device, computer-readable storage medium and computer program product, which can effectively identify abnormal network requests for accessing devices, thereby ensuring network security.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides a network security protection method, the method comprising:
[0007] Detecting actual access volume of at least one access device to the same accessed server within a current time window;
[0008] Acquire a time series of the access device, wherein the time series includes historical access volume of the access device to the accessed server in multiple historical time windows, and the multiple historical time windows are earlier than the current time window;
[0009] Determine, based on the time series of the access device, the predicted access volume of the access device to the accessed server within the current time window;
[0010] Determine an abnormality indicator of the at least one access device based on the actual access volume of the access device and the predicted access volume of the access device;
[0011] An abnormal access device is identified based on the abnormal indicators respectively corresponding to the at least one access device.
[0012] The present application provides a network security protection device, including:
[0013] A detection module, used to detect the actual access volume of at least one access device to the same accessed server within a current time window;
[0014] An acquisition module, configured to acquire a time series of the access device, wherein the time series includes a historical number of visits of the access device to the accessed server in a plurality of historical time windows, wherein the plurality of historical time windows are earlier than the current time window;
[0015] A first determination module, configured to determine, based on a time series of the access device, a predicted number of visits of the access device to the accessed server within a current time window;
[0016] A second determination module, configured to determine an abnormality index of the at least one access device based on the actual access volume of the access device and the predicted access volume of the access device;
[0017] The identification module is used to identify abnormal access devices based on the abnormal indicators respectively corresponding to the at least one access device.
[0018] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0019] A memory for storing computer executable instructions;
[0020] The processor is used to implement the network security protection method provided in the embodiment of the present application when executing the computer executable instructions or computer programs stored in the memory.
[0021] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program for implementing the network security protection method provided by the embodiment of the present application when executed by a processor.
[0022] An embodiment of the present application provides a computer program product, including computer executable instructions or a computer program. When the computer executable instructions or the computer program are executed by a processor, the network security protection method provided by the embodiment of the present application is implemented.
[0023] The embodiments of the present application have the following beneficial effects:
[0024] The present application can determine the predicted access volume of the access device to the visited server in the current time window based on the time series of the access device, can effectively predict the access frequency of the access device in the current time window, and then determine the abnormality index based on the predicted access volume and the actual access volume in the current time window, and then identify whether the access device is abnormal based on the abnormality index. Since the present application detects the access device based on the spatiotemporal distribution law of the access request of the access device to determine whether the access device is an abnormal access device, it is not necessary to obtain the characteristics of various network requests in advance, thereby ensuring that when the visited server is attacked by a new type of network attack, it can timely detect the abnormal access device that sends the network attack from the level of spatiotemporal distribution law. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of the architecture of the network security protection system provided by the embodiment of the present application;
[0026] Figure 2 It is a schematic diagram of the structure of the server provided in the embodiment of the present application;
[0027] Figure 3A-Figure 3F It is a flowchart of a network security protection method provided by an embodiment of the present application;
[0028] Figure 4 It is a schematic diagram of the principle of the network layer virtual patch provided in the embodiment of the present application;
[0029] Figure 5 It is a flow chart of the network security protection method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0031] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0032] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0033] It should be pointed out that the data collection and processing in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0034] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0035] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0036] 1) Access device: The subject that initiates the network request, for example, it can be a terminal device or a server. The network request can be in the form of Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol Secure (HTTPS).
[0037] 2) Accessed server: the target that the access device requests to access through the network, such as a terminal device, a server of an Internet service (such as a social networking service, online video), etc.
[0038] 3) Time window: The period for network protection through the firewall, for example, it can be 1 hour or 10 minutes.
[0039] 4) Cloud firewall: The cloud version of the firewall is a general term for the Internet boundary firewall, VPC boundary firewall, and host boundary firewall, which can provide three types of boundary protection: Internet, virtual network, and host. The Internet boundary firewall acts on the Internet boundary and uniformly controls all public IPs; the VPC boundary firewall can detect and control the traffic between private network virtual private clouds (VPCs) and between VPCs and local data centers; the host boundary firewall corresponds to the security group and controls the communication between cloud servers. The three firewalls can be used together to finely control data access behavior, and also form a three-layer in-depth defense system of Internet boundary-virtual network boundary-host boundary.
[0040] 5) Web Application Firewall (WAF): It is a one-stop professional protection platform for intelligent website security. It can provide website protection services, defend against various malicious attacks, and filter out massive malicious Challenge Collapsar (CC) attacks.
[0041] 6) Platform-as-a-Service (PaaS): It is a form of cloud computing in which an application software platform is provided by a third party. It is mainly aimed at developers and programmers. It allows users to develop, run and manage their own applications without having to build and maintain the infrastructure or platform usually associated with the process. The PaaS platform can run in the cloud or local infrastructure. For hosted products, the PaaS provider will host the hardware and software on its own infrastructure and deliver the platform to users via the Internet in the form of an integrated solution, solution stack or service.
[0042] 7) Remote Method Invocation (RMI): This method enables an object on a Java virtual machine to call an object in another Java virtual machine and obtain the call result.
[0043] 8) Lightweight Directory Access Protocol (LDAP): It is a lightweight protocol for accessing directory services, running over TCP / IP connections or other transport-oriented connections.
[0044] 9) Traffic splitting: In applications based on network traffic analysis, the network traffic needs to be collected first. In order to reduce the impact on the original link, bypass splitting and switch mirroring are usually used to obtain a copy of the original traffic. The method of using splitting to obtain a copy of the traffic requires the use of a splitter device. The splitter is a passive optical device that can redistribute the power intensity of the optical signal according to the required ratio, such as 1-to-2, 1-to-4, and 1-to-multi-channel splitting.
[0045] 10) 0day vulnerability: refers to a software defect that is unknown to the programmer or supplier responsible for the application. Since the vulnerability is unknown, there is no patch available. In other words, the vulnerability is discovered by someone who is not directly involved in the project. "0day" refers to the number of days between the discovery of the vulnerability and the first attack on it. After a 0day vulnerability is made public, it is called an "nday" vulnerability.
[0046] 11) Remote Code Execution (RCE): RCE vulnerability for short, refers to when a user submits an execution command through a browser, the server does not filter the execution function, resulting in the execution of the command without specifying an absolute path, which may allow an attacker to execute a maliciously constructed code by changing $PATH or the program execution environment.
[0047] 12) Command execution vulnerability: This means that the server does not filter the executed commands, and users can execute system commands at will. This is one of the high-risk vulnerabilities.
[0048] 13) Software-as-a-Service (SaaS): is a model for providing software through the Internet. Manufacturers deploy application software on their own servers. Customers can order the required application software services from manufacturers through the Internet based on actual needs, pay manufacturers according to the ordered service volume and duration, and obtain services provided by manufacturers through the Internet.
[0049] If we only fix the vulnerabilities, not only will the cost of repair be high, but the vulnerability repair will also involve the underlying infrastructure, making the overall repair difficult and taking a long time. During the repair period, network attackers may still attack the vulnerabilities. In addition, for malicious attacks by attackers, the traditional method is usually to adopt corresponding preset interception strategies for these discovered vulnerabilities to prevent network requests with malicious attacks from reaching the visited servers. However, once a new type of network malicious attack appears, these preset interception strategies will become invalid and cannot detect or intercept the attack.
[0050] The embodiments of the present application provide a network security protection method, device, electronic device, computer-readable storage medium, and computer program product, which can effectively identify and intercept network requests for abnormal access to devices, thereby ensuring network security. The following describes an exemplary application of the electronic device provided by the embodiments of the present application. The electronic device provided by the embodiments of the present application can be implemented as a server. Below, an exemplary application when the electronic device is implemented as a server will be described.
[0051] See also Figure 1 , Figure 1 It is an architectural diagram of the network security protection system provided in an embodiment of the present application. The access device 200 (the terminal 210 and the external server 220 are shown as an example) is connected to the firewall server 400 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. The firewall server 400 is connected to the intranet server 500 of the accessed entity.
[0052] The access device 200 sends a network request to the firewall server 400 through the network 300. The firewall server 400 identifies the network request. When it is identified that the access device 200 corresponding to the network request is an abnormal access device, the firewall server 400 blocks the network request from reaching the intranet server 500 of the visited entity, and blocks the intranet server 500 of the visited entity from establishing a connection to the access device 200 and sending return information. When it is identified that the access device 200 corresponding to the network request is not an abnormal access device, the firewall server 400 allows the network request to reach the intranet server 500 of the visited entity, and allows the intranet server 500 of the visited entity to establish a connection to the access device 200 and send return information.
[0053] See also Figure 2 , Figure 2 4 is a schematic diagram of the structure of the firewall server 400 provided in an embodiment of the present application. The firewall server 400 includes: at least one processor 410, a memory 430, and at least one network interface 420. The various components in the firewall server 400 are coupled together through a bus system 440. It can be understood that the bus system 440 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in Figure 2 Various buses are labeled as bus system 440 .
[0054] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0055] The memory 430 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 430 may optionally include one or more storage devices that are physically remote from the processor 410.
[0056] The memory 430 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 430 described in the embodiments of the present application is intended to include any suitable type of memory.
[0057] In some embodiments, memory 430 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0058] Operating system 431, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0059] A network communication module 432, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0060] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The network security protection device 433 stored in the memory 430 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a detection module 4331, an acquisition module 4332, a first determination module 4333, a second determination module 4334 and an identification module 4335. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0061] The network security protection method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server provided in the embodiment of the present application.
[0062] Next, the execution entity of the network security protection method of the embodiment of the present application can be the above-mentioned firewall server 400, so the execution entity of each step will not be repeated below.
[0063] See also Figure 3A , Figure 3A is a flowchart of a network security protection method provided by an embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.
[0064] In step 101, the actual access volume of at least one access device to the same accessed server is detected within a current time window.
[0065] In some embodiments, the actual access volume of at least one access device to the same interviewed subject to be protected (e.g., the same enterprise) is detected within the current time window. Whether it is the same access device can be determined by the Internet Protocol (IP) address or domain name of the access device. The access device can be either a terminal or a server, which is not limited here. The actual access volume is the number of times the access device sends a network request to the interviewed subject within the current time window. The time window can be dynamically adjusted according to the actual network protection needs. The shorter the time window, the higher the detection frequency and the higher the protection strength of the network security protection. For example, when high-frequency detection is required, the time window can be shortened, such as 3 seconds, and when low-frequency detection is required, the time window can be lengthened, such as 60 seconds.
[0066] For example, the current time window is 30 seconds, the access device is a user terminal, the accessed server is a corporate server, and it is detected that the user terminal has accessed the corporate server 12 times within the current time window. The actual number of visits to the corporate server by the user terminal within the current time window is 12.
[0067] By determining whether it is the same access device through the IP address or domain name of the access device and counting the actual number of visits of the access device to the same visited server in units of time windows, the actual number of visits of each access device in each time period can be accurately and efficiently detected, and only a small amount of computing resources is required, which makes it easier to judge whether the access device is abnormal based on the actual number of visits.
[0068] In step 102, a time sequence of access to the device is obtained.
[0069] In some embodiments, before obtaining the time series of the access device, it is necessary to first determine the access devices whose actual access volume is greater than the access volume threshold, and treat the access devices whose actual access volume is greater than the access volume threshold as the access devices for which the corresponding time series needs to be obtained, so as to enter the step of obtaining the time series of the access device. The access volume threshold can be dynamically adjusted according to the actual protection needs. For example, when strict protection is required, the access volume threshold can be lowered. For example, when the actual access volume of the access device in the current time window is greater than 10, the access device is treated as the access device for which the corresponding time series needs to be obtained; when standard protection is required, the access volume threshold can be increased. For example, when the actual access volume of the access device in the current time window is greater than 50, the access device is treated as the access device for which the corresponding time series needs to be obtained.
[0070] In some embodiments, the time series includes the historical visits of the access device to the visited server in multiple historical time windows, and the multiple historical time windows are earlier than the current time window. Here, the number of multiple historical time windows is the same as the autoregressive order p below, and the length of the multiple historical time windows is the same as the length of the current time window. For example, the current time window is 20220401225802-20220401225812, the number of historical time windows is 30, and the multiple historical time windows are 20220401225302-20220401225312…20220401225752-20220401225802, where 20220401225802 represents 22:58:02 on April 1, 2022; then the historical visits of the access device to the visited server in each historical time window are combined to determine the time series of the access device.
[0071] It is worth mentioning that the data sliding window method can also be used to obtain the time series of access devices. For example, multiple historical time windows are S1, S2, S3, S4, S5, S6... in chronological order. Then the sum of the historical access volumes in the two historical time windows S1 and S2 can be used as the first sequence value of the time series, and the sum of the historical access volumes in the two historical time windows S2 and S3 can be used as the second sequence value of the time series, and so on; or the sum of the historical access volumes in the three historical time windows S1, S2, and S3 can be used as the first sequence value of the time series, and the sum of the historical access volumes in the three historical time windows S2, S3, and S4 can be used as the second sequence value of the time series, and so on, thereby effectively improving the accuracy of the time series data.
[0072] In step 103, based on the time series of the access device, the predicted access volume of the access device to the accessed server within the current time window is determined.
[0073] In some embodiments, see Figure 3B , Figure 3B is a flowchart of a network security protection method provided in an embodiment of the present application, Figure 3A Step 103 shown in FIG. 1 can be performed by Figure 3B Steps 1031 to 1032 in are implemented, and are described in detail below.
[0074] In step 1031, a time series model is obtained.
[0075] In some embodiments, the time series model can be an auto-regressive model (AR model), an auto-regression and moving average model (ARMA model), an auto-regressive integrated moving average model (ARIMA model), etc. The parameters of the time series model can be obtained by fitting the historical access volume of the access device to the visited server within the historical time window; when the type of the time series model is an auto-regressive model, the parameters of the auto-regressive model include: a first auto-regressive model order, white noise, a first random error and a first auto-regressive coefficient; when the type of the time series model is an auto-regressive moving average model, the parameters of the auto-regressive moving average model include a second auto-regressive model order, a first moving average model order, a second random error, a second auto-regressive coefficient and a first moving average coefficient; when the type of the time series model is an auto-regressive integrated moving average model, the parameters of the auto-regressive integrated moving average model include a third auto-regressive model order, a second moving average model order, a third random error, a third auto-regressive coefficient, a second moving average coefficient and a number of differences.
[0076] In step 1032, the time series is substituted into the time series model to obtain the predicted access volume of the access device to the accessed server within the current time window.
[0077] In some embodiments, see Figure 3C , Figure 3C is a flow chart of the network security protection method provided in the embodiment of the present application. When the type of the time series model is an autoregressive model, Figure 3B Step 1032 shown in FIG. 1 can be performed by Figure 3C Steps 10321a to 10323a in are implemented, and are described in detail below.
[0078] In step 10321a, historical access volumes of the access devices to the accessed servers in the first number of historical time windows are read from the time series in chronological order.
[0079] Since the first number is the same as the first autoregressive model order p, after determining the first autoregressive model order p of the autoregressive model, the historical visits of the same access device to the visited server in p historical time windows are read from the time series obtained in step 102 in chronological order.
[0080] In step 10322a, a weighted sum is performed on the historical access volume corresponding to each historical time window in the first number of historical time windows based on the first autoregressive coefficient to obtain a first summation result.
[0081] In combination with step 10321a to step 10323a, when the type of the time series model is an autoregressive model, the calculation formula can be expressed as follows:
[0082] In some embodiments, the first autoregressive coefficient of the AR model refers to the degree of influence of the time series itself after a time window is delayed, and the value range is between -1 and 1. The closer the absolute value of the first autoregressive coefficient is to 1, the stronger the correlation between the predicted visits in the current time window and the historical visits in the historical time window. When the value is 0, it means that there is no correlation between the predicted visits in the current time window and the historical visits in the historical time window. The estimation of the first autoregressive coefficient is usually calculated using moment estimation, least squares estimation or maximum likelihood estimation.
[0083] When the first autoregressive coefficient α of the AR model is calculated 1 ,…,α p After that, according to α 1 ·X t-1 , α 2 ·X t-2 , α p ·X t-p The calculation method is to weight the historical visits corresponding to each historical time window in the p historical time windows respectively, and sum the weighted results, that is, α 1 ·X t-1 +α 2 ·X t-2 …+α p ·X t-p , and get the first summation result.
[0084] In step 10323a, the first summation result, the first random error and the white noise are added to obtain a first calculation result, and the first calculation result is used as the predicted access volume of the access device to the accessed server in the current time window.
[0085] In some embodiments, the first summation result, the first random error ω of the predicted visit volume in the t-th time window, t And white noise c are added to obtain the first calculation result X t , the first calculation result X t That is, the predicted number of visits to the visited server by the same access device within the current time window.
[0086] In combination with step 10321a to step 10323a, when the type of the time series model is an autoregressive model, the calculation formula can be expressed as follows:
[0087]
[0088] Among them, X t represents the predicted visits in the tth time window (i.e., the current time window); X t-i represents the historical visits in the ti-th time window; c represents white noise, which is a constant term and is used to indicate that the visit data in the time series is not zero-meaned; p is the first autoregressive model order, indicating that the predicted visits in the t-th time window are related to the historical visits in the previous p time windows. The value of p can be determined by calculating the autocorrelation coefficient. If the autocorrelation coefficient of the historical visits in the i-th time window is less than 0.5, the value of p is i+1; α 1 ,…,α p and α i is the first autoregressive coefficient; ω t is the first random error of the predicted visits in the tth time window.
[0089] In an embodiment of the present application, by inputting the historical visits of the access device to the visited server in multiple historical time windows into the autoregressive model for prediction processing, the predicted visits of the access device to the visited server in the current time window under normal circumstances can be obtained more accurately, thereby facilitating the subsequent comparison of the predicted visits of the access device in the current time window with the actual visits to determine whether the access device is abnormal.
[0090] In some embodiments, see Figure 3D , Figure 3D is a flowchart of a network security protection method provided in an embodiment of the present application. When the type of the time series model is an autoregressive moving average model (ARMA), Figure 3B Step 1032 shown in FIG. 1 can also be performed by Figure 3D Steps 10321b to 10325b in are implemented, and are described in detail below.
[0091] In step 10321b, historical access volumes of the access devices to the accessed servers in the second number of historical time windows are read from the time series in chronological order.
[0092] Since the second number is the same as the second autoregressive model order p, after determining the second autoregressive model order p of the autoregressive model, the historical visits of the same access device to the visited server in p historical time windows are read from the time series obtained in step 102 in chronological order.
[0093] In step 10322b, historical access volumes of the access device to the visited server in the third number of historical time windows are read from the time series in chronological order, and a random disturbance value of each historical access volume is determined.
[0094] When the model is actually used to calculate the predicted visit volume for the current time window, random disturbances will be generated due to variable errors caused by incomplete variables included in the model, fitting errors caused by improper model selection, measurement errors caused by inaccurate or incomplete historical visit volume data, etc. In actual calculations, the random disturbance value is a combination of multiple factors, and its value is unobservable. Therefore, in order to infer its numerical distribution law, the random disturbance value u (i.e., ε in the ARIMA calculation formula below) can be used to calculate the random disturbance value u. t-i ) makes certain assumptions and gives certain statistical properties.
[0095] Assumption 1, u is a random variable that obeys normal distribution, that is, when multiple random factors act on u together, the value of u in any period obeys normal probability distribution. Assume that in the univariate linear econometric model y = b 0 +b 1 In z+u, the independent variable z (historical visits) is a non-random variable, while the dependent variable y (predicted visits) is normally distributed like u. Therefore, for a univariate linear econometric model, when the independent variable z takes a fixed value z 1 ,z 2 ,…,z k When , since the probability P(u) of the random disturbance value u follows the normal distribution, the dependent variable y also follows the normal distribution probability.
[0096] Assume 2, u is a random variable with an expected value of zero, which can be expressed in mathematical notation as E(u i )=0,(i=1,2,…,n). The intuitive explanation of this assumption is that for each fixed value of the dependent variable z (i.e., historical visits), u can take different values with a certain probability, but if the values of u are considered at the same time, then in the average sense, they have a mutually offsetting effect, so that the average value presents a limited positive and negative fluctuation with zero as the center point.
[0097] In some embodiments, since the third number is the same as the first sliding average model order q, after determining the first sliding average model order q, the historical access volume of the same access device to the visited server in q historical time windows is read from the time series obtained in step 102 in chronological order, and then the random disturbance value of each historical access volume is determined.
[0098] In step 10323b, a weighted sum is performed on the historical access volume corresponding to each historical time window in the second number of historical time windows based on the second autoregressive coefficient to obtain a second summation result.
[0099] In some embodiments, when the second autoregressive coefficient α of the AR model is calculated 1 ,…,α p After that, according to α 1 ·X t-1 , α 2 ·X t-2 , α p ·X t-p The calculation method is to weight the historical visits corresponding to each historical time window in the p historical time windows respectively, and sum the weighted results, that is, α 1 ·X t-1 +α 2 ·X t-2 …+α p ·X t-p , and obtain the second summation result.
[0100] In step 10324b, a weighted sum is performed on the random disturbance value of each historical access volume based on the first sliding average coefficient to obtain a third summation result.
[0101] In some embodiments, a sliding average model (MA) is used to smooth the historical visits in a time series. When the historical visits in a time series fluctuate greatly due to periodic and irregular changes and are difficult to show a forecast trend, a sliding average model (MA) can be used on the basis of an autoregressive model (AR) to eliminate the influence of random disturbance values, thereby predicting the forecast visits in the current time window based on the time series. The calculation methods of the sliding average model include simple sliding average method, weighted sliding average method, and trend sliding average method.
[0102] Taking the weighted moving average method as an example, when the first moving average coefficient β of the moving average model (MA) is calculated 1 ,…,β q , and the random perturbation value ε of the historical visits in each historical time window t-1 ,…,ε t-qAfter that, according to β 1 ·ε t-1 , β 2 ·ε t-2 , β q ·X t-q The calculation method is to weight the random perturbation value of the historical access volume corresponding to each historical time window in the q historical time windows, and sum the weighted results, that is, β 1 ·ε t-1 +β 2 ·ε t-2 +…+β q ·ε t-q , and obtain the third summation result, which can be considered as the weighted sliding average of the historical visits in the q historical time windows.
[0103] In step 10325b, the second summation result, the third summation result and the second random error are added to obtain a third calculation result, and the third calculation result is used as the predicted access volume of the access device to the visited server in the current time window.
[0104] In some embodiments, the second summation result, the third summation result, and the second random error ω of the predicted visit volume in the t-th time window are combined. t A summing process is performed to obtain a third calculation result, where the third calculation result is the predicted number of visits to the visited server by the same access device within the current time window.
[0105] In combination with step 10321b to step 10325b, when the type of the time series model is an autoregressive moving average model, the calculation formula is as follows:
[0106]
[0107] Among them, X t represents the predicted visits in the tth time window; X t-i represents the historical visits in the ti-th time window; p is the second autoregressive model order, indicating that the predicted visits in the t-th time window are related to the historical visits in the previous p time windows. The value of p can be determined by calculating the autocorrelation coefficient. If the autocorrelation coefficient of the historical visits in the ith time window is less than 0.5, the value of p is i+1; q is the first sliding average model order; α 1 ,…,α p and α i is the second autoregressive coefficient; β 1 ,…,β p and β i is the first sliding average coefficient; ε t-1 represents the random perturbation value of the historical visits in the t-1th time window; ωt is the second random error of the predicted visits in the tth time window.
[0108] In an embodiment of the present application, by inputting the historical visits of the access device to the visited server in multiple historical time windows into the autoregressive sliding average model for prediction processing, the predicted visits of the access device to the visited server in the current time window under normal circumstances can be obtained more accurately, thereby facilitating the subsequent comparison of the predicted visits of the access device in the current time window with the actual visits to determine whether the access device is abnormal.
[0109] In some embodiments, see Figure 3E , Figure 3E is a flowchart of a network security protection method provided in an embodiment of the present application. When the type of the time series model is an autoregressive integrated moving average (ARIMA) model, Figure 3B Step 1032 shown in FIG. 1 can also be performed by Figure 3E Steps 10321c to 10327c in are implemented, and are described in detail below.
[0110] In step 10321c, in response to the time series satisfying the stationarity requirement, the time series is directly treated as a stationary time series.
[0111] In some embodiments, whether the time series is stable can be determined by observing the time series diagram, Dickey-Fuller test (DF test) or augmented Dickey-Fuller test (ADF). When judging by ADF test, it can be implemented in the following ways: performing a unit root test on the time series to obtain a test result; in response to the test result indicating that the time series does not have a unit root, determining that the time series meets the stability requirement; in response to the test result indicating that the time series has a unit root, determining that the time series does not meet the stability requirement.
[0112] The ADF test eliminates the influence of autocorrelation. When the sequence has high-order lag correlation, the ADF test can be used. In an autoregressive process, if the lag term coefficient (i.e., the X t-1 The coefficient of the term α 1 ) is 1, it is considered that there is a unit root. When a unit root exists, the relationship between the independent variable (i.e., the historical visits in multiple historical time windows) and the dependent variable (i.e., the predicted visits in the current time window) is deceptive, because any error in the residual sequence will not decay as the sample size (i.e., the number of periods) increases, that is, the residuals in the model will always have an impact on the predicted value, that is, the time series does not meet the stationarity requirements, and this kind of regression is also called pseudo regression.
[0113] In step 10322c, in response to the time series not meeting the stationarity requirement, the time series is differentially processed to obtain a stationary time series.
[0114] In some embodiments, step 10322c can be implemented in the following manner: let n be an integer variable increasing from 1, with a value range satisfying 1≤n≤N-1, N is the fourth quantity, and iterate n to perform the following processing: subtract the historical visits in the nth time window from the historical visits in the n+1th time window to obtain the nth difference, and use the nth difference as the new historical visits in the nth time window; wherein, the time interval between the nth time window and the current time window is less than the time interval between the n+1th time window and the current time window; and in chronological order, combine the new historical visits in the 1st time window to the N-1th time window into a stationary time series.
[0115] The difference operation of time series refers to the process of subtracting the historical visits in adjacent time windows in the sequence to obtain a new time series. For example, for a time series with a length of N, the time interval between the t-1 time window and the current time window (t-2 time window) is 0, the time interval between the t-2 time window and the current time window is 1 time window, and the time interval between the t-3 time window and the current time window is 2 time windows. The historical visits in the t-1 time window are 30, the historical visits in the t-2 time window are 13, and the historical visits in the t-3 time window are 7. Then the first difference is 17, and the first difference 17 is used as the first time window. The second difference is 6, and the second difference 6 is used as the new historical visits in the second time window. The above steps are performed in sequence until the historical visits in the N-1th time window are subtracted from the historical visits in the Nth time window to obtain the nth difference, and the nth difference is used as the new historical visits in the nth time window. Then, in chronological order, the new historical visits in the t-1th time window to the N-1th time window are combined into a new time series. This new time series is a stationary time series.
[0116] The time series that do not meet the stationarity requirements are converted into stationary time series through the above-mentioned difference operation, and then the stationary time series is predicted through the autoregressive sliding average model to obtain a more accurate predicted visit volume in the current time window.
[0117] In step 10323c, the historical access volume of the access device to the visited server in the fourth number of historical time windows is read from the stable time series in chronological order.
[0118] Since the fourth quantity is the same as the third autoregressive model order p, after determining the third autoregressive model order p of the autoregressive model, the historical visits of the same access device to the visited server in p historical time windows are read from the time series obtained in step 102 in chronological order.
[0119] In step 10324c, the historical access volume of the access device to the visited server in the fifth number of historical time windows is read from the stable time series in chronological order, and a random disturbance value of each historical access volume is determined.
[0120] In some embodiments, since the fifth number is the same as the second sliding average model order q, after determining the second sliding average model order q, the historical access volume of the same access device to the visited server in q historical time windows is read from the time series obtained in step 102 in chronological order, and then the random disturbance value of each historical access volume is determined.
[0121] In step 10325c, a weighted sum is performed on the historical access volume corresponding to each historical time window in the fourth number of historical time windows based on the third autoregressive coefficient to obtain a fourth summation result.
[0122] In some embodiments, when the third autoregressive coefficient α of the AR model is calculated 1 ,…,α p After that, according to α 1 ·X t-1 , α 2 ·X t-2 , α p ·X t-p The calculation method is to weight the historical visits corresponding to each historical time window in the p historical time windows respectively, and sum the weighted results, that is, α 1 ·X t-1 +α 2 ·X t-2 …+α p ·X t-p , and obtain the fourth summation result.
[0123] In step 10326c, a weighted sum is performed on the random disturbance value of each historical access volume based on the second sliding average coefficient to obtain a fifth summation result.
[0124] When the second moving average coefficient β of the moving average model (MA) is calculated 1 ,…,β q , and the random perturbation value ε of the historical visits in each historical time window t-1 ,…,ε t-q After that, according to β1 ·ε t-1 , β 2 ·ε t-2 , β q ·X t-q The calculation method is to weight the random perturbation value of the historical access volume corresponding to each historical time window in the q historical time windows respectively, and sum the weighted results, that is, β 1 ·ε t-1 +β 2 ·ε t-2 +…+β q ·ε t-q , and the fifth summation result is obtained. The fifth summation result can be considered as the weighted sliding average of the historical visits in the q historical time windows.
[0125] In step 10327c, the fourth summation result, the fifth summation result and the third random error are added to obtain a fourth calculation result, and the fourth calculation result is used as the predicted access volume of the access device to the visited server in the current time window.
[0126] In some embodiments, the fourth summation result, the fifth summation result, and the third random error ω of the predicted visit volume in the t-th time window are combined. t A summing process is performed to obtain a fourth calculation result, where the fourth calculation result is the predicted number of visits to the visited server by the same access device within the current time window.
[0127] In combination with step 10321c to step 10327c, when the type of the time series model is a differential integrated moving average autoregressive model, that is, for the time series after difference processing, the autoregressive moving average model (ARMA) is used for calculation, and the calculation formula is as follows:
[0128]
[0129] Among them, X t represents the predicted visits in the tth time window; X t-i represents the historical visits in the ti-th time window; p is the third autoregressive model order, indicating that the predicted visits in the t-th time window are related to the historical visits in the previous p time windows. The value of p can be determined by calculating the autocorrelation coefficient. If the autocorrelation coefficient of the historical visits in the ith time window is less than 0.5, the value of p is i+1; q is the second sliding average model order; α 1 ,…,α p and α i is the third autoregressive coefficient; β 1 ,…,β p and β i is the second sliding average coefficient; εt-1 represents the random perturbation value of the historical visits in the t-1th time window; ω t is the third random error of the predicted visits in the t-th time window.
[0130] In an embodiment of the present application, by performing differential processing on the historical visits of the access device to the visited server in multiple historical time windows to obtain a time series that meets the stationarity requirement, the stationary time series is input into an autoregressive sliding average model for prediction processing. The predicted visits of the access device to the visited server in the current time window can be obtained more accurately, thereby facilitating the subsequent comparison of the predicted visits of the access device in the current time window with the actual visits to determine whether the access device is abnormal.
[0131] Continue to see Figure 3A In step 104, an abnormal index of at least one access device is determined based on the actual access volume of the access device and the predicted access volume of the access device.
[0132] In some embodiments, determining the abnormal index of at least one access device based on the actual access volume of the access device and the predicted access volume of the access device can be achieved by: determining the absolute value of the difference between the actual access volume and the predicted access volume, or determining the ratio of the actual access volume to the predicted access volume; and determining the absolute value or ratio of the difference as the abnormal index of at least one access device. For example, if the actual access volume of access device A in the current time window is 50 and the predicted access volume is 20, then the abnormal index of the access device is 30 or 2.5.
[0133] In step 105, an abnormal access device is identified based on an abnormal indicator corresponding to at least one access device.
[0134] In some embodiments, identifying abnormal access devices based on abnormal indicators corresponding to at least one access device can be achieved in the following manner: sorting the abnormal indicators in descending order, and taking the access devices corresponding to the abnormal indicators of a preset number or a preset proportion starting from the head in the sorting result as abnormal access devices. For example, when the abnormal indicator is the ratio of the actual access volume to the predicted access volume, the abnormal indicator of access device A in the current time window is 2.5, the abnormal indicator of access device B is 1.3, the abnormal indicator of access device C is 0.8, and the abnormal indicator of access device D is 0.1. The abnormal indicators are sorted in descending order, that is, the sorting results are A, B, C, and D. When the preset proportion is 25%, the access devices corresponding to the abnormal indicators of 30% starting from the head in the sorting result are taken as abnormal access devices, that is, only access device A is an abnormal access device.
[0135] The preset quantity or preset ratio can be dynamically adjusted according to the actual protection needs. When strict protection is required, the preset quantity or preset ratio can be increased, for example, the preset quantity is 1000 and the preset ratio is 50%; when standard protection is required, the preset quantity or preset ratio can be lowered, for example, the preset quantity is 500 and the preset ratio is 30%.
[0136] In some embodiments, after an abnormal access device is identified based on abnormal indicators corresponding to at least one access device, network requests for the abnormal access device can also be processed based on any one of an observation mode and an interception mode; wherein the observation mode is used to perform alarm and prompt processing on the network requests of the abnormal access device; the interception mode includes a loose mode, a standard mode and a strict mode, the loose mode is used in false alarm detection scenarios to control the false alarm rate of network requests for abnormal access devices to be less than a first preset ratio; the standard mode is used in vulnerability detection scenarios to control the false interception rate of network requests for abnormal access devices to be less than a second preset ratio; the strict mode is used in missed alarm detection scenarios to control the interception accuracy of network requests for abnormal access devices to be greater than a third preset ratio.
[0137] When the observation mode is applied, after the abnormal access device is identified as above, an alarm will only be issued for the identified abnormal access device and the network request of the abnormal access device to the accessed server, and the user will be prompted. The user can manually handle the alarm to choose not to issue an alarm for the network request of the abnormal access device, or choose to intercept all network requests of the abnormal access device. When the interception mode is applied, the user can manually adjust the three interception granularities of loose mode, standard mode and strict mode. The loose mode is used for false alarm detection scenarios to control the false alarm rate of network requests for abnormal access devices to be less than a first preset ratio, such as 0.001%, that is, the number of network requests of non-abnormal access devices to the visited server that are detected as network requests of abnormal access devices to the visited server is controlled to be less than the first preset ratio to the actual network requests of all abnormal access devices to the visited server; the standard mode is used for vulnerability detection scenarios to control the false interception rate of network requests for abnormal access devices to be less than a second preset ratio, such as 0.01%, that is, the number of non-abnormal access devices identified as abnormal access devices is controlled to be less than the second preset ratio to the number of all abnormal access devices; the strict mode is used for missed detection scenarios to control the interception accuracy of network requests for abnormal access devices to be greater than a third preset ratio, such as 99.999%, that is, the number of abnormal access devices identified as abnormal access devices is controlled to be greater than the second preset ratio to the number of all abnormal access devices.
[0138] In the embodiment of the present application, through the dynamic adjustment of the observation mode and the interception mode, as well as the adjustment of the three interception granularities in the interception mode, different defense strategies can be dynamically adjusted for different business scenarios, thereby meeting the usage requirements of multiple scenarios.
[0139] In some embodiments, the firewall server may also perform the following processing for each network request of an access device detected within the current time window: matching the header of the network request with a first vulnerability library, wherein the first vulnerability library includes multiple attack keywords corresponding to network vulnerabilities; in response to a successful match between the header of the network request and any one of the attack keywords in the first vulnerability library, blocking the network request and identifying the access device as an abnormal access device.
[0140] The first vulnerability library can store all known network attack request features, that is, attack keywords. For example, the request feature of the log4j code execution vulnerability (CVE-2021-44228) is that the header of the network request contains keywords in the form of ${jndi:, or other deformed network attack request features, such as ${${lower:jndi}:${lower:rmi}: / / adsasd.asdasd.asdasd / poc}, ${${lower:${lower:jndi}}:${lower: rmi}: / / adsasd.asdasd.asdasd / poc}, ${${lower:j}${lower:n}${lower:d}i:${lower:rmi}: / / adsasd.asdasd.asdasd / poc}, etc. In addition, there are other types of network attack keywords such as ${main:hostName}, ${env:CLASSPATH}, ${env:JAVA_HOME}, ${sys:java.version}, ${sys:os.name}, ${sys:os.version}, etc., which are not limited here. When it is detected that the header of the network request contains any attack keyword in the first vulnerability library, the network request is blocked from reaching the accessed server, and the access device is identified as an abnormal access device, so that the user can perform the next step of processing for the network request. For example, when it is detected that the Accept-language field in the HTTP request contains information in the form of ".. / ", it can be considered that this HTTP request has an attack risk and the HTTP request will be blocked.
[0141] In some embodiments, the firewall server can also detect and block sensitive information when the attacker uses malicious code to cause the return information of the visited server to contain sensitive information. Figure 3F , Figure 3FThis is a flow chart of the network security protection method provided in the embodiment of the present application, which is explained below in conjunction with specific steps.
[0142] In step 201, return information generated by the visited server in response to a network request is received.
[0143] In some embodiments, when the network request is detected by the above method and the detection result indicates that the network request has no attack risk, the visited server is allowed to receive the network request and generate return information in response to the network request.
[0144] In step 202, the returned information is matched with the second vulnerability database.
[0145] Network attackers may use some malicious codes to make the visited server generate 403, 404, 500, 502 and other errors to return detailed error information, which may contain server code information, database connection information, Structured Query Language (SQL) statements, personal information or sensitive file paths, allowing attackers to collect sensitive information of the visited server. This vulnerability attack is also called an echo vulnerability. Therefore, in order to protect against such attack vulnerabilities, when the return information generated by the visited server for the network request is received, the return information needs to be matched with the second vulnerability library, which includes multiple error vulnerability keywords, such as the keywords of file information leakage of version management tools (such as git): [ip] / .git / config, [ip] / CVS / Entriesp, [ip] / .svn / entriesp, etc.; for example, the keywords of HTTP authentication information leakage: [ip] / basic / index.php; another example is the keywords of management backend address leakage: [ip] / login.php, [ip] / admin.php, [ip] / admin_login.php, etc. The second vulnerability library includes but is not limited to the error vulnerability keywords listed above. The error vulnerability keywords here can be the same as the attack keywords in the first vulnerability library, or they can be different.
[0146] In step 203, in response to the returned information being error information, and the returned information successfully matching any error vulnerability keyword in the second vulnerability library, the returned information is replaced with blank information.
[0147] When it is detected that the return information is an error message, and the return information contains any error vulnerability keyword in the second vulnerability library, it is considered that the error message has the risk of leaking sensitive information of the server, and the return information is replaced with blank information, that is, the return page does not contain any information; or a unified custom return page is pre-set for the page containing the error information to hide the sensitive information of the visited server; in addition, a protection strategy that does not output the details of the abnormal error information generated when the visited server program is running can also be pre-set, or a protection strategy that prohibits the return of all system-related information of the visited server can be set, so as to prevent network attackers from obtaining sensitive information of the visited server.
[0148] In step 204, blank information is returned to the access device, and the access device is identified as an abnormal access device.
[0149] After replacing the return information with blank information, blank information or a customized return page is returned to the access device, and the access device is identified as an abnormal access device, so that when a network request sent by the access device is received subsequently, it can be focused on detection.
[0150] In the embodiment of the present application, when performing feature detection and interception on discovered vulnerabilities, and detecting and intercepting echo page error information, only one defense strategy can be used, which effectively reduces development costs and improves detection efficiency.
[0151] In some embodiments, after step 102, that is, after receiving the return information generated by the visited server for the network request, connection information sent by the target server can also be received, wherein the target server is used to establish a connection with the visited server and receive the return information; identify a field representing the target server from the connection information; in response to the field including a public key carrying the intranet identifier of the visited server, decrypt the field based on the intranet private key of the visited server to obtain a decryption result; in response to the decryption result successfully matching any server identifier in the intranet server list of the visited server, allow the visited server to send return information to the target server; in response to the field not having a private key, or the decryption result cannot be successfully matched with any server identifier in the intranet server list of the visited server, block the visited server from sending the return information to the target server.
[0152] Taking the example of an attacker using the Log4j RCE vulnerability to conduct remote malicious external connections, the attacker pre-deploys a LADP / RMI server (i.e., access device) with a malicious payload, and then sends an attack request with a malicious JNDI payload to the visited server using the Log4j2 component; the service using the Log4j2 component in the visited server calls the lookup method, initiates a request to the malicious LADP / RMI server, and obtains the returned malicious Reference object from the response. The visited server parses the malicious Reference object and further loads and executes the malicious class based on the codebase address specified in the Reference; after the visited server executes the malicious command, the attacker can manipulate the victim server to perform various operations, including but not limited to reverse connection verification, taking out sensitive information, rebound shell, backdoor implantation, etc.
[0153] Since the essence of this vulnerability is a JNDI injection vulnerability, the attacker needs to execute arbitrary code, and the visited server must make at least two active external connections: the first is to request the Reference object, and the second is to load the malicious class. Therefore, for the active external connection behavior of the visited server, by identifying the field representing the target server from the connection information, when the field carries the public key of the visited server's intranet identifier, the field is decrypted based on the visited server's intranet private key to determine whether the target server matches any server identifier in the visited server's intranet server list, so that only the target server corresponding to the server identifier in the intranet server list is allowed to connect and send return information; when there is no private key in the field representing the target server, or the decryption result cannot be successfully matched with any server identifier in the visited server's intranet server list, it means that the target server to be connected is an unfamiliar server, and there is a risk of active external connection, so the connection between the visited server and the target server is blocked and the visited server is prevented from sending return information to the target server, so that the active external connection vulnerability cannot be successfully exploited.
[0154] In some embodiments, the firewall server can also adopt different blocking strategies for the IP addresses of abnormal access devices according to the IP addresses of different attributes corresponding to the abnormal access devices, obtain the network address attributes of the abnormal access devices, wherein the network address attributes include personal network addresses, enterprise network addresses and cloud server addresses; count the network request volume of each access device in the current time window; in response to the access device being a personal network address and the network request volume being greater than a first request volume threshold, block the network request of the access device in a subsequent time window, wherein the subsequent time window is later than the current time window; in response to the access device being a personal network address and the network request volume being less than a first request volume threshold, block the network request of the access device in a subsequent time window, wherein the subsequent time window is later than the current time window; or equal to the first request volume threshold, allowing the visited server to respond to the network request of the access device in the subsequent time window, and allowing the visited server to establish a connection with the access device; in response to the access device being an enterprise network address and the network request volume being greater than the second request volume threshold, blocking the network request of the access device in the subsequent time window; in response to the access device being an enterprise network address and the network request volume being less than or equal to the second request volume threshold, allowing the visited server to respond to the network request of the access device in the subsequent time window, and allowing the visited server to establish a connection with the access device; in response to the access device being a cloud server address, blocking the network request of the access device in the subsequent time window.
[0155] Blocking means that the accessed server refuses to establish a connection with the access device after receiving the network request. When the network address corresponding to the abnormal access device is a personal network address, the network request volume of the access device in the current time window is used as the number of attacks on the access device corresponding to the personal network address. When the number of attacks is greater than the first request volume threshold, the personal network address is permanently blocked, that is, the IP is prohibited from accessing the accessed device. For example, the first request volume threshold can be 50 times, 100 times, etc. When the network address corresponding to the abnormal access device is an enterprise network address, the network request volume of the access device in the current time window is used as the number of attacks on the access device corresponding to the enterprise network address. When the number of attacks is greater than the second request volume threshold, the enterprise network address is permanently blocked. For example, the second request volume threshold can be 20 times, 45 times, etc. The second request volume threshold can be the same as the first request volume threshold or different. When the network address corresponding to the abnormal access device is a cloud server address, once an attack network request is detected, the IP is directly blocked, thereby achieving different IP blocking strategies for different network address attributes of abnormal access devices, which can effectively protect network security.
[0156] In some embodiments, in response to the address of the access device being a personal network address, other personal network addresses located in the same area as the access device are obtained; in response to the other personal network addresses being abnormal access devices and the network request volume of the other personal network addresses in the current time window being greater than a third request volume threshold, all network requests of the other personal network addresses are blocked.
[0157] For example, if IP1 is a personal network address, and the access device A corresponding to IP1 has attacked the visited server before, then the access device B corresponding to IP2 located in the same area as IP1 will also be considered a risky device. Here, the same area means that IP1 and IP2 belong to the same subnet or are in the same network segment, or the geographical locations corresponding to IP1 and IP2 are within 100 meters apart; when the access device B also attempts to attack the visited server within the current time window, and the network request volume of the access device B to the visited server within the current time window is greater than the third request volume threshold, IP2 is permanently banned. For example, the third request volume threshold can be 10 times or 15 times. The third request volume threshold can be the same as or different from the second request volume threshold or the first request volume threshold.
[0158] In some embodiments, the firewall server can also copy the actual access traffic to the same visited server within the same time window as a traffic copy, wherein the traffic copy is used to simulate the real business operating environment of the visited server; apply the interception defense strategy to be detected on the traffic copy to obtain the detection result access device of the interception defense strategy.
[0159] Through the bypass capability, a copy of the actual access traffic to the same accessed server in the same time window is copied as a traffic copy, which is used for development, testing, and debugging work such as interception and defense strategy debugging and interception and defense strategy pre-launch testing, etc., which can simulate the real business environment without affecting the real business operation. After the test is passed on the traffic copy, the interception and defense strategy can be directly launched to the formal business environment, thus ensuring the stability, security, and convenience of the formal business environment.
[0160] It should be noted that the network security protection method provided in the embodiment of the present application is implemented through a virtual patch at the network layer. The virtual patch at the network layer is used to be deployed in the firewall of the server, so it can quickly respond to various vulnerabilities and network attacks. When a new type of network attack occurs, it is only necessary to adjust the protection strategy in time, thereby avoiding waiting for the installation of the patch package from the developer. In addition, server vulnerabilities can be repaired through virtual patches without changing the server environment, which greatly reduces the work of testing and deploying patches.
[0161] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0162] Since the world-renowned open source log component Apache Log4j was exposed to have a serious high-risk remote code execution vulnerability, cyber attackers have repeatedly tried to exploit this vulnerability to execute malicious code attacks, and all types of online applications, open source software, cloud platforms, and email services may face network security risks. The impact of this vulnerability lasts for a long time. In the next decade, the vulnerable version will still exist in computer systems for a long time. The impact of this vulnerability is also wide-ranging, affecting more than 60,000 open source software and more than 300,000 open source software packages worldwide. In addition, the vulnerability is extremely harmful, and once a computer is attacked, it will cause great losses.
[0163] If only the vulnerability is repaired, not only will a high repair cost be required, but the vulnerability repair also involves the underlying infrastructure. The overall repair is difficult and the repair cycle is long. During the repair period, network attackers may still attack the vulnerability. Therefore, for high-risk 0day vulnerabilities such as log4j, which are more dangerous, have more attackable targets, and have a low threshold for exploitation, the embodiment of the present application provides a network layer virtual patch solution. Through the network layer SAAS virtual patch system and the technical architecture of simultaneous deployment of multiple defense strategies, it can effectively protect the enterprise's inbound and outbound traffic with a simple and low-cost deployment mode, multiple effective defense strategies, and a safe and reliable bypass detection mode. In addition, different observation modes and interception modes can be used to protect different scenarios.
[0164] Scenario 1) Use the ARIMA algorithm to help quickly warn of abnormal network requests and promptly find the IP or domain name corresponding to the abnormal access request for focused detection.
[0165] First, we collect network requests initiated by external networks against enterprises on an hourly basis. The collected data dimensions are: 1) Request line: including request method, URL field, and HTTP / HTTPS version data; 2) Request header: including Accept, Accept-Charset, Accept-Encoding, Content-Length, Host, and Cookie data; 3) Request body: data submitted by the network request. Then, for the collected network request data, the IP / domain names corresponding to the network requests that appear more than a preset value (for example, 500 times) per hour are selected, and time series are generated based on the number of network requests initiated by these IP / domain names to the enterprise in the past period of time (for example, 14 days). The time series corresponding to each IP / domain name is input into the AR model or ARMA model, or the time series is differentiated and input into the ARIMA model for prediction to obtain the predicted number of visits for each IP / domain name in this hour, and then the ratio or difference between the predicted number of visits and the actual number of visits is calculated, and the IP / domain names with a ratio greater than a ratio threshold or a difference greater than a difference threshold are selected, and sorted in descending order based on the ratio or difference, and the IP / domain names corresponding to the ratio or difference of a preset proportion or a preset number starting from the head in the sorting result are taken as abnormal IP / domain names, and then the data of multiple dimensions contained in the network requests of the abnormal IP / domain names within this hour are manually analyzed to determine whether there is a network attack.
[0166] Scenario 2) Intercept network attack requests through keyword detection.
[0167] See also Figure 4 and Figure 5 , Figure 4 It is a schematic diagram of the principle of the network layer virtual patch provided in the embodiment of the present application; Figure 5 is a flowchart of a network security protection method provided by an embodiment of the present application, Figure 4 H 1 To access the device, H 2 For the visited server, under normal circumstances, such as Figure 5 In step 1 of the above, the network request of the access device will be sent to the accessed server in the form of IP datagram through the network layer of the access device. Before the network request reaches the accessed server, it will first pass through the enterprise unified access layer and the external network card. The enterprise unified access layer is Figure 4 In the network layer, there is a Web application vulnerability firewall in the enterprise unified access layer. The Web application vulnerability firewall is equipped with a network layer virtual patch. The network layer virtual patch includes a variety of defense strategies. Figure 5Defense Strategy 1, Defense Strategy 2, Defense Strategy 3, and Defense Strategy 4 are exemplified in the figure. Therefore, the network layer virtual patch can use defense strategy 1, that is, keyword detection and blocking strategy, so that the network request sent by the attacker with the network attack keyword cannot reach the back-end server, that is, the attacker's network request is detected and intercepted before entering the enterprise network to block the subsequent attack process. The blocking strategy in the network layer virtual patch can detect the vast majority of attack vulnerabilities with request characteristics that have been discovered and analyzed, such as common code execution vulnerabilities, command execution vulnerabilities, Jenkins arbitrary file read vulnerabilities (CVE-2018-1999002), Grafana file read vulnerabilities (CVE-2021-43798), etc.
[0168] Taking the Jenkins arbitrary file read vulnerability (CVE-2018-1999002) as an example, this vulnerability will contain the ".. / " information in the Accept-Language in the request header. Therefore, one of the keyword detection defense strategies in the network layer virtual patch is to detect whether the Accept-Language in the request header of all network requests contains the ".. / " information. If a network request containing the ".. / " information in the request header is detected, the network request is intercepted, thereby blocking the network attack. Another example is the log4j code execution vulnerability (CVE-2021-44228). The characteristic of this vulnerability is that the request header of the attack request contains an attack feature in the form of "${jndi:", or contains a deformed attack feature in the form of "${lower:${upper:", such as "${${lower:jndi}:${lower:rmi}: / / adsasd.asdasd.asdasd / poc}", "${${lower:${lower:jndi}}:${lower:rmi}: / / adsasd.asdasd.asdasd / poc}", "${${lower:j}${lower:n}${lower:d}i:${lower:rmi}: / / adsasd.asdasd.asdasd / poc}", etc. Therefore, the keyword detection defense strategy can detect such attack feature keywords and block the attack request. Figure 5 as shown in step 2.
[0169] After the firewall server intercepts the attack request through the network layer virtual patch defense strategy 1, the normal network request passes Figure 5 Step 3 in the above process successfully reaches the visited entity's intranet server in the business operation environment, and then the visited entity's intranet server responds to the network request and sends a return message to the access device, that is, Figure 5 In step 4 shown in the figure, the network layer virtual patch will be used again at this time. The network layer virtual patch can be used through defense strategy 2, that is, through the keyword detection defense strategy to detect and intercept keywords for sensitive information error vulnerabilities on error pages. The characteristics of this type of vulnerability are sending non-existent files or paths, files or paths that are not authorized to be viewed, or non-existent parameters or specially constructed strings, such as single quotes, angle brackets, etc., to the interviewed subject, triggering the interviewed server to generate an error page or abnormal information and send an echo message to the attacker. Since the echo information may contain sensitive information such as the version information of the Web middleware, database connection information, SQL statements, personal information, or the path of sensitive files, it poses a greater risk to network security.
[0170] If the network layer virtual patch fails to intercept the attack request through the existing strategy before the attacker's attack request enters the enterprise network, for the above echo information, that is, the result returned in the original session, the network layer virtual patch can detect the defense strategy through the above keyword detection to detect whether there is error information such as the version information of the website or server's Web middleware, database connection information, etc. in the return result of the session. For example, for Python error information, it will detect whether the echo content contains Traceback (most recent call last) content. If this keyword exists, it is considered that the error information has the risk of sensitive information leakage. The network layer virtual patch will block the echo of the error information and replace the content of the error page with the content of the 501 page, thereby preventing sensitive information leakage.
[0171] Scenario 3) Block external connection vulnerabilities through active external connection control of network layer virtual patches.
[0172] In addition, an attacker can Figure 5Step 5 in the above example establishes a connection between the server in the business operation environment and the external hacker server, so that the server in the business operation environment executes the command of the attack request by sending an attack request to the visited server, and then performs damage or obtains information in the enterprise intranet, and then communicates with the outside by establishing a new connection, instead of going through the enterprise unified access layer and the external network card. Taking the log4j code execution vulnerability (CVE-2021-44228) as an example, the attacker first sends an attack request with a malicious JNDI payload to the visited server using the Log4j2 component, and then the service using the Log4j2 component in the visited server calls the lookup method to initiate a request to the LADP / RMI server with a malicious payload pre-deployed by the attacker, and obtains the malicious Reference object returned by the LADP / RMI server from the response. After that, the visited server parses the malicious Reference object, and further loads and executes the malicious class based on the codebase address specified in the Reference. After the visited server implements command execution, the attacker can manipulate the visited server to perform various operations, including but not limited to reverse connection verification, taking out sensitive information, rebound shell, backdoor implantation and other high-risk behaviors.
[0173] Since this type of attack vulnerability will generate active RMI, LDAP and other external connection behaviors when the attack is exploited, the network layer virtual patch adopts defense strategy 3 before the connection occurs, that is, first confirm whether the target machine of the external connection is a company intranet machine, that is, determine whether the machine to be connected has a secret key with the company intranet logo. If there is a secret key, read the secret key and decrypt it according to the company's unified public key. After decryption, search in the company's server list to confirm whether the machine is a company intranet machine. If there is no key or the machine is not a company intranet machine, intercept the connection and issue an alarm for the connection.
[0174] Scenario 4) Simulate the real business environment through bypass traffic mode to develop, test and debug the interception defense strategy.
[0175] For multiple network requests of the interviewed entity in the above scenarios 1) to 3), the network layer virtual patch will copy the network requests within the preset time window, generate a traffic copy, and then develop, test and debug the above-mentioned multiple interception defense strategies in the traffic copy. After the test is passed in the traffic copy, it will be directly put online to the real business environment, thereby ensuring the stability, security and convenience of the real business environment and avoiding affecting the real business operation.
[0176] Scenario 5) Network layer virtual patching allows flexible mode adjustments for multiple interception defense strategies.
[0177] The network layer virtual patch flexibly adjusts the modes of various interception defense strategies in scenarios 1) to 3). The modes are divided into observation mode and interception mode. The observation mode only alerts the discovered network attack requests and prompts the user. The user can manually handle the alert and choose not to alert or permanently intercept the IP or domain name corresponding to the network attack request; the interception mode is divided into three different protection granularities, namely loose mode (false alarm rate less than 0.001%), standard mode (false interception rate less than 0.01%), and strict mode (interception accuracy higher than 99.999%). The loose mode has a coarse protection granularity and only intercepts requests with obvious attack features. It is mainly suitable for false alarm detection scenarios, such as scenarios with a false alarm rate requirement of less than 0.001%. The loose mode only intercepts vulnerabilities that explicitly use keywords and key parameters to attack. Such vulnerabilities have obvious attack messages and attack behaviors, such as Spark REST. API unauthorized access vulnerability (CVE-2018-11770), Jenkins remote command execution vulnerability (CVE-2018-1000861), etc.; Standard mode is mainly suitable for normal operation and maintenance scenarios (the false interception rate is required to be less than 0.01%, such as external connection scenarios such as enterprises, governments, and families). Standard mode will detect attacks against various vulnerabilities, such as SQL injection, XSS cross-site scripting, remote overflow attacks, file inclusion, Bash vulnerability attacks, remote command execution, directory traversal, sensitive file access, command / code injection and other attacks. The intercepted vulnerability types include Oracle WebLogic Server remote code execution (CVE-2020-2551), Microsoft WindowsRDPClient remote code execution (CVE-2020-1374), etc.; Strict mode has the finest protection granularity. Based on the loose mode and standard mode, strict mode can intercept attack requests with complex bypass features, such as jolokia network attacks, detecting CGI vulnerabilities, and detecting Druid. SQL injection attacks, etc. It is suitable for scenarios with high requirements for security protection underreporting (the interception accuracy rate reaches 99.999%). It mainly focuses on some high-risk risks such as buffer overflows, as well as attacks that require keyword matching, keyword offset, etc. It intercepts vulnerability types such as Nginx 0-Length Headers Leak Denial of Service (CVE-2019-9516). It is suitable for scenarios such as security drills, security attacks or major events for enterprises and governments.
[0178] Scenario 6) Network layer virtual patching can dynamically block malicious IP addresses.
[0179] The network layer hot patch will dynamically block IPs based on their attack behaviors through defense strategy 4. For example, if IP1 has a high number of attacks and attack frequency, or the IP source is abnormal, the blocked IP objects can be IDC server export IP, office export IP, and personal IP. The blocking strategy can also be adjusted dynamically. For example, if a certain IP attacks 50 times / day, it will be blocked, or if the IP is changed to IDC server export IP, it will be blocked. In addition, for personal IPs, the network layer virtual patch also has a set of malicious judgment strategies, which calculates and evaluates the historical number of attacks and frequency of personal IPs and the source of the IP, and blocks IPs with malicious values (number of attacks or attack frequency) greater than the preset value and does not allow them to access. The IP source here refers to if IP1 has attacked the company's intranet before, then IP2 in the same area as IP1 will also be included in the danger list. If other normal IPs attack 50 times a day, they will be blocked, while dangerous IPs may be blocked if they attack 20 times a day. The threshold of the number of attacks can be adjusted according to actual conditions.
[0180] The following is a description of an exemplary structure of a network security protection device 433 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the network security protection device 433 of the memory 430 may include:
[0181] A detection module 4331 is used to detect the actual visits of at least one access device to the same visited server within a current time window; an acquisition module 4332 is used to obtain a time series of the access device, wherein the time series includes the historical visits of the access device to the visited server within multiple historical time windows, and the multiple historical time windows are earlier than the current time window; a first determination module 4333 is used to determine the predicted visits of the access device to the visited server within the current time window based on the time series of the access device; a second determination module 4334 is used to determine an abnormal indicator of the at least one access device based on the actual visits of the access device and the predicted visits of the access device; an identification module 4335 is used to identify an abnormal access device based on the abnormal indicators corresponding to the at least one access device.
[0182] In some embodiments, the detection module 4331 is also used to determine the access devices whose actual access volume is greater than the access volume threshold, and to treat the access devices whose actual access volume is greater than the access volume threshold as access devices that need to obtain the corresponding time series, so as to proceed to the step of obtaining the time series of the access devices.
[0183] In some embodiments, the first determination module 4333 is also used to obtain a time series model, wherein the parameters of the time series model are obtained by fitting the historical visits to the visited server within the historical time window; the time series is substituted into the time series model to obtain the predicted visits of the access device to the visited server within the current time window.
[0184] In some embodiments, the first determination module 4333 is also used to read from the time series, in chronological order, the historical visits of the access device to the visited server in a first number of historical time windows, wherein the first number is the same as the order of the first autoregressive model; weightedly sum the historical visits corresponding to each historical time window in the first number of historical time windows based on the first autoregressive coefficient to obtain a first summation result; add the first summation result, the first random error and the white noise to obtain a first calculation result, and use the first calculation result as the predicted visits of the access device to the visited server in the current time window.
[0185] In some embodiments, the first determination module 4333 is also used to read, from the time series, in chronological order, the historical visits of the access device to the visited server in a second number of historical time windows, respectively, wherein the second number is the same as the order of the second autoregressive model; read, from the time series, in chronological order, the historical visits of the access device to the visited server in a third number of historical time windows, respectively, and determine the random disturbance value of each of the historical visits, wherein the third number is the same as the order of the first sliding average model; perform weighted summation of the historical visits corresponding to each historical time window in the second number of historical time windows based on the second autoregressive coefficient to obtain a second summation result; perform weighted summation of the random disturbance value of each of the historical visits based on the first sliding average coefficient to obtain a third summation result; perform summation of the second summation result, the third summation result and the second random error to obtain a third calculation result, and use the third calculation result as the predicted visits of the access device to the visited server in the current time window.
[0186] In some embodiments, the first determination module 4333 is further used to, in response to the time series satisfying the stationarity requirement, directly use the time series as a stationary time series; in response to the time series not satisfying the stationarity requirement, perform differential processing on the time series to obtain a stationary time series; read the historical access volume of the access device to the visited server in a fourth number of historical time windows from the stationary time series in chronological order; read the historical access volume of the access device to the visited server in a fifth number of historical time windows from the stationary time series in chronological order, and determine the random disturbance value of each of the historical access volumes, wherein , the fourth quantity is the same as the order of the third autoregressive model, and the fifth quantity is the same as the order of the second sliding average model; based on the third autoregressive coefficient, the historical access volume corresponding to each historical time window in the historical time window of the fourth quantity is weightedly summed to obtain a fourth summation result; based on the second sliding average coefficient, the random disturbance value of each historical access volume is weightedly summed to obtain a fifth summation result; the fourth summation result, the fifth summation result and the third random error are added together to obtain a fourth calculation result, and the fourth calculation result is used as the predicted access volume of the access device for the visited server in the current time window.
[0187] In some embodiments, the first determination module 4333 is also used to perform a unit root test on the time series to obtain a test result; in response to the test result indicating that there is no unit root in the time series, it is determined that the time series meets the stationarity requirement; in response to the test result indicating that there is a unit root in the time series, it is determined that the time series does not meet the stationarity requirement.
[0188] In some embodiments, the first determination module 4333 is also used to set n as an integer variable increasing from 1, with a value range satisfying 1≤n≤N-1, N is the fourth number, and iterate n to perform the following processing: subtract the historical visits in the nth time window from the historical visits in the n+1th time window to obtain the nth difference, and use the nth difference as the new historical visits in the nth time window, wherein the time interval between the nth time window and the current time window is less than the time interval between the n+1th time window and the current time window; and combine the new historical visits in the 1st time window to the N-1th time window into the stationary time series in chronological order.
[0189] In some embodiments, the second determination module 4334 is further used to determine the absolute value of the difference between the actual number of visits and the predicted number of visits, or to determine the ratio of the actual number of visits to the predicted number of visits; and to determine the absolute value of the difference or the ratio as an abnormal indicator of the at least one access device.
[0190] In some embodiments, the identification module 4335 is further used to sort the abnormal indicators in descending order, and use the access devices corresponding to the abnormal indicators of a preset number or a preset proportion starting from the head in the sorting result as the abnormal access devices.
[0191] In some embodiments, the identification module 4335 is also used to process network requests for the abnormal access device based on any one of an observation mode and an interception mode; wherein the observation mode is used for false alarm detection scenarios; the interception mode includes a loose mode, a standard mode and a strict mode, and the loose mode is used for vulnerability detection scenarios; the standard mode is used to control the false interception rate of network requests for the abnormal access device to be less than a second preset ratio; and the strict mode is used for false alarm detection scenarios.
[0192] In some embodiments, the identification module 4335 is also used to perform the following processing for each network request of an access device detected within the current time window: matching the header of the network request with a first vulnerability library, wherein the first vulnerability library includes multiple attack keywords corresponding to network vulnerabilities; in response to a successful match between the header of the network request and any one of the attack keywords in the first vulnerability library, blocking the network request and identifying the access device as an abnormal access device.
[0193] In some embodiments, the identification module 4335 is also used to receive the return information generated by the visited server for the network request; match the return information with a second vulnerability library, wherein the second vulnerability library includes multiple error vulnerability keywords; in response to the return information being error information, and the return information successfully matches any one of the error vulnerability keywords in the second vulnerability library, replace the return information with blank information; return the blank information to the access device, and identify the access device as an abnormal access device.
[0194] In some embodiments, the identification module 4335 is also used in the method according to claim 12, characterized in that after receiving the return information generated by the visited server for the network request, the method also includes: receiving connection information sent by the target server, wherein the target server is used to establish a connection with the visited server and receive the return information; identifying a field representing the target server from the connection information; in response to the field including a public key carrying the intranet identifier of the visited server, decrypting the field based on the intranet private key of the visited server to obtain a decryption result; in response to the decryption result successfully matching any one of the server identifiers in the intranet server list of the visited server, allowing the visited server to send the return information to the target server; in response to the absence of a private key in the field, or the decryption result cannot successfully match any one of the server identifiers in the intranet server list of the visited server, blocking the visited server from sending the return information to the target server.
[0195] In some embodiments, the identification module 4335 is further used to obtain the network address attributes of the abnormal access device, wherein the network address attributes include a personal network address, an enterprise network address, and a cloud server address; count the network request volume of each access device in the current time window; in response to the access device being a personal network address and the network request volume being greater than a first request volume threshold, block the network request of the access device in a subsequent time window, wherein the subsequent time window is later than the current time window; in response to the access device being a personal network address and the network request volume being less than or equal to the first request volume threshold, allow the accessed server to respond to the access device The method comprises the following steps: blocking the network request of the access device within the subsequent time window and allowing the accessed server to establish a connection with the access device; in response to the access device being an enterprise network address and the network request volume being greater than a second request volume threshold, blocking the network request of the access device within the subsequent time window; in response to the access device being an enterprise network address and the network request volume being less than or equal to the second request volume threshold, allowing the accessed server to respond to the network request of the access device within the subsequent time window and allowing the accessed server to establish a connection with the access device; in response to the access device being a cloud server address, blocking the network request of the access device within the subsequent time window.
[0196] In some embodiments, the identification module 4335 is also used to, in response to the address of the access device being a personal network address, obtain other personal network addresses located in the same area as the access device; in response to the other personal network address being the abnormal access device and the network request volume of the other personal network address within the current time window being greater than the third request volume threshold, block all network requests of the other personal network address.
[0197] In some embodiments, the identification module 4335 is also used to copy the actual access traffic to the same visited server within the same time window as a traffic copy, wherein the traffic copy is used to simulate the actual business operation environment of the visited server; and apply the interception defense strategy to be detected on the traffic copy to obtain the detection result access device of the interception defense strategy.
[0198] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0199] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the network security protection method described in the embodiment of the present application.
[0200] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the network security protection method provided by the present application embodiment, for example, Figure 3A The network security protection method shown.
[0201] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0202] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0203] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0204] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0205] To sum up, through the embodiments of the present application, the present application can determine the predicted access volume of the access device to the visited server within the current time window based on the time series of the access device, and can effectively predict the access frequency of the access device within the current time window, and then determine the abnormality index based on the predicted access volume and the actual access volume within the current time window, and then identify whether the access device is abnormal based on the abnormal index, thereby ensuring that when the visited server is subjected to various types of network attacks, the abnormal access device that sends the network attack is detected in time, so as to facilitate the subsequent key detection or interception of the network requests sent by the abnormal access device.
[0206] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A network security protection method, characterized in that: The method comprises: Detecting actual access volume of at least one access device to the same accessed server within a current time window; Acquire a time series of the access device, wherein the time series includes a historical number of visits of the access device to the visited server in a plurality of historical time windows, and the plurality of historical time windows are earlier than the current time window; Determine, based on the time series of the access device, the predicted access volume of the access device to the accessed server within the current time window; Determine an abnormality indicator of the at least one access device based on the actual access volume of the access device and the predicted access volume of the access device; An abnormal access device is identified based on the abnormal indicators respectively corresponding to the at least one access device.
2. The method according to claim 1, characterized in that: The step of determining the predicted number of visits of the access device to the visited server within the current time window based on the time series of the access device includes: Acquire a time series model, wherein parameters of the time series model are obtained by fitting the historical access volume to the visited server within the historical time window; Substitute the time series into the time series model to obtain the predicted access volume of the access device to the accessed server within the current time window.
3. The method according to claim 2, characterized in that The type of the time series model includes an autoregressive model, and the parameters of the autoregressive model include: a first autoregressive model order, white noise, a first random error, and a first autoregressive coefficient; Substituting the time series into the time series model to obtain the predicted access volume of the access device to the accessed server within the current time window includes: Reading, from the time series, in chronological order, the historical access volume of the access device to the visited server in a first number of historical time windows, wherein the first number is the same as the order of the first autoregressive model; Based on the first autoregressive coefficient, weighted summation is performed on the historical visit volume corresponding to each historical time window in the first number of historical time windows to obtain a first summation result; The first summation result, the first random error and the white noise are added together to obtain a first calculation result, and the first calculation result is used as the predicted visit volume of the access device for the visited server in the current time window.
4. The method according to claim 2, characterized in that: The type of the time series model is an autoregressive moving average model, and the parameters of the autoregressive moving average model include a second autoregressive model order, a first moving average model order, a second random error, a second autoregressive coefficient, and a first moving average coefficient; Substituting the time series into the time series model to obtain the predicted access volume of the access device to the accessed server within the current time window includes: Reading, from the time series, in chronological order, the historical access volume of the access device to the visited server in a second number of historical time windows, wherein the second number is the same as the order of the second autoregressive model; Reading, from the time series, in chronological order, the historical access volume of the access device to the visited server in a third number of historical time windows, and determining a random disturbance value of each of the historical access volumes, wherein the third number is the same as the order of the first sliding average model; Based on the second autoregressive coefficient, weighted summing is performed on the historical visit volume corresponding to each historical time window in the second number of historical time windows to obtain a second summing result; Performing weighted summation on the random disturbance value of each of the historical visits based on the first sliding average coefficient to obtain a third summation result; The second summation result, the third summation result and the second random error are added together to obtain a third calculation result, and the third calculation result is used as the predicted visit volume of the access device for the visited server in the current time window.
5. The method according to claim 2, characterized in that: The type of the time series model is a differential integrated moving average autoregressive model, and the parameters of the differential integrated moving average autoregressive model include a third autoregressive model order, a second moving average model order, a third random error, a third autoregressive coefficient, a second moving average coefficient, and the number of differences; Substituting the time series into the time series model to obtain the predicted access volume of the access device to the accessed server within the current time window includes: In response to the time series satisfying a stationary requirement, directly treating the time series as a stationary time series; In response to the time series not meeting the stationarity requirement, performing a difference process on the time series to obtain a stationary time series; Reading, from the stable time series, the historical access volume of the access device to the visited server in a fourth number of historical time windows in a chronological order; Reading, in chronological order, from the stationary time series, the historical access volume of the access device to the visited server in a fifth number of historical time windows, and determining a random disturbance value of each of the historical access volumes, wherein the fourth number is the same as the order of the third autoregressive model, and the fifth number is the same as the order of the second moving average model; Based on the third autoregressive coefficient, weighted summation is performed on the historical visit volume corresponding to each historical time window in the fourth number of historical time windows to obtain a fourth summation result; Performing weighted summation on the random disturbance value of each of the historical visits based on the second sliding average coefficient to obtain a fifth summation result; The fourth summation result, the fifth summation result and the third random error are added together to obtain a fourth calculation result, and the fourth calculation result is used as the predicted visit volume of the access device for the visited server in the current time window.
6. The method according to claim 5, characterized in that The method further comprises: Performing a unit root test on the time series to obtain a test result; In response to the test result indicating that the time series does not have a unit root, determining that the time series meets a stationarity requirement; In response to the test result indicating that a unit root exists in the time series, it is determined that the time series does not meet a stationarity requirement.
7. The method according to claim 5, characterized in that The step of performing difference processing on the time series to obtain a stationary time series includes: Let n be an integer variable increasing from 1, with a value range satisfying 1≤n≤N-1, and N be the fourth number. Iterate n and perform the following processing: The historical visits in the nth time window are subtracted from the historical visits in the n+1th time window to obtain the nth difference value, and The nth difference is used as the new historical visit volume in the nth time window, wherein the time interval between the nth time window and the current time window is smaller than the time interval between the n+1th time window and the current time window; In chronological order, the new historical page views in the 1st time window to the N-1th time window are combined into the stationary time series.
8. The method according to claim 1, characterized in that The determining the abnormal index of the at least one access device based on the actual access volume of the access device and the predicted access volume of the access device includes: Determine an absolute value of a difference between the actual number of visits and the predicted number of visits, or determine a ratio of the actual number of visits to the predicted number of visits; determining an absolute value of the difference or the ratio as an abnormality indicator of the at least one access device; The identifying an abnormal access device based on the abnormal indicators respectively corresponding to the at least one access device includes: The abnormal indicators are sorted in descending order, and access devices corresponding to a preset number or a preset proportion of abnormal indicators starting from the head in the sorting result are taken as the abnormal access devices.
9. The method according to claim 1, characterized in that: After the abnormal access device is identified based on the abnormal indicators respectively corresponding to the at least one access device, the method further includes: Based on any one of an observation mode and an interception mode, processing a network request for the abnormal access device; Among them, the observation mode is used to alarm and prompt the network request of the abnormal access device; the interception mode includes loose mode, standard mode and strict mode, the loose mode is used for false alarm detection scenarios; the standard mode is used for vulnerability detection scenarios; the strict mode is used for missed alarm detection scenarios.
10. The method according to claim 1, characterized in that Before acquiring the time sequence of the access device, the method further includes: Determine the access device whose actual access volume is greater than the access volume threshold, and take the access device whose actual access volume is greater than the access volume threshold as the access device that needs to obtain the corresponding time series, so as to enter the step of obtaining the time series of the access device.
11. The method according to claim 1, characterized in that: The method further comprises: For each network request from an access device detected within the current time window, the following processing is performed: Matching the header of the network request with a first vulnerability library, wherein the first vulnerability library includes a plurality of attack keywords corresponding to network vulnerabilities; In response to a successful match between the header of the network request and any one of the attack keywords in the first vulnerability library, the network request is blocked, and the access device is identified as an abnormal access device.
12. The method according to claim 11, characterized in that The method further comprises: Receiving return information generated by the visited server for the network request; Matching the returned information with a second vulnerability library, wherein the second vulnerability library includes a plurality of error reporting vulnerability keywords; In response to the returned information being error information, and the returned information successfully matching any one of the error vulnerability keywords in the second vulnerability library, replacing the returned information with blank information; The blank information is returned to the access device, and the access device is identified as an abnormal access device.
13. The method according to claim 12, characterized in that After receiving the return information generated by the visited server for the network request, the method further includes: Receiving connection information sent by a target server, wherein the target server is used to establish a connection with the visited server and receive the return information; Identifying a field representing the target server from the connection information; In response to the field including a public key carrying the intranet identifier of the visited server, decrypting the field based on the intranet private key of the visited server to obtain a decryption result; In response to the decryption result successfully matching any one of the server identifiers in the intranet server list of the visited server, allowing the visited server to send the return information to the target server; In response to the absence of a private key in the field, or the decryption result cannot be successfully matched with any server identifier in the intranet server list of the visited server, the visited server is blocked from sending the return information to the target server.
14. The method according to claims 1 to 13, characterized in that The method further comprises: Acquire the network address attributes of the abnormal access device, wherein the network address attributes include a personal network address, an enterprise network address, and a cloud server address; Counting the amount of network requests of each access device within the current time window; In response to the access device being a personal network address and the network request volume being greater than a first request volume threshold, blocking the network request of the access device in a subsequent time window, wherein the subsequent time window is later than the current time window; In response to the access device being a personal network address and the network request volume being less than or equal to the first request volume threshold, allowing the accessed server to respond to the network request of the access device within the subsequent time window, and allowing the accessed server to establish a connection with the access device; In response to the access device being an enterprise network address and the network request volume being greater than a second request volume threshold, blocking the network request of the access device within the subsequent time window; In response to the access device being an enterprise network address and the network request volume being less than or equal to the second request volume threshold, allowing the accessed server to respond to the network request of the access device within the subsequent time window, and allowing the accessed server to establish a connection with the access device; In response to the access device being a cloud server address, blocking network requests of the access device within the subsequent time window.
15. The method according to claim 14, characterized in that The method further comprises: In response to the address of the access device being a personal network address, acquiring other personal network addresses located in the same area as the access device; In response to the other personal network address being the abnormal access device and the network request volume of the other personal network address in the current time window being greater than the third request volume threshold, all network requests of the other personal network address are blocked.
16. The method according to any one of claims 1 to 15, characterized in that The method further comprises: Copying actual access traffic to the same visited server within the same time window as a traffic copy, wherein the traffic copy is used to simulate the real business operation environment of the visited server; Apply the interception defense strategy to be detected on the traffic copy to obtain a detection result access device of the interception defense strategy.
17. The method according to any one of claims 1 to 15, characterized in that The network security protection method is implemented through a virtual patch at the network layer, and the virtual patch is used to be deployed in the firewall of the server.
18. A network security protection device, characterized in that: The device comprises: A detection module, used to detect the actual access volume of at least one access device to the same accessed server within a current time window; An acquisition module, configured to acquire a time series of the access device, wherein the time series includes a historical number of visits of the access device to the accessed server in a plurality of historical time windows, wherein the plurality of historical time windows are earlier than the current time window; A first determination module, configured to determine, based on a time series of the access device, a predicted number of visits of the access device to the accessed server within a current time window; A second determination module, configured to determine an abnormality index of the at least one access device based on the actual access volume of the access device and the predicted access volume of the access device; The identification module is used to identify abnormal access devices based on the abnormal indicators respectively corresponding to the at least one access device.
19. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; The processor is used to implement the network security protection method described in any one of claims 1 to 17 when executing the computer executable instructions or computer programs stored in the memory.
20. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the network security protection method described in any one of claims 1 to 17 is implemented.
21. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the network security protection method described in any one of claims 1 to 17 is implemented.
