Use bot manager to require a client (e.g., a web browser) to solve a challenge before resolving the request. WAF blocks traffic when the client cannot solve this challenge within a few seconds. Basic bots typically cannot solve this type of challenge and therefore their traffic is blocked. This prevents them from scraping your siteRefers to harvesting data from your site., cardingRefers to the process through which stolen credit cards are authorized., spamming your forms, launching DDoS attacks, and committing ad fraud.
Solving a challenge requires a JavaScript-enabled client. Users that have disabled JavaScript on their browsing session will be unable to access content protected by bot rules.
We strongly recommend that you avoid applying bot rules to machine-to-machine interactions. For example, applying bot rules to API traffic will disrupt your API workflow.
Content protected by bot rules undergoes the following workflow:
Browser Challenge
WAF sends a browser challenge in response to requests for content protected by bot rules. It is up to the client to solve this challenge within a few seconds.
Response
The results of the above browser challenge determines what happens next.
Solved: If the client is able to solve the challenge, then our CDN serves the requested content. Additionally, a cookie will be added to the user's session. This cookie instructs our CDN to serve content to the user without requiring a browser challenge. Once the cookie expires, new requests for content protected by bot rules will once again require the client to solve a challenge.
Define the duration for this cookie through the Valid for (in minutes) option when setting up the enforcement of bot rules within your Security Application Manager configuration.
A Bot Manager configuration set defines the set of requests that will be protected by bot rules. Each rule contains:
A rule ID and message that will be associated with requests identified by this rule.
Assigning a unique ID and message to each rule makes it easy to identify requests detected as a result of a specific rule.
A rule ID must be a number between 77,000,000 and 77,999,999.
A Bot Manager configuration may contain up to 10 rules.
WAF identifies a request when it satisfies at least one rule in a Bot Manager configuration.
Custom Matches: This type of rule is satisfied when a match is found for each of its conditions. A condition determines request identification by defining what will be matched (i.e., variable), how it will be matched (i.e., operator), and a match value.
Certain variables match on key-value pairs. If you match on multiple keys within a single variable, WAF will only need to find one of those matches to satisfy that variable.
For example, if you set up a request header variable to match for Authorization and Content-Type, then requests that contain either or both of those headers will satisfy that variable.
A condition determines how requests will be identified through variables, operators, match values, and negative matching.
A variable identifies the request element that WAF will analyze. We support the following request elements:
ASN: Identifies requests by the Autonomous System Number (ASN) associated with the client's IP address.
Specify a regular expression to match for multiple ASNs.
Example:
Use the following pattern to match for requests from either 15133 or 14153:
15133|14153
Country: Identifies requests by the country from which the request originated. Specify the desired country using a country code.
Specify a regular expression to match for multiple country codes.
Example:
Use the following pattern to match for requests from the United States, Canada, or Mexico:
US|CA|MX
IP address: Identify requests by the requester's IP address. Specify a comma-delimited list of the desired IP address(es) using standard IPv4/IPv6 and CIDR notation. Specify a subnet by appending a slash (/) and the desired bit-length of the prefix (e.g., 11.22.33.0/22). Do not specify more than 1,000 IP addresses or IP blocks.
Example:
Request cookies: Match against all or specific cookies.
Specific Cookies: Define the name of the desired cookie within this variable and specify the desired cookie value or pattern within the Match value option.
Setting up a cookie variable also allows you to define whether WAF uses a regular expression, a negative match, or both when comparing the value assigned to the variable against cookies. Use a negative match to find requests whose payload does not contain the specified cookie.
Request header: Match against all or specific request headers.
Specific Request Headers: Define the name of the desired request header within this variable and specify the desired header value or pattern within the Match value option.
Setting up a request header variable also allows you to define whether WAF uses a regular expression, a negative match, or both when comparing the value assigned to the variable against request headers. Use a negative match to find requests whose payload does not contain the specified request header.
Request query: Match against the request's query string. Specify the desired value or pattern within the Match value option.
Request URI: Match against the request's URL path and query string. Define a URL path that starts directly after the hostname. Exclude the protocol and hostname when defining this property.
WAF does not transform edge CNAME URLs to CDN URLs prior to performing this comparison.
Sample values:
/marketing?id=123456
/resources/images
Request URL path: Match against the request's URL path. Define a URL path that starts directly after the hostname. Exclude the protocol, hostname, and query string when defining this property.
Our service does not transform edge CNAME URLs to CDN URLs prior to performing this comparison.
Sample values:
/marketing
/resources/images
All variables support the ability to match on the number of times that a request element is found within the request. Set up a variable to match on the number of instances instead of inspecting the element for a specific value or regular expression pattern by marking the Count option.
You may define zero or more keys when setting up variables that match on key-value pairs. WAF must find at least one of the specified keys in the request before that variable will be satisfied. For example, if you set up a request header variable to match for Authorization and Content-Type, then requests that contain either or both of those headers will satisfy that variable.
An operator determines how WAF will compare a match value against the request element identified by a variable.
Exact match: A match is found when the request element is an exact match to the specified match value.
Avoid enabling the Negative match option with the Exact match operator. This configuration will not yield the expected set of matches.
Value match: A match is found when the request element occurs the exact number of times defined in the match value.
The Value match operator should only be used when the Count option has been enabled.
WAF uses a match value to identify threats.
Example:
This example assumes the following configuration:
Variable: Request header = Authentication
Match value: 1
We will now examine how the Count option affects comparisons for this configuration.
The type of comparison that will be performed is determined by the Operator option.
You may create, modify, and delete Bot Manager configurations.
Key information:
To create a Bot Manager configuration
Navigate to the Bot Manager page.
Each new bot rule set contains a default rule that appears directly below the Name option. This default rule contains a default condition. Modify this condition to determine how WAF will identify requests.
From the condition's Variable option, select the request element through which WAF will identify requests.
Certain variables (e.g., request cookies and request header) match on name and value. If you have selected this type of variable, then perform the following steps:
From the Name option, type the desired name.
For example, match for requests that contain an Authorization header by setting this option to Authorization.
Optional. Mark the Count option to match by the number of instances that a match is found instead of by inspecting that request element.
From the Operator option, select an operator that determines how WAF will compare the match value to the request element identified by the above variable.
To modify a Bot Manager configuration
Navigate to the Bot Manager page.
Make the desired changes.
Key tasks:
Custom matches only
Delete variables and matches within a variable by clicking .
Custom matches only
Delete a condition by clicking Delete Condition.
A rule must have at least one condition. Therefore, you cannot delete the root condition.
To delete a Bot Manager configuration
Navigate to the Bot Manager page.
Edgecast CDN