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.

To avoid blocking lawful requests and malfunctions of your application, you must perform a learning step. In this step, WAF identifies the legitimate behaviors of your application by placing them on an allowlist. If internal traffic, tests, and false positives are being blocked by WAF, you can also fine-tune its settings in the Tuning tab, inside a created WAF.

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.

Learn more about Edge Firewall modules and the Rules Engine for Edge Firewall.

The Threat Type Configuration table is available in the Main Settings tab of a WAF configuration. Threats are categorized into families, according to the purpose of the attack.

Threat familyDescription
SQL Injections SensitivityDetects attack attempts by injecting SQL code into the application.
Remote File Inclusions (RFI)Detects attempts to include files, usually through scripts on the web server.
Directory TraversalPrevents exploitation of vulnerability regarding insufficient sanitization of file name fields provided by users, so that characters representing shortcuts to the parent directory are passed through the file API.
Cross-Site Scripting (XSS)Prevents the injection of client-side scripts into pages viewed by your visitors.
File UploadDetects the attempt to upload files to the web server.
Evading TricksProtects against some coding tricks used to try to evade protective mechanisms.
Unwanted AccessDetects attempts to access administrative or vulnerable pages, bots, and security scanning tools.
Identified AttacksPrevents several types of common attacks and known vulnerabilities that should certainly be blocked.

You can also enable and disable protection for each threat family individually through the Active switch in the third column.

Sensitivity levels and WAF scores

Section titled Sensitivity levels and WAF scores

Sensitivity levels define how strictly WAF will consider a request as a threat. A request will be blocked by WAF if it obtains a score greater than or equal to the configured sensitivity level threshold. You can set one sensitivity level for each threat family.

SensitivityDescription and WAF sore threshold
LowestThe requisition will be considered a threat if it presents very strong evidence and receives a score greater than or equal to 40. This sensitivity has a lower level of protection for your applications, but it’ll also avoid blocking requests with less chance of false positives.
LowThe request will be considered a threat if it presents very strong evidence and receives a score greater than or equal to 24. This sensitivity has a lower level of protection for your applications, but it’ll also avoid blocking requests with less chance of false positives.
MediumRecommended sensitivity level. The request will be considered a threat if it presents sufficient evidence and receives a score greater than or equal to 16.
HighAt the slightest hint of a threat, the requisition may be blocked, even when it has a score greater than or equal to 8. This level of sensitivity may present more false positives if the learning stage doesn’t have sufficient coverage on the variability of scenarios and uses of its application.
HighestAt the slightest hint of a threat, the requisition may be blocked, even when it has a score greater than or equal to 4. This level of sensitivity may present more false positives if the learning stage doesn’t have sufficient coverage on the variability of scenarios and uses of its application.

Each sensitivity level tolerates a defined number of threat indicatives, 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 a fewer signs of threats.

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.

To see IPs marked by WAF, you must at least specify the domain (or the domains) of your application. The other fields are optional but enable a more detailed selection.

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.

For more information about these possible attacks, see the WAF Custom Allowed Rules documentation.

This tab allows you to create Match Zones for 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.

The Last Editor and Last Modified fileds are only available through the API.