Best practices for critical event protection
During critical periods such as public holidays, security drills, or other major events, web applications have minimal tolerance for attacks. To address this, you can configure basic protection and critical event protection policies to create a more precise, customized defense model and enhance protection during specific timeframes. This topic describes how to configure protection policies for critical events.
Prerequisites
-
You have a WAF 3.0 subscription instance or a pay-as-you-go WAF 3.0 instance.
-
You have enabled the critical event protection feature. For more information, see critical event protection.
Configuration process
Step 1: Add all assets to WAF
Before you configure policies for a critical event, ensure that all your web assets are added to WAF. You can check this in Asset Center. For more information, see Domain Asset Center.
-
Log on to the Web Application Firewall 3.0 console. From the top menu bar, select the resource group and region (Chinese Mainland or Outside Chinese Mainland) for the WAF instance.
-
In the left-side navigation pane, click Asset Center.
-
On the Overview tab, find your root domain in the asset list and check the number in the Unprotected Subdomains column.
-
If the Unprotected Subdomains count is 0, all subdomains under the root domain are protected by WAF.
-
If the Unprotected Subdomains count is not 0, some subdomains are not protected by WAF.
-
Click the
icon to the left of the root domain, locate the subdomains that have a Status of Not Added, and click Add in the Actions column. -
On the Onboarding page, add the subdomains to WAF. For more information, see Add a domain to WAF by using a CNAME record.
-
-
Step 2: Configure origin server protection
After you add a website to WAF by using a CNAME record, WAF inspects its access requests and forwards normal traffic to the origin server. During a critical event, to prevent attackers from discovering your origin server IP and bypassing WAF to launch direct attacks, configure an access control rule on your origin server to allow only inbound traffic from the WAF back-to-origin CIDR blocks.
-
In the left-side navigation pane, click Onboarding.
-
On the CNAME Record tab, click Back-to-origin CIDR Blocks. In the Back-to-origin CIDR Block dialog box, click Copy.
-
Configure an access control rule on your origin server to allow traffic from the IP address ranges you copied in step 2. For more information, see Configure an ECS security group rule or Configure SLB access control.
Step 3: Define access scope
During a critical event, you can configure a Geo-blocking policy to block requests from regions where you do not operate. You can also block source IPs from data centers or cloud service providers. For specific business needs, such as partner collaborations, you can add their source IPs to a whitelist. For more information, see whitelist.
Geo-blocking
-
In the navigation pane on the left, choose .
-
In the Geo-blocking section, create a new rule template or edit an existing one.
-
In the rule configuration panel, go to the Select Regions to Block section and select all non-business regions. Configure the Action and Apply To settings, and then click OK.
Block data centers and cloud providers
-
In the left-side navigation pane, choose
-
Click the Scenario-specific Protection tab, and then create a new rule template or edit an existing one.
-
In the Configure Scenarios wizard, set the basic information for the target for anti-crawler protection and click Next.
-
In the Configure Protection Rules wizard, clear all selected items. Go to the Bot Threat Intelligence section, select Data Center Blacklist, select the IP libraries to block, configure the Action, and then click Next.
-
In the Apply To section, select the protected objects for the rule, and then click Next to complete the configuration.
Step 4: Configure basic protection
During a critical event, set the action for your basic protection policies to Block to automatically intercept attack requests.
-
In the left-side navigation pane, choose
-
In the Core Protection Rule section, create a new rule template or edit an existing one.
-
In the Core Protection Rule configuration panel, ensure that Apply To covers all your assets, and set the Action to Block.
Step 5: Configure scan protection
During a critical event, attackers often use scanning tools to probe your website for vulnerabilities. To prevent this, enable High-Frequency Scanning Protection, Directory Traversal Blocking, and Scanner Blocking in your Scan Protection policies. This reduces the information attackers can gather about your origin server and can even block manual attacks from their IPs.
-
In the left-side navigation pane, choose
-
In the Scanning Protection section, create a new rule template or edit an existing one.
-
In the Scan Protection rule configuration panel, enable High-Frequency Scanning Protection, Directory Traversal Blocking, and Scanner Blocking. Then, configure the Action and Apply To settings.
Step 6: Configure critical event protection
The critical event protection policy provides specialized, scenario-based capabilities, including Threat Intelligence for Critical Event Protection, Rule Groups for Critical Event Protection, an IP Address Blacklist for Critical Event Protection, and Shiro Deserialization Vulnerability Prevention. You can configure these policies by following the steps below.
-
In the navigation pane on the left, choose .
-
On the Protection Templates tab, create a new rule template or edit an existing one.
-
In the critical event protection template panel, configure the following settings.
Configure the basic information, and then click Next.
Parameter
Description
Template Name
Specify a name for the template.
The name must be 1 to 255 characters in length and can contain Chinese characters, uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-).
Protection rules
Select the protection rules to apply and configure the rule action for each.
Critical Event Threat Intelligence: Uses a threat intelligence library of malicious IP addresses to accurately identify attackers. This rule is enabled by default, and its rule action is set to Monitor.
Critical Event Protection Rule Group: Generates a precise set of protection rules for your services based on an intelligent protection model. This rule is enabled by default, and its rule action is set to Monitor.
IP Address Blacklist for Protection for Critical Events: When enabled, WAF monitors or blocks requests from specific IP addresses or address ranges. You can add up to 50,000 custom IP addresses or CIDR blocks to the blacklist.
Shiro Deserialization Vulnerability Prevention: When enabled, WAF uses cookie encryption to protect against Apache Shiro Java deserialization vulnerabilities.
Apply To
From the configured protected objects and protected object groups, select the ones to which you want to apply this template.
If you enabled the IP Address Blacklist for Protection for Critical Events rule, you must configure the IP address blacklist as described below. When you finish, click Next.
Parameter
Actions
Add IP Address Blacklist
Click Add IP Address Blacklist to manually add IP addresses to the blacklist.
In the IP Address Blacklist text box, enter the IP addresses to add. Separate multiple entries with line breaks.
NoteYou can enter up to 500 IP addresses or CIDR blocks. IPv6 addresses are supported. Separate multiple entries with a line break or a comma (,).
Set an expiration time. Options:
Permanently Effective.
Custom. If you select this option, click the time picker to specify an expiration date and time.
In the Remarks text box, enter a note and click OK.
After the IP addresses are added, you can view them in the Configure IP Address Blacklist panel.
Import IP Address Blacklist
Click Import IP Address Blacklist to import IP addresses in bulk.
Click Upload File and select the IP address blacklist file to import.
ImportantOnly CSV files are supported.
IPv4 and IPv6 addresses and CIDR blocks are supported.
You can import one file at a time. Each file can contain up to 2,000 entries. A CIDR block counts as one entry. The file size cannot exceed 1 MB.
If you have a large number of IP addresses to import, you can import them in batches.
Set an expiration time. Options:
Permanently Effective.
Custom. If you select this option, click the time picker to specify an expiration date and time.
In the Remarks text box, enter a note and click OK.
After the IP addresses are added, you can view them in the Configure IP Address Blacklist panel.
Delete All IP Addresses
To remove all IP addresses from the blacklist, click Delete All IP Addresses.
Delete Expired IP Addresses
If some IP addresses in the blacklist have expired, click Delete Expired IP Addresses to remove them.
References
-
To identify the source region of client requests and block or allow requests from specific regions to mitigate high-frequency malicious requests, see Configure Geo-blocking rules to block requests from specific regions.
-
To defend against crawler risks on web pages or H5 pages (including those in mobile apps) by setting scenario-specific anti-crawler rules in Bot Management, see Configure scenario-specific anti-crawler rules to defend against web crawlers.
-
To prevent attackers or scanners from performing large-scale scans on your website, which helps reduce the risk of intrusion and junk traffic, see Scan Protection.