Cc attack protection method for Web application firewall

CN118890180APending Publication Date: 2024-11-01CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410918905.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-01

Smart Images

  • Figure CN118890180A_ABST
    Figure CN118890180A_ABST
Patent Text Reader

Abstract

The invention relates to a cc attack protection method for a Web application firewall. The method comprises the following steps: a client sends an access request, and a Web application firewall records related information; the server sends a response message, and the Web application firewall inserts a user-defined cc field containing the source IP information into the response message; the client identifies and analyzes the user-defined cc field in the response message; the client continues to send the Web request, and inserts a user-defined cc field containing client private network IP information into a request message; the Web application firewall identifies and analyzes the custom cc field in the Web request, and extracts the private network IP information of the client; and the Web application firewall performs cc judgment in combination with the client private network IP information and the source IP information, and if a request reaches a cc set threshold value, cc attack pre-judgment is triggered and alarm or interception is performed. According to the method, cc protection can be carried out more accurately, and unnecessary misjudgment is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Web application firewall protection methods, and in particular to a CC attack protection method for a Web application firewall. Background Art

[0002] In existing Internet applications, flood attacks are a common attack method used by hackers. Web application firewalls usually check the source IP address of the message for CC attacks, and set a rate check threshold for each source IP address. When the threshold is triggered, it is considered to be a CC attack and the relevant interception strategy is implemented.

[0003] However, in today's situation where IPv4 addresses are insufficient, NAT technology is used in many scenarios. In this way, there are multiple private IP addresses corresponding to one public IP address for business access, which significantly increases the access rate of this public IP address. When there is no CC attack behavior, it is mistakenly identified as a CC attack behavior by the Web Application Firewall, thereby erroneously starting the interception strategy. Summary of the invention

[0004] In order to overcome the above-mentioned defects of the existing Web application firewall CC attack protection method, the present invention proposes a new Web application firewall CC attack protection method.

[0005] When the Web application firewall needs to perform CC protection, this method adds a custom field in HTTP to determine whether NAT conversion is required, and performs CC judgment by combining private network address + public network address, so as to perform CC protection more accurately and avoid unnecessary misjudgment.

[0006] Specifically, the present invention provides a CC attack protection method for a Web application firewall, such as Figure 2 As shown, the method includes:

[0007] S1. A Web client sends a Web access request. After receiving the Web access request, the Web application firewall records the relevant information of the Web access request and forwards the Web access request to the Web server;

[0008] S2. The Web server sends a Web response message. When the Web response message reaches the Web application firewall, the Web application firewall inserts the custom cc field information into the Web response message. The custom cc field information contains the source IP information of the Web access request, and then sends the assembled Web response message to the Web client.

[0009] S3. After receiving the Web response message, the Web client identifies and parses the custom cc field. If it is found that the IP of the Web client is different from the source IP in the parsed Web response message, it can be determined that the address conversion is performed during the intermediate forwarding process;

[0010] S4. The Web client continues to send a Web request and inserts the custom cc field information into the Web request message. The custom cc field information includes the private IP information of the Web client.

[0011] S5. After receiving the Web request, the Web application firewall identifies and parses the custom cc field and extracts the Web client private network IP information contained in the custom cc field;

[0012] S6. The Web application firewall performs CC judgment based on the private IP information of the Web client and the source IP information of the Web request message; if the number of requests with the same private IP of the Web client and the source IP of the Web request message reaches the CC set threshold within the set time, the CC attack prediction is triggered and an alarm or interception is issued.

[0013] Furthermore, in the cc attack protection method of the Web application firewall of the present invention, the Web application firewall protects the domain name by means of a proxy, and cc protection is enabled in advance on the Web application firewall.

[0014] Furthermore, the relevant information of the Web access request described in step S1 of the cc attack protection method of the Web application firewall of the present invention includes but is not limited to: source IP information, destination IP information, destination port, and protocol;

[0015] The private network IP information of the Web client described in step S4 includes, but is not limited to: source IP information, destination IP information, destination port, and protocol.

[0016] Furthermore, in step S2 of the cc attack protection method of the web application firewall of the present invention, the web application firewall inserts the customized cc field information into the header of the web response message;

[0017] In step S4, the Web client inserts the customized cc field information into the header of the Web request message.

