Web Application Firewall

Web Application Firewall (WAF) is an Edge Firewall module, developed to protect edge applications from threats such as SQL Injections, Remote File Inclusion (RFI), Cross-Site Scripting (XSS), and other web vulnerabilities. WAF analyzes HTTP and HTTPS requests, detects, and blocks malicious activity before it reaches your application infrastructure.

WAF operates in the seventh layer of the OSI model, the application layer, where the relationship between web applications and their respective network services and user data takes place. It also works as a barrier to filter and monitor traffic between your application and the requests from the internet.

Web Application Firewall is based on requests scoring methodology. Each HTTP/HTTPS request is compared to a very strict and detailed set of application standards and given a score that is associated with a particular family of threats. According to the score received by the request, it can be released or blocked directly in Azion’s edge nodes, before the threat reaches its origin or causes any type of damage. You define the desired level of sensitivity for blocking each family of threats.

WAF can operate in two modes: Learning or Blocking. You can set the mode in a rule in Rules Engine with the Set WAF Rule Set behavior or via Azion API.

You can use the Learning mode to avoid blocking lawful requests and malfunctions of your application. In this step, WAF identifies the legitimate behaviors of your application by placing them in an allowlist.

If internal traffic, tests, and false positives are being blocked by WAF, you can also fine-tune its settings in the Tuning feature, available inside a WAF configuration.

ScopeSource
WAFHow to check your WAF mode
WAFHow to find information about WAF blocked requests

To configure a WAF Rule Set, which is what a WAF configuration is called, you must have an Edge Firewall configuration with the Web Application Firewall module activated.

The Main Settings section is configured by activating protection against specific threat families: SQL Injection, Remote File Inclusions (RFI), Directory Traversal, Cross-Site Scripting (XSS), File upload, Evading tricks, Unwanted Access, and Identified Attack, and setting a sensitivity level: Lowest, Low, Medium, High, and Highest.

The Threat Type Configuration table categorizes threats into families, according to the purpose of the attack.

go to types of threats reference
go to create a rule set guide

It’s possible to enable and disable protection for each threat family individually through the Active switch.

Sensitivity levels define how strictly WAF will consider a request as a threat.

Each sensitivity level tolerates a defined number of threat indicatives and the WAF score represents this amount of threat indicatives. The more flexible the sensitivity level is, the higher the WAF score it accepts. The most rigid sensitivity levels, on the other hand, only accept requests with fewer signs of threats.

go to sensitivity levels reference

WAF Tuning is an analytical tool that shows IPs from requests that match the WAF rules. The Tuning tab is where you can make the WAF’s operation more flexible. IPs are displayed grouped in the Filter WAF rule table. You can filter by Domain, Time Range, Network Lists, IP, and Countries.

In the filters below Filter Possible Attacks:

  1. Enter the domain (required), time range, which network lists you prefer to use, which IPs you are investigating, and the country of origin of the requests.
  2. Click the Apply filter button.

By clicking the Apply filter button, a list of Possible Attacks will be displayed. This list includes the fields Rule ID, Description, Hits, IPs, Countries, Top 10 IPs Address, and Top 10 Countries.

go to WAF Custom Allowed Rules reference

This tab allows you to create, edit, and delete Allowed Rules.

The Allowed Rules are composed of the fields:

FieldDescription
Rule IDUnique numeric ID of a WAF Rule.
Rule DescriptionAutomatic textual description of what the rule is/does.
ReasonAlternative manual textual description.
URIUniform Resource Identifier (URI) is the path that goes after the domain in the URL.
PathWhen specified, restricts the application of the Match Zone only to the defined path. The path delimits the scope of action of the rule.
Match ZoneParts or fields of the requisition that’ll be compared with the match pattern. It can be Path, Query String, Request Header, Request Body, File Name, or Raw Body.
ActiveAllowed Rule active status switch.

The Match Zone dropdown opens the options available to complete this field. Each option has a specific behavior, as explained in the table below.

FieldDescription
PathMatch pattern will be compared with the request path.
Query StringMatch pattern will be compared to the query string, also called GET arguments.
Request HeaderMatch pattern will be compared to the HTTP headers of the request.
Request BodyMatch pattern will be compared to the body of a POST, also called POST arguments.
File Name (Multipart Body)Match pattern will be compared with the name of the files in multipart POSTs .
Raw BodyMatch pattern will be compared to the uninterpreted body of a requisition, also called the unparsed body.

These are the default limits:

ScopeLimit
Debug Rules log size1.5 kB
WAF Tuning queries3 days

Contributors