Fortinet white logo
Fortinet white logo

CLI Reference

waf advanced-bot-protection

waf advanced-bot-protection

FortiGuard Advanced Bot Protection is a SaaS (Software as a Service) solution designed to protect your online applications from malicious bots and automated attacks.

By incorporating FortiGuard Advanced Bot Protection (FortiGuard ABP) into FortiWeb's server policy, client traffic will be directed to the FortiGuard ABP service deployed on Google Cloud. It can analyze the traffic to identify any malicious bot behavior and suggest appropriate actions in response.

FortiGuard ABP builds up a machine learning model to protect against a wide range of threats, including Data harvesting, Credential stuffing attacks, Account takeover attempts, and DDoS attacks.

This topic introduces the FortiGuard ABP related CLI commands in FortiWeb. For the whole process of the FortiGuard ABP integration configuration, refer to "Configuring Advanced Bot Protection policy" in FortiWeb Administration Guide.

Syntax

config waf advanced-bot-protection

edit waf advanced-bot-protection

set application-id <string>

set action {alert | deny_no_log | alert_deny | block-period | block-period-client}

set severity {High | Medium | Low | Info}

set trigger <trigger-policy_name>

set exception {exception-policy-id}

set bot-confirmation {enable | disble}

set bot-recognition {captcha-enforcement | captcha-puzzle-enforcement | recaptcha-enforcement | recaptcha-v3-enforcement}

set recaptcha <recaptcha_server_name>

set validation-timeout <validation-timeout_int>

next

end

Variable Description Default
"<advanced-bot-protection_name>" Enter a name for the Advanced Bot Protection policy. You can reference it in the Web Protection Profile. No default
application-id <string>

Enter the Application ID assigned to your FortiGuard ABP Application.

The Application ID is used to bind this Advanced Bot Protection policy to the FortiGuard ABP Application.

To obtain the ID, go to Application page of FortiGuard ABP, click the Settings icon in the Action column, then click Copy Application ID.

No default
action {alert | deny_no_log | alert_deny | block-period | block-period-client}

Select which action FortiWeb will take when FortiGuard ABP suggests a request is from a bot:

  • alert—Accept the connection and generate an alert email and/or log message.
  • alert_deny—Block the request (or reset the connection) and generate an alert and/or log message.
  • deny_no_log—Block the request (or reset the connection).
  • block-period—Block subsequent requests from the client for a number of seconds.
  • block-period-client—Block a malicious or suspicious client based on the FortiWeb generated client ID. This is useful when the source IP of a certain client keeps changing. This option takes effect only when you enable Client Management in the Server Policy.

alert

block-period <content-scraping-block-period_int>

Enter the number of seconds that you want to block subsequent requests from an IP or client ID after FortiWeb detects content scraping activities. The valid range is 1–3,600 seconds.

Available only if action {alert | deny_no_log | alert_deny | block-period | block-period-client} is set to block-period and block-period-client.

600

severity

{High | Medium | Low | Info}

When policy violations are recorded in the attack log, each log message contains a Severity Level (severity_level) field. Select which severity level FortiWeb will use when FortiGuard ABP suggests a request is from a bot:

  • Informative
  • Low
  • Medium
  • High
Medium

trigger <trigger-policy_name>

Select the trigger, if any, that FortiWeb will use when it logs and/or sends an alert email when FortiGuard ABP suggests a request is from a bot. For details, see "Viewing log messages" on page 1.

No default.

exception {exception-policy-id}

Select the exception policy which specifies the elements to be exempted from the FortiGuard ABP scan.

No default

bot-confirmation {enable | disble}

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.

enable

bot-recognition {captcha-enforcement | captcha-puzzle-enforcement | recaptcha-enforcement | recaptcha-v3-enforcement}

  • captcha-enforcement — Requires the client to successfully fulfill a CAPTCHA request. CAPTCHA verification will not pop out for the bot confirmation again for the same user within 10 mins timeout.

  • captcha-puzzle-enforcement—Presents an interactive image-based puzzle challenge to the user. This method is resistant to headless browsers and scripted bots, and is suitable for high-security scenarios where traditional challenges are easily bypassed. If the client cannot successfully fulfill the request within the bot-confirmation-max-attempt-times <int>, or doesn't fulfill the request within the validation-timeout <validation-timeout_int>, FortiWeb applies the action.
    When selected:
    • FortiWeb intercepts the request and serves a visual CAPTCHA that requires drag-and-drop interaction before allowing access to the backend.
    • The original backend response is cached by FortiWeb and only delivered after the user successfully completes the challenge.
    • No customization of the puzzle or replacement message is currently supported.
  • recaptcha-enforcement— Requires the client to successfully fulfill a reCAPTCHA request.

  • recaptcha-v3-enforcement: Requires the client to successfully fulfill a reCAPTCHA v3 request. If the client cannot successfully fulfill the request within the Validation Timeout, FortiWeb applies the Action and sends the reCAPTCHA block page. For details, see "Customizing error and authentication pages (replacement messages)" in FortiWeb Administration Guide.
    You can set the threshold of the reCAPTCHA v3 score through CLI

    config system recaptcha-api

    set recaptcha-v3-score-threshold <string> *The value range is 0 to 1

    end

captcha-enforcement

recaptcha <recaptcha_server_name>

Enter the reCAPTCHA server you have created through user recaptcha-user

No default.

bot-confirmation-max-attempt-times <int>

If captcha-enforcement or captcha-puzzle-enforcement is selected for bot-recognition, enter the maximum number of attempts that a client may attempt to fulfill a CAPTCHA/Puzzle CAPTCHA request.

validation-timeout <validation-timeout_int>

Enter the maximum amount of time (in seconds) that FortiWeb waits for results from the client.

