Setting up the CSRF detector

WAF has the ability to close cross-site forgery vulnerabilities

requests (CSRF), which allows an attacker to act on the site on behalf of another registered visitor.

To operate this module, just enable the CsrfDetector module in the analyzer and enable the pre-configured “CSRF attack” rule (see Figure 172).

image292

Figure 172 – “CSRF attack” rule

This module blocks POST requests in which the domain in the referer header does not match the domain in the host header.

In the application settings, paragraph 4.5.8, you can also set trusted domains for the CSRF module (see).

image293

Figure 173 – Trusted domains for this application

Trusted domains for this application contains the following elements:

  1. Domain input field, after entering the domain you need to click the “image294” button.

  2. Trust subdomains – after activating the checkbox (“image295”, “image296” respectively), all subdomains will be included in the white list. For the ex.example domain, ex is a subdomain.

  3. Trust superdomains – after activating the “ ” checkbox, all superdomains will be included in the white list. For the ex.example domain, example is the superdomain.