[0018] Furthermore, in step S3 of the cc attack protection method of the Web application firewall of the present invention, if the Web client cannot recognize the custom cc field, the field is ignored and the next step is performed.

[0019] Furthermore, in step S6 of the cc attack protection method of the Web application firewall of the present invention, if the request whose private network IP of the Web client is the same as the source IP of the Web request message does not reach the threshold set by cc within the set time, it is directly forwarded.

[0020] Furthermore, in the cc attack protection method of the web application firewall of the present invention, if the web client cannot recognize the custom cc field, the public network IP received by the web application firewall may carry the private network IP of the web client, or may not carry the private network IP of the client. In this case, the following method is used:

[0021] (1) Requests that do not carry the private IP address of the web client in the public IP address are processed separately according to the rate set by the CC. If the request reaches the threshold set by the CC, the CC attack prediction is triggered and an alarm or interception is issued;

[0022] (2) The public IP carries the request of the private IP of the web client. Only when the request rate of the private IP and the public IP reaches the threshold set by the CC at the same time, the CC attack prediction is triggered and an alarm or interception is issued.

[0023] On the other hand, the present invention also provides a CC attack protection system for a Web application firewall, which implements the steps of the CC attack protection method for the Web application firewall when the system is running.

[0024] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the above-mentioned CC attack protection method of the Web application firewall are implemented.

[0025] In summary, when the Web application firewall needs to perform CC protection, the method of the present invention determines whether NAT conversion is required by adding a custom CC field in the message, and performs CC judgment by combining private network address + public network address, so as to more accurately perform CC protection and avoid unnecessary misjudgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the description of the present invention. Obviously, the following drawings are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 A schematic diagram of an implementation architecture of an embodiment of the present invention.

[0028] Figure 2 It is a flow chart for implementing the method of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. The present invention can also be implemented or applied through other different specific implementation methods. The details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.

[0030] At the same time, it should be understood that the protection scope of the present invention is not limited to the specific embodiments described below; it should also be understood that the terms used in the embodiments of the present invention are for describing specific embodiments rather than for limiting the protection scope of the present invention.

[0031] Embodiment: A CC attack protection method for a Web application firewall

[0032] like Figure 1 As shown, the method comprises the following steps:

[0033] 1. The Web application firewall protects the domain name through a proxy, and enables cc protection on the Web application firewall.

[0034] 2. When a web client accesses a domain name protected by the web application firewall, the web application firewall will record the source IP, destination IP, destination port, protocol and other information for the relevant records of the request after receiving the web access request from a certain source IP.

[0035] 3. When the response message returned by the Web server reaches the Web application firewall, the Web application firewall inserts a custom field for CC analysis into the header of the response message.

[0036] Examples of key+value are as follows:

[0037] cc_custom: 01XXXXXXXX (XXXXXXXX corresponds to the source IP address of the request message).

[0038] The first two bits are 01, indicating that the Web Application Firewall has enabled the cc function. The following four bytes are used by the Web client to fill in the IP address, which is filled with the source IP address of the message.

[0039] The response message is reassembled by the Web application firewall and sent to the Web client.

[0040] Note: The above custom fields are optional.

[0041] 4. After the client receives the Web response, there are two situations:

[0042] (1) If the custom cc header field can be identified, it can be analyzed that cc is enabled on the Web application firewall. After comparison, it is found that the client IP is different from the analyzed IP. At this time, it can be determined that the address is converted during the forwarding process.

[0043] (2) If the custom cc header field cannot be recognized, ignore the field and continue processing.

