Help Center/ Web Application Firewall/ Best Practices/ Defending Against Challenge Collapsar (CC) Attacks/ Configuring Protection for the SMS Verification Code API
Updated on 2026-10-14 GMT+08:00

Configuring Protection for the SMS Verification Code API

Attackers often launch attacks against the SMS verification code API.

If the SMS verification code API of a service system lacks default protection and the server imposes no request rate limit, attackers may exploit the API to launch SMS bombing attacks and drain SMS verification credits. In this scenario, a rate limiting rule is the most effective method to defend against this type of CC attack. We recommend IP address-based rate limiting CC attack protection rules. For details, see Limiting Accesses Through IP Address-based Rate Limiting.

You can configure a CC attack protection rule to mitigate CC attacks. If an IP address calls the SMS verification code API for your domain name more than 10 times within 60 seconds, this rule will block requests from the IP address for an hour. This rule can serve as a preventive measure for the SMS verification code API.

Verifying Protection

If you have configured a CC attack protection rule by referring to the preceding figure for your domain name www.example.com, take the following steps to verify the protection:

  1. Clear the browser cache and access the domain name www.example.com/api/captcha 10 times within 60 seconds. Normally, the custom block page is displayed when you access the page for the 11th time. Refresh the target page 10 hours later. If the page can be accessed properly, the protection works.
  2. Return to the WAF console. In the navigation pane on the left, click Events. On the displayed page, check event details.