Mimicry WAF construction methodTechnical Field
The invention belongs to the technical field of network security, and particularly relates to a mimicry WAF construction method.
Background
In recent years, the united states has planned to deploy "change game rules" cyber security defense techniques, proposing mobile target defense, aiming to build dynamics, heterogeneity and uncertainty to increase the difficulty of attack of attackers. The mobile target defense can be implemented in a plurality of layers of networks, platform operating environments, software, data and the like, and comprises changeable IP addresses, changeable ports, randomness of executed codes, randomness of address spaces and the like.
Innovative active defense technologies such as mimicry defense, self-reconstruction credibility and mission guarantee are proposed by Cheng Jiangxing academicians and the like, important progress is made in the aspects of theoretical deduction, technical attack, principle verification and the like, code running state randomization is realized, and the active defense capability of an embedded environment is improved. The mimicry defense concept has good defense capability. Different from the traditional network defense means, the mimicry defense changes the operation or execution environment of a network information system by means of dynamic, randomization and active means, breaks through the embarrassment of the traditional network information security passive defense, converts the passive defense of 'sheep death reinforcement' type into the active defense which is difficult to detect, and changes the current situation of easy attack and difficulty in defending.
Waf (web Application firewall) is a product that provides protection specifically for web applications by enforcing a series of security policies against HTTP, HTTPs, called a web Application firewall. The WAF initial stage is based on the protection equipment of rule protection; the protection based on the rules can provide various safety rules of the web application, the WAF manufacturer maintains the rule base and updates the rule base in real time, and a user can comprehensively protect the application according to the rules. However, the method still has the problems that the protection rule base is maliciously bypassed, the self loophole of the WAF platform, the loophole of the operating system or the loophole of the cloud platform are utilized to attack and the like, so that the method faces serious security threats. In order to actively defend malicious attacks aiming at the WAF, the invention designs a dynamic selection module, a mimicry judgment module, an isomer construction module and the like to realize a mimicry WAF structure, and the WAF has active defense capability by carrying out isomerization processing on a cloud server, a virtualization container, an operating system in the container, a WAF platform, an interception rule and the like. When the flow passes through the dynamic selection module, the module can select k isomers from all WAF isomers to carry out flow processing, the abnormal rate of each isomer is modified by the judgment result after the processing result is judged by the mimicry judgment module, when the abnormal rate of a certain isomer is higher than a certain value, offline self-cleaning operation is carried out on the isomer, and finally, when the judgment result is that the flow passes, the flow is released; and when the judging result is that the traffic is not passed, forwarding the traffic to a subsequent processing module.
Disclosure of Invention
The invention aims to provide a mimicry WAF construction method aiming at the defects of the prior art. The invention optimizes the WAF framework and schedules the flow to the heterogeneous WAF container in the heterogeneous server, so that the WAF has heterogeneity, diversity and dynamics, the WAF safety is enhanced while the due function of the WAF is completed, and the attack success probability of an attacker is greatly reduced.
The purpose of the invention is realized by the following technical scheme: a method of mimetic WAF construction, the method comprising the steps of:
(1) building a plurality of WAF isomers, specifically:
(1.1) deploying M cloud servers E ═ Ei1,2, …, M }, where eiCarrying out isomerization processing on the E for the ith cloud server;
(1.2) deploying N micro-containers C ═ C on each cloud serverj1,2, …, N, where cjFor the jth micro-container, for each micro-container cjDeploying a heterogeneous operating system O, a heterogeneous WAF platform W and a heterogeneous rule base G, namely cj={(Oj,Wj,Gj)|j=1,2,…,N};
(2) When a user accesses the WAF, after flow is analyzed through DNS or load balance, a dynamic selection module randomly selects k isomers from M × N different WAF isomers, wherein k is less than or equal to M × N, the flow is distributed to the k WAF isomers to be subjected to rule matching, and the number of times that each WAF isomer is selected is set as AlWherein l is more than or equal to 1 and less than or equal to M x N, AlIs 0, each time the WAF isomer is selected, the corresponding AlAdding 1;
(3) after the k WAF isomers process the flow, sending the result to a mimicry judging module to judge the flow;
(4) when the rule matching result of the WAF isomer is inconsistent with the judgment result, the WAF isomer is considered to be brokenWhen abnormality occurs, the number of abnormality per WAF isomer is defined as Bl,BlIs 0, and B corresponding to the isomer having a difference is compared with the result of each WAF isomer according to the judgment resultlAdding 1;
(5) let the abnormality rate of each WAF isomer be DlThe calculation formula is Dl=Bl/AlWhen a mimicry judgment result is generated, updating the abnormal rate of each WAF isomer, and performing offline self-cleaning operation on a certain WAF isomer when the abnormal rate of the WAF isomer is higher than a set threshold value;
(6) when the mimicry decision result is passed, forwarding the flow to a back-end server S; and if the result is that the traffic flow does not pass, forwarding the traffic flow to a reject traffic flow processing module.
Further, in the step (2), the E is subjected to isomerization processing from the perspective of virtualization technology, an operating system, and micro-container software.
Further, the operating system includes Windows Server, CentOS, and Ubuntu.
Further, the virtualization techniques include kvm and Xen.
Further, the micro-container software includes Docker, Solaris Containers, and Podman.
Further, the reject flow processing module in the step (6) comprises a sandbox and a honeypot.
The invention has the following beneficial effects: the technical scheme of the invention adopts a mimicry defense idea, improves based on the performance and safety requirements of WAF, and provides a WAF construction method of dynamic heterogeneous redundancy, which has the following characteristics:
(1) by adopting the mimicry defense idea, the exploration and the understanding of the attacker on the internal characteristics of the target object can be disturbed, the WAF is prevented from being broken, and the cognition and the attack difficulty of the internal permeator and the external attacker on the WAF are increased.
(2) On the basis of effectively carrying out WAF security defense, the method of mimicry judgment is adopted, the correctness of flow filtration is ensured, and the false alarm rate is greatly reduced.
(3) Indexing in heterogeneous execution body cleaning moduleIncidence of anomaly DiAnd the heterogeneous executors with high abnormal rate are preferentially replaced, so that the system resources are saved, and the system availability is improved.
Drawings
FIG. 1 is a mimetic WAF architecture diagram.
Detailed Description
As shown in fig. 1, the mimicry WAF construction method provided by the invention is used for performing isomerization processing on a cloud server, a virtualization container, an operating system in the container, a WAF platform, an interception rule and the like, and designing a dynamic selection module, a mimicry arbitration module, an isomer construction module and the like to realize the mimicry WAF construction, so that malicious attacks against the WAF can be actively prevented. When the flow passes through the dynamic selection module, the module can select k isomers from all WAF isomers to carry out flow processing, after the processing result is judged by the mimicry judging module, the abnormal rate of each isomer is modified by the judging result, when the abnormal rate of a certain isomer is higher than a certain value, offline self-cleaning operation is carried out on the isomer, and finally, when the judging result is that the flow passes, the flow is released; when the judging result is that the flow is not passed, forwarding the flow to a subsequent processing module; the method comprises the following steps:
1. building a plurality of WAF isomers, specifically:
(1) deploying M cloud servers E ═ { E ═ Ei1,2, …, M }, where eiFor the ith cloud server, carrying out isomerization processing on the cloud server E from the perspectives of virtualization technology, an operating system, micro-container software and the like; the operating system of the Server on the cloud can select Windows Server, CentOS, Ubuntu and the like, the virtualization technology of the cloud selects kvm, Xen and the like, and the micro-container software selects Docker, Solaris contacts, Podman and the like.
(2) Deploying N micro containers C ═ C on each cloud serverj1,2, …, N, where cjFor the jth micro-container, for each micro-container cjDeploying a heterogeneous operating system O, a heterogeneous WAF platform W and a heterogeneous rule base G, namely cj={(Oj,Wj,Gj)|j=1,2,…,N}。
2. When a user accesses, after the flow is analyzed through DNS or load balancing, the module is dynamically selectedSelecting k isomers (k is less than or equal to M) from M N different WAF isomers at equal probability randomly, distributing flow to the k WAF isomers for regular matching, and setting the selected times of each WAF isomer as Al(1≤l≤M*N),AlIs 0, each time the WAF isomer is selected, the corresponding AlAnd adding 1.
3. And after the k WAF isomers process the flow, sending the result to a mimicry judging module, and judging the flow by the module.
4. When the rule matching result of the WAF isomer is inconsistent with the judgment result, the WAF isomer is considered to be abnormal, and the frequency of the abnormality of each WAF isomer is set as Bl(1≤l≤M*N),BlIs 0, and B corresponding to the isomer having a difference is compared with the result of each WAF isomer according to the judgment resultlAnd adding 1.
5. Let the abnormality rate of each WAF isomer be Dl(1 is more than or equal to l is less than or equal to M x N), and the calculation formula is Dl=Bl/AlAnd after the multi-mode judgment result is generated, updating the abnormal rate of each WAF isomer, and performing offline self-cleaning operation on a certain WAF isomer when the abnormal rate of the WAF isomer is higher than a set threshold value.
6. When the multi-mode decision result is passed, forwarding the flow to a back-end server S; if the result is not passed, the flow is forwarded to a flow rejection processing module, and the flow is processed by adopting a mode such as sandbox, honeypot and the like.
The invention optimizes the traditional WAF architecture, performs isomerization processing on a cloud server, a virtualization container, an operating system in the container, a WAF platform, an interception rule and the like, and enables the WAF to form a mimicry defense capability through structural change. Therefore, the method can disturb the search and understanding of the attacker on the internal characteristics of the target object, prevent the WAF from being broken, and increase the cognition and attack difficulty of the internal permeator and the external attacker on the WAF, thereby enhancing the safety of the WAF.