[0044] 5. If the client continues to send requests, the cc_custom field will be added to the header of the Web request message, and the content is as follows: cc_custom: 11XXXXXXXX (the front is filled with 11, and the last 4 bytes are the client's own private IP).

[0045] Note: The first two bytes are filled with 11, indicating that the Web client can parse the custom cc_custom normally. The last four bytes are filled with the client's private network IP.

[0046] 6. When the Web application firewall receives a Web request and finds through analysis that it carries the cc_custom field, it extracts the private network IP information of the custom field, including the source IP information, destination IP information, destination port, protocol, etc. of the message.

[0047] 7. The Web application firewall combines the private IP of the Web client extracted in step 6 and the source IP of the message to make a CC judgment.

[0048] (1) When the number of requests with the same private network IP and message source IP reaches the set threshold within the set time, it is considered that a CC attack has been triggered, and the CC attack prediction is triggered to issue an alarm or intercept.

[0049] (2) Since some Web clients cannot recognize the custom cc_custom field, they will not carry their own client's private IP. In this case, the following situation will occur on the Web application firewall: for the same public IP, there are cases where the Web client's private IP is carried, and there are cases where the client's private IP is not carried.

[0050] This situation can be handled separately. Only public IP requests are processed at the rate set by CC. Once the preset value is reached, CC is considered triggered and actions such as alarm or interception are triggered according to the rules.

[0051] At the same time, public IP and private IP are processed separately. Only when the request rates of private IP and public IP reach the threshold set by CC at the same time, CC is considered to be triggered, and alarm or interception is triggered according to the rules.

[0052] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any technician familiar with the profession can make some changes or modifications to the technical contents disclosed above without departing from the scope of the technical solution of the present invention to obtain equivalent embodiments of equivalent changes. However, any simple modification, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A CC attack protection method for a Web application firewall. It is characterized in that The method comprises: S1. A Web client sends a Web access request. After receiving the Web access request, the Web application firewall records the relevant information of the Web access request and forwards the Web access request to the Web server; S2. The Web server sends a Web response message. When the Web response message reaches the Web application firewall, the Web application firewall inserts the custom cc field information into the Web response message. The custom cc field information contains the source IP information of the Web access request, and then sends the assembled Web response message to the Web client. S3. After receiving the Web response message, the Web client identifies and parses the custom cc field. If it is found that the IP of the Web client is different from the source IP in the parsed Web response message, it can be determined that the address conversion is performed during the intermediate forwarding process; S4. The Web client continues to send a Web request and inserts the custom cc field information into the Web request message. The custom cc field information includes the private IP information of the Web client. S5. After receiving the Web request, the Web application firewall identifies and parses the custom cc field and extracts the Web client private network IP information contained in the custom cc field; S6. The Web application firewall performs CC judgment based on the private IP information of the Web client and the source IP information of the Web request message; if the number of requests with the same private IP of the Web client and the source IP of the Web request message reaches the CC set threshold within the set time, the CC attack prediction is triggered and an alarm or interception is issued.

2. According to the cc attack protection method of the Web application firewall according to claim 1, It is characterized in that The Web application firewall protects domain names by proxy, and CC protection is enabled in advance on the Web application firewall.

3. According to claim 1, the CC attack protection method of the Web application firewall, It is characterized in that The relevant information of the Web access request in step S1 includes: source IP information, destination IP information, destination port, and protocol; The private network IP information of the Web client described in step S4 includes: source IP information, destination IP information, destination port, and protocol.

4. According to claim 1, the CC attack protection method of the Web application firewall, It is characterized in that In step S2, the Web application firewall inserts the customized cc field information into the header of the Web response message; In step S4, the Web client inserts the customized cc field information into the header of the Web request message.

5. According to claim 1, the CC attack protection method of the Web application firewall, It is characterized in that In step S3, if the Web client cannot recognize the custom cc field, the field is ignored and the next step is performed.

6. The CC attack protection method of the Web application firewall according to claim 1, It is characterized in that In step S6, if the number of requests with the same private IP address of the Web client and the source IP address of the Web request message does not reach the threshold set by cc within the set time, the request is directly forwarded.

7. The CC attack protection method of the Web application firewall according to claim 1, It is characterized in that In the method, if the Web client cannot recognize the custom cc field, the public IP received by the Web application firewall may carry the private IP of the Web client, or may not carry the private IP of the client. In this case, the following method is used: (1) Requests that do not carry the private IP address of the web client in the public IP address are processed separately according to the rate set by the CC. If the request reaches the threshold set by the CC, the CC attack prediction is triggered and an alarm or interception is issued; (2) The public IP carries the request of the private IP of the web client. Only when the request rate of the private IP and the public IP reaches the threshold set by the CC at the same time, the CC attack prediction is triggered and an alarm or interception is issued.

8. A CC attack protection system for Web application firewall, It is characterized in that When the system is running, the steps of the CC attack protection method of the Web application firewall described in any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the CC attack protection method for a Web application firewall according to any one of claims 1 to 7 are implemented.