waf threshold-based-detection
Use this command to configure threshold based detection rules to define occurrence, time period, severity, and trigger policy, etc of the following suspicious behaviors, and thus FortiWeb judges whether the request comes from a human or a bot.
-
Crawler
Detects automated web crawlers that systematically scan and index web content. FortiWeb identifies repeated access patterns characteristic of bots, such as excessive page traversal within a short timeframe.
-
Vulnerability Scanning
Detects behavior that matches known patterns of security scanners (e.g., SQLMap, Acunetix). These tools typically probe for common vulnerabilities across multiple endpoints, often using unusual headers, query strings, or access frequencies.
-
Slow Attack
Detects Layer 7 denial-of-service (DoS) attempts where an attacker sends HTTP requests very slowly to tie up server-side resources. FortiWeb supports detection of both:
-
Slow Body Attacks: The attacker sends the request body at a very slow rate to prolong the session and exhaust server resources.
-
Slow Header Attacks: The attacker delays transmission of HTTP headers, preventing the server from completing request parsing. FortiWeb uses TCP-layer packet interval analysis to identify such behavior.
Both types share the same configuration parameters in the detection profile. When detection is triggered, FortiWeb applies the configured action (e.g., Deny, Period Block). Note that header-based detection is performed at the TCP layer and does not support features that require complete HTTP context, such as Real Browser Enforcement or Tracking by Client ID.
-
-
Content Scraping
Detects bots that systematically copy web page content, often for competitive or malicious purposes. FortiWeb monitors request frequency and depth across similar URLs to identify scraping behavior.
-
Illegal User Scan
Identifies repeated attempts to enumerate users or discover valid accounts, typically through brute-force or enumeration techniques.
Syntax
config waf threshold-based-detection
edit "<policy_name>"
set tracking-type {client-ip | client-id}
set recaptcha <recaptcha_server_name>
set mobile-app-identification {disabled | mobile-token-validation}
set bot-confirmation {enable | disable}
set validation-timeout <validation-timeout_int>
set set set max-attempt-times <max-attempt-times_int>
set crawler-detection {enable | disable}
set crawler-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period}
set crawler-severity {High | Medium | Low | Info}
set crawler-trigger <crawler-trigger-policy_name>
set crawler-occurrence-num <crawler-occurrence-num_int>
set crawler-within <crawler-within_int>
set crawler-block-period <crawler-block-period_int>
set scanner-detection {enable | disable}
set scanner-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period}
set scanner-severity {High | Medium | Low | Info}
set crawler-trigger <crawler-trigger-policy_name>
set scanner-occurrence-num <scanner-occurrence-num_int>
set scanner-within <scanner-within_int>
set scanner-block-period <scanner-block-period_int>
set slow-attack-detection {enable | disable}
set slow-attack-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period}
set slow-attack-severity {High | Medium | Low | Info}
set slow-attack-trigger <slow-attack-trigger-policy_name>
set slow-attack-occurrence-num <slow-attack-occurrence-num_int>
set slow-attack-within <slow-attack-within_int>
set slow-attack-HTTP-transaction-timeout <slow-attack-HTTP-transaction-timeout_int>
set slow-attack-packet-interval-timeout <slow-attack-packet-interval-timeout_int>
set slow-attack-block-period <slow-attack-block-period_int>
set content-scraping-detection {enable | disable}
set content-scraping-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period}
set content-scraping-severity {High | Medium | Low | Info}
set content-scraping-trigger <content-scraping-trigger-policy_name>
set content-scraping-occurrence-num <content-scraping-occurrence-num_int>
set content-scraping-within <content-scraping-within_int>
set content-scraping-block-period <content-scraping-block-period_int>
set keep-occurrence-count {enable | disable}
next
end
| Variable | Description | Default |
|---|---|---|
|
Enter a name for the threshold based detection rule that can be referenced in bot mitigation policy. |
No default. |
|
|
Specifies the method FortiWeb uses to track request occurrences for each threshold-based detection module. Options:
Behavior and Requirements:
Note: When a Slow Header Attack is detected, FortiWeb always falls back to IP-based tracking, even if |
client-ip |
|
| bot-recognition {disabled | real-browser-enforcement | captcha-enforcement | captcha-puzzle-enforcement | recaptcha-enforcement | recaptcha-v3-enforcement } |
Select between:
|
disable |
|
Enter the reCAPTCHA server you have created through user recaptcha-user |
No default. |
|
|
mobile-app-identification {disabled | mobile-token-validation} |
|
disable |
|
Enable to confirm if the client is indeed a bot. The system sends RBE (Real Browser Enforcement) JavaScript or CAPTCHA to the client to double check if it's a bot. |
disable |
|
|
Enter the maximum amount of time (in seconds) that FortiWeb waits for results from the client. Available only when the bot-recognition {disabled | real-browser-enforcement | captcha-enforcement | captcha-puzzle-enforcement | recaptcha-enforcement | recaptcha-v3-enforcement } is browser-enforcement, captcha-enforcement, or captcha-puzzle-enforcement. |
20 |
|
|
Enable to detect tools that browse your web site for indexing purposes. |
enable |
|
|
crawler-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} |
Select which action FortiWeb will take when it detects a crawler:
|
alert |
|
When policy violations are recorded in the attack log, each log message contains a Severity Level (
|
Medium |
|
|
Select the trigger, if any, that FortiWeb will use when it logs and/or sends an alert email about a crawler. For details, see "Viewing log messages" on page 1. |
No default. |
|
|
Define the frequency that FortiWeb detects 403 and 404 response codes returned by the web server. |
100 |
|
|
Specify the time period, in seconds, during which FortiWeb detects the 403 and 404 response codes. |
10 |
|
|
Enter the number of seconds that you want to block subsequent requests from a client after FortiWeb detects a crawler. The valid range is 1–3,600 seconds. Available only if crawler-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} is set to |
600 |
|
|
Enable to detect tools that scan your web site for vulnerabilities. |
disable |
|
|
scanner-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} |
Select which action FortiWeb will take when it detects attack signatures:
|
alert |
|
When policy violations are recorded in the attack log, each log message contains a Severity Level (
|
Medium |
|
|
Select the trigger, if any, that FortiWeb will use when it logs and/or sends an alert email about attack signatures. For details, see "Viewing log messages" on page 1. |
No default. |
|
|
Define the frequency that FortiWeb detects attack signatures. |
100 |
|
|
Specify the time period, in seconds, during which FortiWeb monitors the attack signatures. |
10 |
|
|
Enter the number of seconds that you want to block subsequent requests from a client after FortiWeb detects attack signatures. The valid range is 1–3,600 seconds. Available only if scanner-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} is set to |
600 |
|
|
Enable to detect Denial of Service tools that try to go undetected by generating a small stream of traffic. |
disable |
|
|
slow-attack-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} |
Select which action FortiWeb will take when it detects slow attack activities:
|
alert |
|
When policy violations are recorded in the attack log, each log message contains a Severity Level (
|
Medium |
|
|
Select the trigger, if any, that FortiWeb will use when it logs and/or sends an alert email about slow attack activities. For details, see "Viewing log messages" on page 1. |
No default. |
|
|
Define the frequency that FortiWeb detects slow attack activities. |
5 |
|
|
Specify the time period, in seconds, during which FortiWeb detects slow attack activities. |
100 |
|
|
slow-attack-HTTP-transaction-timeout <slow-attack-HTTP-transaction-timeout_int> |
Specify a timeout value, in seconds, for the HTTP transaction. |
60 |
|
slow-attack-packet-interval-timeout <slow-attack-packet-interval-timeout_int> |
Specify the timeout value, in seconds, for interval between packets arriving from either the client or server (request or response packets). |
10 |
|
Enter the number of seconds that you want to block subsequent requests from a client after FortiWeb detects slow attack activities. The valid range is 1–3,600 seconds. Available only if slow-attack-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} is set to |
600 |
|
|
Enable to detect bots that illegally copy contents from your web site. |
disable |
|
|
content-scraping-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} |
Select which action FortiWeb will take when it detects content scraping activities:
|
alert |
|
When policy violations are recorded in the attack log, each log message contains a Severity Level (
|
Medium |
|
|
content-scraping-trigger <content-scraping-trigger-policy_name> |
Select the trigger, if any, that FortiWeb will use when it logs and/or sends an alert email about content scraping activities. For details, see "Viewing log messages" on page 1. |
No default. |
|
content-scraping-occurrence-num <content-scraping-occurrence-num_int> |
Define the frequency that FortiWeb detects content scraping activities. |
100 |
|
Specify the time period, in seconds, during which FortiWeb detects content scraping activities. |
30 |
|
|
content-scraping-block-period <content-scraping-block-period_int> |
Enter the number of seconds that you want to block subsequent requests from a client after FortiWeb detects content scraping activities. The valid range is 1–3,600 seconds. Available only if content-scraping-action {alert | deny_no_log | alert_deny | block-period | client-id-block-period} is set to |
600 |
|
Enable this option so that the threshold counter will not be reset throughout the Within (Seconds) timeframe. FortiWeb can continue denying or period-blocking the client as long as it has ever reached the threshold within the "Within (Seconds)" timeframe. |
disable |
Related Topics
- waf bot-mitigation-policy
- waf biometrics-based-detection
- waf bot-deception on page 1