20

Related topics

waf advanced-bot-protection

waf advanced-bot-protection

FortiGuard Advanced Bot Protection is a SaaS (Software as a Service) solution designed to protect your online applications from malicious bots and automated attacks.

By incorporating FortiGuard Advanced Bot Protection (FortiGuard ABP) into FortiWeb's server policy, client traffic will be directed to the FortiGuard ABP service deployed on Google Cloud. It can analyze the traffic to identify any malicious bot behavior and suggest appropriate actions in response.

FortiGuard ABP builds up a machine learning model to protect against a wide range of threats, including Data harvesting, Credential stuffing attacks, Account takeover attempts, and DDoS attacks.

This topic introduces the FortiGuard ABP related CLI commands in FortiWeb. For the whole process of the FortiGuard ABP integration configuration, refer to "Configuring Advanced Bot Protection policy" in FortiWeb Administration Guide.

Syntax

config waf advanced-bot-protection

edit waf advanced-bot-protection

set application-id <string>

set action {alert | deny_no_log | alert_deny | block-period | block-period-client}

set severity {High | Medium | Low | Info}

set trigger <trigger-policy_name>

set exception {exception-policy-id}

set bot-confirmation {enable | disble}

set bot-recognition {captcha-enforcement | captcha-puzzle-enforcement | recaptcha-enforcement | recaptcha-v3-enforcement}

set recaptcha <recaptcha_server_name>

set validation-timeout <validation-timeout_int>

next

end

Variable Description Default
"<advanced-bot-protection_name>" Enter a name for the Advanced Bot Protection policy. You can reference it in the Web Protection Profile. No default
application-id <string>

Enter the Application ID assigned to your FortiGuard ABP Application.

The Application ID is used to bind this Advanced Bot Protection policy to the FortiGuard ABP Application.

To obtain the ID, go to Application page of FortiGuard ABP, click the Settings icon in the Action column, then click Copy Application ID.

No default
action {alert | deny_no_log | alert_deny | block-period | block-period-client}

Select which action FortiWeb will take when FortiGuard ABP suggests a request is from a bot:

  • alert—Accept the connection and generate an alert email and/or log message.
  • alert_deny—Block the request (or reset the connection) and generate an alert and/or log message.
  • deny_no_log—Block the request (or reset the connection).
  • block-period—Block subsequent requests from the client for a number of seconds.
  • block-period-client—Block a malicious or suspicious client based on the FortiWeb generated client ID. This is useful when the source IP of a certain client keeps changing. This option takes effect only when you enable Client Management in the Server Policy.

alert

block-period <content-scraping-block-period_int>

Enter the number of seconds that you want to block subsequent requests from an IP or client ID after FortiWeb detects content scraping activities. The valid range is 1–3,600 seconds.

Available only if action {alert | deny_no_log | alert_deny | block-period | block-period-client} is set to block-period and block-period-client.

600

severity

{High | Medium | Low | Info}

When policy violations are recorded in the attack log, each log message contains a Severity Level (severity_level) field. Select which severity level FortiWeb will use when FortiGuard ABP suggests a request is from a bot:

  • Informative
  • Low
  • Medium
  • High
Medium

trigger <trigger-policy_name>

Select the trigger, if any, that FortiWeb will use when it logs and/or sends an alert email when FortiGuard ABP suggests a request is from a bot. For details, see "Viewing log messages" on page 1.

No default.

exception {exception-policy-id}

Select the exception policy which specifies the elements to be exempted from the FortiGuard ABP scan.

No default

bot-confirmation {enable | disble}

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.

enable

bot-recognition {captcha-enforcement | captcha-puzzle-enforcement | recaptcha-enforcement | recaptcha-v3-enforcement}

  • captcha-enforcement — Requires the client to successfully fulfill a CAPTCHA request. CAPTCHA verification will not pop out for the bot confirmation again for the same user within 10 mins timeout.

  • captcha-puzzle-enforcement—Presents an interactive image-based puzzle challenge to the user. This method is resistant to headless browsers and scripted bots, and is suitable for high-security scenarios where traditional challenges are easily bypassed. If the client cannot successfully fulfill the request within the bot-confirmation-max-attempt-times <int>, or doesn't fulfill the request within the validation-timeout <validation-timeout_int>, FortiWeb applies the action.
    When selected:
    • FortiWeb intercepts the request and serves a visual CAPTCHA that requires drag-and-drop interaction before allowing access to the backend.
    • The original backend response is cached by FortiWeb and only delivered after the user successfully completes the challenge.
    • No customization of the puzzle or replacement message is currently supported.
  • recaptcha-enforcement— Requires the client to successfully fulfill a reCAPTCHA request.

  • recaptcha-v3-enforcement: Requires the client to successfully fulfill a reCAPTCHA v3 request. If the client cannot successfully fulfill the request within the Validation Timeout, FortiWeb applies the Action and sends the reCAPTCHA block page. For details, see "Customizing error and authentication pages (replacement messages)" in FortiWeb Administration Guide.
    You can set the threshold of the reCAPTCHA v3 score through CLI

    config system recaptcha-api

    set recaptcha-v3-score-threshold <string> *The value range is 0 to 1

    end

captcha-enforcement

recaptcha <recaptcha_server_name>

Enter the reCAPTCHA server you have created through user recaptcha-user

No default.

bot-confirmation-max-attempt-times <int>

If captcha-enforcement or captcha-puzzle-enforcement is selected for bot-recognition, enter the maximum number of attempts that a client may attempt to fulfill a CAPTCHA/Puzzle CAPTCHA request.

validation-timeout <validation-timeout_int>

Enter the maximum amount of time (in seconds) that FortiWeb waits for results from the client.

20

Related topics