CC Protection Settings 2.0

Last updated: 2021-09-08 14:12:58

    Overview

    CC protection can safeguard the access to specified URLs. CC protection settings 2.0 is upgraded with emergency CC protection and custom CC rules. Emergency CC protection can perform big data analysis on websites' access history and their real servers' exceptional response such as timeout and response delay, to generate protection policies for emergencies, blocking frequent access requests in real time. Custom CC rules support customizing protection rules based on user access source IPs or SESSION frequency to handle access by blocking, setting alarms, or verifying identity with CAPTCHA.

    Note:

    • Emergency CC protection and custom CC rules cannot be enabled at the same time.
    • SESSION must be set before using the session-based CC protection policy.

    Directions

    Example 1: Emergency CC protection settings

    Emergency CC protection is disabled by default. Before enabling it, please make sure that the custom CC rule feature is disabled.

    1. Log in to the WAF Console, select Instance Management -> Domain Access on the left sidebar, and click Defense configuration right of the selected domain name for configuration.
    2. Click CC protection settings to configure emergency CC protection.

    Configuration item description:
    Status switch: after emergency CC protection is enabled, if a website is under massive CC attacks (with a website QPS of 1000 or above), the protection will be automatically triggered. If there are no specific protection paths, we recommend enabling emergency CC protection. As there may be some false alarms, you can click IP management -> IP Blocking On/Off on the left sidebar to view the information of blocked IPs and handle them in time.

    Note:

    • If there are specific protection paths, we recommend using custom CC rules.
    • CLB WAF does not support emergency protection. We recommend using custom CC protection.

    Example 2: Access source IP-based CC protection settings

    An IP-based CC protection policy can be directly configured without setting SESSION.

    1. Log in to the WAF Console, select Instance Management -> Domain Access on the left sidebar, and click Defense configuration right of the selected domain name for configuration.
    2. Click CC protection settings -> Add a Rule.
    3. Enter the rule details in the pop-up window.

    Configuration item description:

    • Rule Name: indicates CC protection rule name consisting of up to 50 characters.
    • Recognition Mode: supports IP and SESSION recognitions. Defaults to "IP". To use SESSION recognition, you need to set the SESSION position.
    • Condition: indicates frequency control rule for CC protection. Defaults to URL. For the same rule, you can set up to 10 conditions with the logical AND operator, which should contain at least one URL condition. The detailed field description is as follows:
    Field Parameter Logical Operator Description
    URL None
  • Equal to
  • Include
  • Prefix matching
  • Required. The URL prefixed with "/" can contain up to 128 characters, which can be a directory or specific path.
    Method None
  • Equal to
  • Include
  • Not equal to
  • Supports methods including HEAD, GET, POST, PUT, OPTIONS, TRACE, DELETE, PATCH, and CONNECT. You can specify a method as needed.
    Query key value
  • Equal to
  • Required. The key value can contain up to 512 characters, which can be set multiple times.
    Referer None
  • Equal to
  • Include
  • Prefix matching
  • The value can contain up to 512 characters.
    Cookie key value
  • Equal to
  • Include
  • Not equal to
  • Required. The key value can contain up to 512 characters.
    User-Agent None
  • Equal to
  • Include
  • Not equal to
  • The value can contain up to 512 characters.
    Custom request header key value (Accept, Accept-Language, Accept-Encoding, or Connectiton)
  • Equal to
  • Include
  • Not equal to
  • Blank
  • Not exist
  • The key value can contain up to 512 characters, which can be set multiple times. If the matching content is blank or does not exist, you can directly enter the matching parameter.
    • Access Frequency: sets the access frequency based on actual business requirements. We recommend setting a value 3 to 10 times the normal access frequency. For example, if your website is accessed 20 times per minute per visitor, you can set the access frequency to 60 to 200 times per minute, which can be further adjusted based on the attack severity.
    • Action: Defaults to "Block". You can set this field as needed. The detailed field description is as follows:
    Action Type Description
    Observe Session requests that match the set conditions will be monitored and recorded, which can be checked in Attack Log.
    CAPTCHA This is applicable only to the access through browsers. Session requests that match the set conditions will be verified through a CAPTCHA. If they fail, they will be blocked. Otherwise, they can normally access within the penalty period. CAPTCHA logs will be observed.
    Precise block Access requests that match the set frequency control rules will be blocked precisely, indicating that the specific IP, instead of the domain name, will be blocked from accessing the protected URL within the penalty period ranging from 5 minutes to 10,080 minutes (7 days). You can view the blocking results in Attack Log.
    Block Access requests that match the set frequency control rules will be blocked, indicating that the specific IP will be blocked from accessing all URLs within the penalty period ranging from 5 minutes to 10,080 minutes (7 days). You can view the blocking results in Attack Log, and check the blocked IPs in real time in IP Blocking On/Off.
    • Penalty Period: ranges from 1 minute to 1 week. Default: 10 minutes.
    • Priority: an integer from 1 to 100 (default: 50). The smaller the value, the higher the priority of this rule. For rules with the same priority, the last created one will be used.
    1. For the rules you created, you can disable, modify, or delete them as needed.
    2. Simulate CC attacks based on the rule settings.
    3. View real-time IP blocking information. Click IP management -> IP Blocking On/Off on the left sidebar to view the information of blocked IPs in real time and add these IPs to the blocklist or allowlist as needed.

    Example 3: Session-based CC protection settings

    CC protection based on session access frequency effectively resolves false positive problems that may occur when the same IP egress is used by multiple users in office buildings, stores, supermarkets, and other public Wi-Fi networks.

    1. Log in to the WAF Console, select Web Application Firewall -> Defense settings on the left sidebar, and click Defense configuration right of the selected domain name for configuration.

    2. Click CC protection settings 2.0 -> Settings to set the SESSION information.

    3. On the SESSION settings page, enter the required information. In this example, a cookie is used as the test object, whose ID is security, start position is 0, and end position is 9. After completing the settings, click Set.

      • Configuration item description:
      • SESSION Position: "COOKIE", "GET", or "POST". Here, GET and POST are HTTP request content parameters rather than HTTP header information.
      • Note: "Position Match" or "String Match".
      • SESSION ID: session ID.
      • Start Position: position where string or position match starts.
      • End Position: position where string or position match ends.
      • GET/POST example:
        Assume that the complete parameter content in a request is key_a = 124&key_b = 456&key_c = 789, then:
        • In string match mode, if the session ID is key_b =, and the end character is &, then the matched content will be 456.
        • In position match mode, if the session ID is key_b, the start position is 0, and the end position is 2, then the matched content will be 456.
      • COOKIE example:
        Assume that the complete cookie content in a request is cookie_1 = 123;cookie_2 = 456;cookie_3 = 789, then:
        • In string match mode, if the session ID is cookie_2 =, and the end character is ;, then the matched content will be 456.
        • In position match mode, if the session ID is cookie_2, the start position is 0, and the end position is 2, then the matched content will be 456.
    4. Click Test to test the session information.

    5. Go to the SESSION settings page and set the content to security = 0123456789. Then, WAF will use the 10 characters following security as the session ID. You can also delete or reconfigure the session information.

    6. Set a session-based CC protection policy as instructed in Example 1, but select "SESSION" as the recognition mode.
      7. The CC protection rules will take effect based on the configured SEESION.

      Note:

      If you use session-based CC protection, you cannot view IP blocking information in the IP blocking status section.

    DNS Hijacking Detection
    Tamper Protection