en-US
search-icon

Secure Mobile Access 8.6 Web Application Firewall Feature Guide



Configuring Web Application Firewall

 
* 
NOTE: Web Application Firewall requires the purchase of an additional license.

To configure the Web Application Firewallfeature, see the following sections:

Web Application Firewall is often used to protect an Application Offloading portal. Configuring an Application Offloading Portal summarizes how to configure an Application Offloading portal. See the SonicWall SMA Application Offloading and HTTP(S) Bookmarks Feature Guide or the SMA 8.6 Administration Guide for more detailed information.

Viewing and Updating Web Application Firewall Status

The Web Application Firewall > Status page provides status information about the Web Application Firewall signature database and displays the license status and expiration date. The Synchronize button allows you to download the latest signatures from the SonicWall online database. You can use the Download button to generate and download a PCI compliance report file.

Viewing Status and Synchronizing Signatures

To view the status of the signature database and Web Application Firewall service license, and synchronize the signature database, perform the following steps in the appliance management interface:

1
Navigate to Web Application Firewall > Status. The WAF Status section displays the following information:
Status of updates to the signature database
Timestamp of the signature database
Time that the system last checked for available updates to the signature database
Expiration date of the Web Application Firewall subscription service
Status of the Web Application Firewall license

2
If updates are available for the signature database, the Apply button is displayed. Click Apply to download the updates.

You can select an option to update and apply new signatures automatically on the Web Application Firewall > Settings page. If this automatic update option is enabled, the Apply button disappears from the Web Application Firewall > Status page as soon as the new signatures are automatically applied.

3
To synchronize the signature database with the SonicWall online database server, click Synchronize. The timestamp is updated.

Downloading a PCI Compliance Report

To download a PCI DSS 6.5/6.6 compliance report:
1
Navigate to Web Application Firewall > Status.
2
Click the Download button.
3
In the File Download dialog box, click Open to create the PCI report as a temporary file and view it with Adobe Acrobat, or click Save to save the report as a PDF file.

Configuring Web Application Firewall Settings

The Web Application Firewall > Settings page allows you to enable and disable Web Application Firewall on your SonicWall SMA/SRA appliance globally and by attack priority. You can individually specify detection or prevention for three attack classes: high, medium, and low priority attacks.

This page also provides configuration options for other Web Application Firewall settings. The following sections describe the procedures for enabling and configuring Web Application Firewall settings:

Enabling Web Application Firewall and Configuring General Settings

To enable and activate Web Application Firewall, you must select the checkbox to globally enable it and select at least one of the checkboxes in the Signature Groups table. The settings in the General Settings section on this page allow you to globally manage your network protection against attacks by selecting the level of protection for high, medium, or low priority attacks. You can also clear the global Enable Web Application Firewall checkbox to temporarily disable Web Application Firewall without losing any of your custom configuration settings.

You can enable automatic signature updates in the General Settings section, so that new signatures are automatically downloaded and applied when available. A log entry is generated for each automatic signature update. If a signature is deleted during automatic updating, its associated Exclusion List is also removed. A log entry is generated to record the removal. You can view the log entries on the Web Application Firewall > Logs page.

To configure global settings for Web Application Firewall:
1
On the Web Application Firewall > Settings page, expand the General Settings section.
2
Select Enable Web Application Firewall.
3
A warning dialog box is displayed if none of the signature groups have Prevent All already selected. Click OK in the dialog box to set all signature groups to Prevent All, or click Cancel to leave the settings as they are or to manually continue the configuration.

4
Select Apply Signature Updates Automatically to enable new signatures to be automatically downloaded and applied when available. You do not have to click the Apply button on the Web Application Firewall > Status page to apply the new signatures.
5
Select the desired level of protection for High Priority Attacks in the Signature Groups table. Select one of the following options:
Select Prevent All to block access to a resource when an attack is detected. Selecting Prevent All automatically selects Detect All, turning on logging.
Clear Prevent All and select Detect All to log attacks while allowing access to the resource.
To globally disable all logging and prevention for this attack priority level, clear both checkboxes.
6
Select the desired level of protection for Medium Priority Attacks in the Signature Groups table.
7
Select the desired level of protection for Low Priority Attacks in the Signature Groups table.
8
When finished, click Accept.
9
Click OK in the confirmation dialog if it is displayed.

Configuring Global Exclusions

There are three ways that you can exclude certain hosts from currently configured global Web Application Firewall settings. You can completely disable Web Application Firewall for certain hosts, you can lower the action level from Prevent to Detect for certain hosts, or you can set Web Application Firewall to take no action.

The affected hosts must match the host names used in your HTTP(S) bookmarks and Citrix bookmarks, and the Virtual Host Domain Name configured for an offloaded web application.

To configure global exclusions:
1
On the Web Application Firewall > Settings page, expand the General Settings section.
2
Click Global Exclusions.
3
In the Edit Global Exclusions page, the action you set overrides the signature group settings for the resources configured on these host pages. Select one of the following from the Action drop-down list:
Disable – Disables Web Application Firewall inspection for the host.
Detect – Lowers the action level from prevention to only detection and logging for the host.
No Action – Web Application Firewall inspects host traffic, but takes no action.

4
In the Host field, type the host entry as it appears in the bookmark or offloaded application. This can be a host name or IP address. Up to 32 characters are allowed. To determine the correct host entry for this exclusion, see Determining the Host Entry for Exclusions .

You can configure a path to a particular folder or file along with the host. The protocol, port, and the request parameters are simply ignored in the URL. If a path is configured, then the exclusion is recursively applied to all subfolders and files. For instance, if Host is set to webmail.company.com/exchange, then all files and folders under exchange are also excluded.

5
Click ADD to move the host name into the list box.
6
Repeat Step 4 and Step 5 to add more hosts to this exclusion.
7
When finished, click Accept.

Configuring Intrusion Prevention Error Page Settings

To configure the error page to use when intrusions are detected:
1
Expand the Intrusion Prevention Error Page Settings section.
2
In the Intrusion Prevention Response drop-down list, select the type of error page to be displayed when blocking an intrusion attempt.

3
To create a custom page, select Custom Intrusion Prevention Page and modify the sample HTML in the text box.
4
To view the resulting page, click the Preview button.
5
To reset the current customized error page to the default error page, click the Default Blocked Page button and then click OK in the confirmation dialog box.
6
If you do not want to use a customized error page, select one of the following for the error page:
HTTP Error Code 400 Bad Request
HTTP Error Code 403 Forbidden
HTTP Error Code 404 Not Found
HTTP Error Code 500 Internal Server Error
7
When finished, click Accept.

Configuring Cross-Site Request Forgery Protection Settings

Cross-Site Request Forgery protection is configured independently for each Application Offloading portal. New with this release is the Form based Protection Method, which provides a seamless solution and results in less false positives. Optionally when upgrading from a previous release, you can keep the original Protection Method, URL Rewrite-based Protection Method.

When a CSRF attack is detected, log entries are created in both the Web Application Firewall > Logs and Logs > View pages. For more information about CSRF/XSRF attacks, see How is Cross-Site Request Forgery Prevented? .

To configure the settings for CSRF protection with the Form-based Protection Method:
1
Expand the Cross-Site Request Forgery (CSRF/XSRF) Protection section.
2
In the Portals drop down list, select the Portal to which these CSRF protection settings will apply. To make these CSRF settings the default for all portals, select Global.
3
Select Form-based Protection from the Protection Method drop down list.
4
For Content Types, select the types of content you want to be profiled by CSRF. You can select All, HTML/XML, Javascript, or CSS.
5
Click the Begin Profiling button to start the CSRF Form-based Protection. If you wish to stop profiling, click End Profiling.
6
When finished, click Accept.

* 
NOTE: If you are upgrading from a previous firmware version and switch the Protection Method to Form-based Protection, the controls may appear grayed and disabled. Simply click the Accept button to activate the controls.
To configure the settings for CSRF protection with URL Rewrite-based Protection Method:
1
Expand the Cross-Site Request Forgery (CSRF/XSRF) Protection section.
2
In the Portals drop-down list, select the Application Offloading portal to which these CSRF protection settings will apply. To make these CSRF settings the default for all portals, select Global.
3
Select URL Rewrite-based Protection from the Protection Method drop down list.
4
For Protection Mode, select the desired level of protection against CSRF attacks. You can select Detect Only to log these attacks, or Prevent to log and block them. Select Disabled to disable CSRF protection on the portal.
5
When finished, click Accept.

Configuring Cookie Tampering Protection Settings

Cookie tampering protection is configured independently for each Application Offloading portal.

To configure the settings for cookie tampering protection:
1
Expand the Cookie Tampering Protection section.

2
In the Portals drop-down list, select the Application Offloading portal to which these cookie tampering protection settings will apply. To make these cookie tampering settings the default for all portals, select Global.
3
For Tamper Protection Mode, select the desired level of protection against cookie tampering. You can select Detect Only to log these attacks, or Prevent to log and block them. Select Disabled to disable cookie tampering protection on the portal.
4
For Encrypt Server Cookies, select Name to encrypt cookie names, and/or select Value to encrypt cookie values. This affects client-side script behavior because it makes cookie names or values unreadable. Only server-side cookies are encrypted by these options.
5
For Cookie Attributes, select HttpOnly to append the HttpOnly attribute to server-side cookies, and/or select Secure to append the Secure attribute to server-side cookies. The attribute HttpOnly prevents the client-side scripts from accessing the cookies, which is important in mitigating attacks such as Cross Site Scripting and session hijacking. The attribute Secure ensures that the cookies are transported only in HTTPS connections. Both together add a strong layer of security for the server-side cookies.
6
For Client Cookies, select Allow if an application on the portal needs all of the client cookies. When disabled, client-side cookies are not allowed to be sent to the backend systems. This option does not affect server-side cookies.
7
For the Exclusion List, select Enabled to display additional fields for configuration.

8
To enter a custom cookie name and path to the Exclusion List, click in the Cookie Name field to type in the name of the cookie, and click in the Cookie Path field to type in the path. Then click the Add > button.
9
To add one or more already-detected cookies to the Exclusion List, select the desired cookies in the Detected Cookies list, holding the Ctrl key while clicking multiple cookies, and then click the < Add button to add them to the Exclusion List.
10
To remove cookies from the Exclusion List, select the cookies to be removed and then click the Remove button.
11
To clear the Detected Cookies list, click the Clear button.
12
When finished, click Accept.

Configuring Web Site Cloaking

Under Web Site Cloaking, you can filter out headers in response messages that could provide information to clients about the backend web server, which could possibly be used to find a vulnerability.

To configure web site cloaking:
1
Expand the Web Site Cloaking section.
2
In the Block Response Header fields, type the server host name into the first field and type the header name into the second field, then click Add.

For example, if you set the host name to “webmail.xyz.com” and the header name to “X-OWA-version”, headers with the name “X-OWA-version” from host “webmail.xyz.com” will be blocked. In general, listed headers will not be sent to the client if an HTTP/HTTPS bookmark or offloaded application is used to access a listed web server.

To block a certain header from all hosts, set the host name to an asterisk (*). You can add up to 64 host/header pairs. In the HTTP protocol, response headers are not case sensitive.

* 
NOTE: Blocking will not occur for headers such as Content-Type that are critical to the HTTP protocol.
3
To remove a host/header pair from the list to be blocked, select the pair in the text box and then click the Remove button.
4
When finished, click Accept.

Configuring Information Disclosure Protection

Under Information Disclosure Protection, you can protect against inadvertent disclosure of credit card and Social Security numbers (SSN) in HTML web pages. You can also enter confidential text strings that should not be revealed on any web site protected by Web Application Firewall.

To configure information disclosure protection:
1
Expand the Information Disclosure Protection section. The table contains a row for each possible pattern or representation of a social security number or credit card number that Web Application Firewall can detect in the HTML response.

2
Select Enable Credit Card/SSN Protection.
3
In the Mask Character drop-down list, select the character to be substituted when masking the SSN or credit card number.
4
In the table, select the level of protection desired for each representation of a SSN or credit card number. You can select one of the following in each row:
Disabled – Do not match numbers in this format. No logging or masking is performed.
Detect – Detect numbers in this format and create a log entry when detected.
Mask Partially – Substitute the masking character for the all digits in the number, except the last few digits such that the confidentiality of the number is still preserved.
Mask Fully – Substitute the masking character for all digits in the number.
Block – Do not transmit or display the number at all, even in masked format.
5
Below the table, in the Block sensitive information within HTML pages text box, type confidential text strings that should not be revealed on any web site protected by Web Application Firewall. This text is case insensitive, can include any number of spaces between the words, but cannot include wildcard characters. Add new phrases on separate lines. Each line is pattern matched within any HTML response.
6
When finished, click Accept.

Configuring Session Management Settings

Under Session Management, you can control whether the logout dialog window is displayed when a user logs into the user portal or into an application offloaded portal. You can also set the inactivity timeout for users in this section.

To configure session management settings:
1
Expand the Session Management section.

2
Select Launch Logout Dialog Window after Login to display the session logout popup dialog box when the user portal is launched or when a user logs into an application offloaded portal.

3
In the Global Inactivity Timeout field, type the number of inactive minutes allowed before the user is logged out. This setting can be overridden by Group or User settings.
* 
NOTE: To mitigate CSRF attacks, it is important to keep a low idle timeout value for user sessions, such as 10 minutes.
4
When finished, click Accept.

Configuring Web Application Firewall Signature Actions

The Web Application Firewall > Signatures page allows you to configure custom handling or exclusion of certain hosts on a per-signature basis. You can use signature-based exclusions to apply exclusions for all hosts for each signature.

You can also revert back to using the global settings for the signature group to which this signature belongs without losing the configuration details of existing exclusions.

Signatures listed on this page can be divided into pages (default is 50 signatures per page) and filtered by searching for a key word. To display only signatures containing a key word in all fields or a specific field, type the key word in the Search field, select All Fields or a specific field to search, and click Search. All matches are highlighted. Or, click Exclude to display only signatures that do not contain the key word. Click Reset to display all signatures. In addition, the list can be sorted by the contents of any column in ascending or descending order by clicking the column heading.

On the Settings page, global settings must be set to either Prevent All or Detect All for the Signature Group to which the specific signature belongs. If neither is set, that Signature Group is globally disabled and cannot be modified on a per-signature basis. See Enabling Web Application Firewall and Configuring General Settings .

See the following sections:

Enabling Performance Optimization

The Performance Optimization option allows you to disable some relatively less severe signatures that significantly affect the performance of certain web applications. These signatures are identified by the SonicWall signature team and the list is pushed out to SonicWall SMA/SRA appliances. When you select Enable Performance Optimization, these signatures are disabled for Web Application Firewall.

The Web Application Firewall > Signatures page indicates the disabled signatures by displaying them in gray, as shown in Enabling Performance Optimization.

Enabling Performance Optimization

Configuring Signature Based Custom Handling and Exclusions

You can disable inspection for a signature in traffic to an individual host, or for all hosts. You can also change the handling of detected threats for an individual host or for all hosts. If the signature group to which the signature belongs is set globally to Detect All, you can raise the level of protection to Prevent for the configured hosts. If no hosts are configured, the action is applied to the signature itself and acts as a global setting for all hosts. This change will block access to a host when the attack signature is detected. Similarly, you can lower the level of protection to Detect if the associated signature group is globally set to Prevent All.

* 
NOTE: For signature based customization to take effect, the signature group of the modified signature must be globally enabled for either prevention or detection on the Web Application Firewall > Settings page.
To configure one or more hosts with an exclusion from inspection for a signature, or to configure custom handling when Web Application Firewall detects a specific signature for one or more hosts,:
1
On the Web Application Firewall > Signatures page, click the Configure button for the signature that you wish to change. The Edit WAF Signature-based Exclusions screen displays.

2
In the Edit WAF Signature-based Exclusions screen, select one of the following actions from the Action drop-down list:
DISABLE – Disable Web Application Firewall inspections for this signature in traffic from hosts listed in this exclusion
DETECT – Detect and log threats matching this signature from hosts listed in this exclusion, but do not block access to the host
PREVENT – Log and block host access for threats matching this signature from hosts listed in this exclusion
INHERIT GLOBAL - Use the global signature exclusion list configured on the Web Application Firewall > Settings page.
3
To apply this action globally to all hosts, leave the Host field blank. To apply this action to an individual host, type the host entry as it appears in the bookmark or offloaded application into the Host field. This can be a host name or an IP address. To determine the correct host entry for this exclusion, see Determining the Host Entry for Exclusions .

You can configure a path to a particular folder or file along with the host. The protocol, port, and the request parameters are simply ignored in the URL. If a path is configured, then the exclusion is recursively applied to all subfolders and files. For instance, if Host is set to webmail.sonicwall.com/exchange, then all files and folders under exchange are also excluded.

4
If you specified a host, click Add to move the host name into the list box.
5
If you want to apply this action to additional individual hosts, repeat Step 3 and Step 4 to add more hosts to this exclusion.
6
Click Accept. If the Host list contains host entries. The SonicWall SMA/SRA appliance verifies that each host entry is valid. If no hosts were specified, a dialog box confirms that this is a global action to be applied to the signature itself.
7
Click OK in the confirmation dialog box.
8
Click Accept on the Web Application Firewall > Signatures page to apply the updated settings. New settings are applied to any new HTTP connections and requests. The existing HTTP connections and requests continue to use the old settings until they are terminated.

Reverting a Signature to Global Settings

You can revert to using global signature group settings for a signature that was previously configured with an exclusion, without losing the configuration. This allows you to leave the host names in place in case you need to re-enable the exclusion.

To revert to using global signature group settings for a signature:
1
On the Web Application Firewall > Signatures page, click the Configure button for the signature that you wish to change.
2
In the Edit WAF Signature-based Exclusions screen, select INHERIT GLOBAL from the Action drop-down list.
3
The Host field may be blank if global settings were previously applied to this signature. To revert to global signature settings for all hosts, leave the Host field blank. To apply this action to one or more individual hosts, leave these host entries in the Host field and remove any host entries that are not to be reverted.
4
Click Accept. The SonicWall SMA/SRA appliance verifies that each host entry is valid.
5
Click OK in the confirmation dialog box.
6
Click Accept on the Web Application Firewall > Signatures page to apply the updated settings. New settings are applied to any new HTTP connections and requests. The existing HTTP connections and requests will continue to use the old settings until they are terminated.

Removing a Host from a Per-Signature Exclusion

To remove a host from a configured exclusion for a signature:
1
On the Web Application Firewall > Signatures page, click Configure for the signature that you wish to change.
2
Select the host entry in the list box under the Host field, and then click Remove.
3
Repeat Step 2 to remove other listed hosts, if desired.
4
Click Accept. The SonicWall SMA/SRA appliance verifies that each host entry is valid.
5
Click OK in the confirmation dialog box.
6
Click Accept on the Web Application Firewall > Signatures page to apply the updated settings. New settings are applied to any new HTTP connections and requests. The existing HTTP connections and requests will continue to use the old settings until they are terminated.

Determining the Host Entry for Exclusions

When configuring an exclusion, either globally or per-signature, you must provide the host name or IP address. The affected hosts must match the host names used in your HTTP(S) bookmarks and Citrix bookmarks, and the virtual host domain name configured for an offloaded web application.

For a description of how to determine the correct host name, see the following sections:

Viewing the Host Entry in a Bookmark

You can determine exactly what host name to enter in your exclusion by viewing the configuration details of the bookmark.

To view the host entry in a bookmark:
1
Navigate to the Virtual Office page, and click Show Edit Controls above the list of bookmarks.

2
Click the Edit button for the bookmark.

3
In the Edit Bookmark screen, view the host entry in the Name or IP Address field.

4
Click Cancel.

Viewing the Host Entry in an Offloaded Application

You can determine exactly what host name to enter in your exclusion by viewing the configuration details of the offloaded application. In an offloaded application, you will use the virtual host domain name.

To view the virtual host domain name in an offloaded application:
1
Navigate to the Portals > Portals page and click Configure next to the offloaded application.
2
In the Edit Portal screen, click the Virtual Host tab.

3
View the host entry for your exclusion in the Virtual Host Domain Name field.
4
Click Cancel.

Configuring Custom Rules and Application Profiling

The Web Application Firewall > Rules page allows you to configure custom rules and application profiling.

Application profiling allows you to generate custom rules in an automated manner based on a trusted set of inputs used to develop a profile of what inputs are acceptable by an application. Other inputs are denied, providing positive security enforcement. When you place the SonicWall SMA/SRA appliance in learning mode in a staging environment, it learns valid inputs for each URL accessed by the trusted users. At any point during or after the learning process, custom rules can be generated based on the “learned” profiles. For more information about application profiling, see the How Does Application Profiling Work? .

* 
NOTE: Application profiling is supported only on the SonicWall SMA 400, SRA 4600, and the SonicWall SMA 500v Virtual Appliance.

Custom rules created on this page have all the same properties as the signatures that SonicWall pushes out to Web Application Firewall-enabled appliances.

Web Application Firewall > Rules Page

To add a rule manually, you create a rule chain and then add rules within it. A rule chain is a collection of rules and includes additional attributes such as the severity rating, name, description, hit counters for rate limiting, and the action to take when the rule chain matches some traffic.

Rules listed on the Rules page can be divided into pages (default is 50 rules per page) and filtered by searching for a key word. To display only rules containing a key word in all fields or a specific field, type the key word in the Search field, select All Fields or a specific field to search, and click Search. All matches are highlighted. Or, click Exclude to display only rules that do not contain the key word. Click Reset to display all rules.

Rule chains generated by application profiles can be filtered by application. Select the Filter by Application check box to filter rule chains.

To add a rule manually, you create a rule chain and then add rules within it. A rule chain contains a collection of rules, and includes additional attributes such as the severity rating, name, description, hit counters for rate limiting, and the action to take when the rule chain matches some traffic.

For example, custom rules and rule chains can be used to distinguish between legitimate and illegitimate traffic as defined by a web application that is using a certain URI or running on a certain portal. One rule in the chain is configured to match the URI or portal host name, while another rule is created that matches an undesirable value for another element of the HTTP(S) traffic. When the rule chain (both rules) matches some traffic, the configured action is performed to block or log the bad traffic from that URI or portal. When the request is blocked, the user sees a custom block page such as that in Block Page.

Block Page

The Web Application Firewall > Monitoring page also shows the activity in the graphs. Monitoring Page After Blocking shows detected and prevented threats during a 30 day period. For more information about the Monitoring page, see Using Web Application Firewall Monitoring .

Monitoring Page After Blocking

Rules are matched against both inbound and outbound HTTP(S) traffic. When all rules in a rule chain find a match, the action defined in the rule chain is performed. You can also enable rate limiting in rule chains to trigger an action only after the number of matching attacks exceeds a threshold within a certain time period. You can configure the action to block the traffic and log the match, or to simply log it. You can also set the action to Disabled to remove the rule chain from active status and stop comparing traffic against those rules.

The Custom Rules feature can be enabled or disabled using the Enable Custom Rules global setting.

* 
NOTE: Rule chains are enforced in the order that the rule chains were added. This order can be changed by deleting and re-creating rule chains.

Similarly, rules within rule chains are enforced in the order that the rules were added. This order can be changed by deleting and re-creating rules.

Configuring Application Profiling

You can create URL profiles by putting the SonicWall SMA/SRA appliance into learning mode while applications are in use by trusted users, and then use those URL profiles to generate rule chains that prevent malicious misuse of the applications.

* 
NOTE: Application profiling is supported on the SMA 400, SRA 4600, and SMA 500v Virtual Appliance only.
To configure application profiling and automatically generate rules:
1
Navigate to the Web Application Firewall > Rules page.
2
Under Application Profiling, select one or more portals with the application(s) to be profiled from the Portals drop-down list. Use Shift+click or CTRL+click to select multiple portals.

3
For Content Types, select the type of content to be profiled:
All – Includes all content types such as images, HTML, and CSS.
HTML/XML – Selected by default, this is the most important from a security standpoint, because it typically covers the more sensitive web transactions.
Javascript – Appropriate for an application written in Javascript.
CSS – Select CSS to profile the cascading style sheet content used to control the formatting of web pages written in HTML, XHTML, or XML variants.
4
Click Begin Profiling to start the “learning” process. Trusted users should be using the relevant applications on the selected portal during the active profiling period. The Begin Profiling button changes to End Profiling. Profiling continues until you click End Profiling.

During profiling, the SonicWall SMA records inputs and stores them as URL profiles. The URL profiles are listed as a tree structure on the Web Application Firewall > Rules page in the Application Profiling section.

5
After a period of time adequate to record inputs from normal application use, click End Profiling to stop the profiling process.
6
Optionally click any of the links in the URL profile tree display to edit the learned values. The editing page for the clicked URL is displayed. Click Expand to expand all URLs at that level in the tree.

7
To add a value, type the value into the field next to the parameter and then click the plus button. To remove a value, select it in the list and then click the minus button.
8
Click Accept when finished editing. Repeat for other URLs as needed.
9
Before generating the rules from the URL profiles, select one of the following actions from the Default Action for generated Rule Chains drop-down list:
Disabled – The generated rules will be disabled rather than active.
Detect Only – Content triggering the generated rule will be detected and logged.
Prevent – Content triggering the generated rule will be blocked and logged.
10
Select Overwrite existing Rule Chains for URL Profiles to overwrite rule chains that have already been generated from a URL profile.
11
Click the Generate Rules button to generate rules from the URL profiles. If a URL profile has been modified, those changes are incorporated.

If rule chains are successfully generated, the status bar indicates how many rule chains were generated, including any that were overwritten.

12
If you do not want to accept the generated rule chains, click the Delete Selected Rule Chains button, which is available below the rule chain list. All of the automatically added rule chains are pre-selected right after generation for easy deletion of the group.
13
Click Accept to apply the generated rule chains to the SonicWall SMA configuration.

Configuring Rule Chains

You can add, edit, delete and clone rule chains. Example rule chains (with Rule Chain ID greater than 15000) are available in the management interface for administrators to use as reference. These cannot be edited or deleted. You can view the rules associated with the rule chain by clicking its Edit Rule Chain icon under Configure.

For ease of configuration, you can clone example rule chains or regular rule chains. Cloning a rule chain clones all rules associated with the chain. After cloning the rule chain, you can edit it by clicking its Edit Rule Chain icon under Configure.

Adding or Editing a Rule Chain

To add or edit a rule chain:
1
On the Web Application Firewall > Rules page, click the Add Rule Chain button to add a new rule chain.

To edit an existing rule chain, click its Edit Rule Chain icon under Configure.

The New Rule Chain screen or the screen for the existing rule chain displays. Both screens have the same configurable fields in the Rule Chain section.

2
On the New Rule Chain page, type a descriptive name for the rule chain in the Name field.
3
Select a threat level from the Severity drop-down list. You can select HIGH, MEDIUM, or LOW.
4
Select Prevent, Detect Only, or Disabled from the Action drop-down list.
Prevent – Block traffic that matches the rule.
Detect – Allow the traffic, but log it.
Disabled – The rule chain should not take effect.

The Disabled option allows you to temporarily deactivate a rule chain without deleting its configuration.

5
In the Description field, type a short description of what the rule chain will match or other information.
6
Select a category for this threat type from the Category drop-down list. This field is for informational purposes, and does not change the way the rule chain is applied.
7
Under Counter Settings, to enable tracking the rate at which the rule chain is being matched and to configure rate limiting, select Enable Hit Counters. Additional fields are displayed.
8
In the Max Allowed Hits field, enter the number of matches for this rule chain that must occur before the selected action is triggered.
9
In the Reset Hit Counter Period field, enter the number of seconds allowed to reach the Max Allowed Hits number. If Max Allowed Hits is not reached within this time period, the selected action is not triggered and the hits counter is reset to zero.
10
Select Track Per Remote Address to enforce rate limiting against rule chain matches coming from the same IP address. Tracking per remote address uses the remote address as seen by the SonicWall SMA/SRA appliance. This covers the case where different clients sit behind a firewall with NAT enabled, causing them to effectively send packets with the same source IP.
11
Select Track Per Session to enable rate limiting based on an attacker’s browser session. This method sets a cookie for each browser session. Tracking by user session is not as effective as tracking by remote IP if the attacker initiates a new user session for each attack.
12
Click Accept to save the rule chain. A Rule Chain ID is automatically generated.
13
Next, add one or more rules to the rule chain. See Configuring Rules in a Rule Chain for detailed information.

Cloning a Rule Chain

To clone a rule chain:
1
On the Web Application Firewall > Rules page, click its Clone Rule Chain icon under Configure.
2
Click OK in the confirmation dialog box.

You can now edit the rule chain to customize it. See Adding or Editing a Rule Chain .

Deleting a Rule Chain

* 
NOTE: Deleting a rule chain also deletes all the associated rules.
To delete a rule chain:
1
On the Web Application Firewall > Rules page, click the Delete Rule Chain icon under Configure for the rule chain you want to delete.
2
Click OK in the confirmation dialog box.
3
Click Accept.

Correcting Misconfigured Rule Chains

Misconfigured rule chains are not automatically detected at the time of configuration. When a misconfiguration occurs, the administrator must log in and fix or delete the bad rules.

* 
NOTE: If any rules or rule chains are misconfigured, the appliance will not enforce any custom rules or rule chains.

It is difficult to detect a false positive from a misconfigured rule chain unless a user runs into it and reports it to the administrator. If the rule chain has been set to PREVENT, then the user will see the Web Application Firewall block page (as configured on the Web Application Firewall > Settings page). If not, there will be a log message indicating that the “threat” has been detected.

Consider a scenario in which the administrator inadvertently creates a custom rule chain that blocks access to all portals of the SonicWall SMA/SRA appliance. For example, the admin may have wanted to enforce a rule for an Application Offloading portal. However, he or she forgot to add another rule to narrow the criteria for the match to requests for that portal, host or URL. If the first rule was too broad, then this will mean a denial of service for the appliance. Specifically, the administrator creates a rule chain to deny using the GET HTTP method for a specific URL, which expects a POST request.

For this, the administrator needs to create two rules:
1
The first rule is to match GET requests.
2
The second rule is to match a specific URL.

If the administrator forgets to create the second rule, then access to the SonicWall SMA/SRA appliance will be denied, because the web management interface depends on the GET method.

To fix a misconfigured rule chain:
1
Point your browser to https://<SonicWall SMA IP>/cgi-bin/welcome.

If you try to reach the welcome page by simply using the URL https://<SonicWall SMA IP>/, the usual redirect to https://<SonicWall SMA IP>/cgi-bin/welcome may not work. To repair misconfigured rules, you need to explicitly go to https://<SonicWall SMA IP>/cgi-bin/welcome, where <SonicWall SMA IP> is the host name or IP address of your SonicWall SMA/SRA appliance.

2
Log in as admin.
3
Navigate to the Web Application Firewall > Rules page.
4
Edit or delete the bad rules.
5
Click Accept.

Configuring Rules in a Rule Chain

You can add, edit, delete and clone rules. A rule is a condition that is checked against inbound or outbound HTTP(S) traffic. Each rule chain can have one or more rules configured, and must have at least one rule before it can be used. Add Rule Page shows the Add Rule page.

Add Rule Page

Rules allow the administrator to employ both a positive security model and a negative security model. In a positive security model, policies are written only to allow known traffic and block everything else.

A rule has several components:

Variables – These are HTTP protocol entities that are scanned by Web Application Firewall to help identify legitimate or illegitimate traffic. Multiple variables can be matched against the configured value in the Value field. The ‘+’ and ‘-’ buttons allow you to add variables from the Variables drop-down list or delete them from the list of selected variables. You can combine multiple variables as required to match the specified value. If multiple variables are configured, then the rule is matched if any one of the configured variables matches the target value. See About Variables for more information about variables.
Operators – These are arithmetic and logical operators. Not is an inversion operator used to match any value except the configured condition. See About Operators for more information about the operators.
Value – This entity can be a number, literal string, or a regular expression. It is compared with the value of the configured variable(s) according to the specified operator. To compare the variable(s) to more than one value, you can enter multiple values separated by spaces into the Value field, and select the Matches Keyword operator. Delimiting by spaces only works if the Matches Keyword operator is selected.
Anti-Evasive Measures – This field allows you to apply operations beyond those supported by the Operators field, especially to enforce Anti-Evasive protection. See About Anti-Evasive Measures for more information about these operations.

The following sections provide detailed information about rules:

About the Tips/Help Sidebar

You can select a variable in the Variables drop-down list to display more information about that variable in the Tips/Help sidebar. The sidebar explains when each variable would be used and where it is found in the HTTP protocol. An example use case is provided for each variable.

You can also select an entry in the Anti-Evasive Measures drop-down list to display more information about it in the Tips/Help sidebar.

The sidebar also provides context-sensitive search. When you click on a variable and then search for a particular keyword, the search results are only related to variables.

About Variables

Variables are HTTP protocol entities that are scanned by Web Application Firewall to help identify legitimate or illegitimate traffic. Multiple variables can be matched against the configured value in the Value field. The ‘+’ and ‘-’ buttons allow you to add variables from the Variables drop-down list or delete them from the list of selected variables.

You can combine multiple variables as required to match the specified value. If multiple variables are configured, then the rule is matched if any one of the configured variables matches the target value.

A variable can represent a single value or a collection. If a variable represents a collection, such as Parameter Values, then a specific variable within the collection can be configured by entering its name in the selection text box to the right of the colon (:). For example, the value for the URI or Host variable is unique in each HTTP(S) request. For such variables, the selection text box is not displayed. Other variables, such as Request Header Values and Response Header Names, represent a collection.

If you need to test the collection itself against an input, then you would leave the selection text box empty. However, if you need to retrieve the value of a specific item in the collection, you would specify that item in the selection text box. For example, if you need to test if the parameter password exists in the HTTP(S) request, then you would configure the variable Parameter Names and leave the selection text box empty. You would set the Operator to String equals and the Value to password. But, if you want to check whether the value of the password parameter matches a particular string, such as “foo”, then you would select the Parameter Values variable and specify password in the selection text box. In the Value field, you would enter foo.

The Variables for use in rules table describes the available variables.

 

Variables for use in rules 

Variable Name

Collection

Description

Host

No

Refers to the host name or the IP address in the Host header of an HTTP request. This typically refers to the host part of the URL in the address bar of your browser.

URI

No

Refers to the combination of path and the query arguments in a URL.

HTTP Method

No

Refers to the method, such as GET and POST, used by the browser to request a resource on the web server.

HTTP Status Code

No

Refers to the response status from the web server. You can use this to configure actions for various error codes from the web server.

Parameter Values

Yes

Refers to the collection of all request parameter values, including the values of all query arguments and form parameters that are part of the current request.

To match against some aspect of the entire list of parameter values, such as the number of parameter values, leave the selection field empty.

To match against the value of a particular parameter, specify the name of the parameter in the selection field to the right of the colon.

Parameter Names

Yes

Refers to the collection of all request parameter names, including the names of all query arguments and form parameters that are part of the current request.

To match against some aspect of the entire list of parameter names, leave the selection field empty.

To match against the name of a particular parameter, specify the parameter name in the selection field to the right of the colon.

Remote Address

No

Refers to the client's IP address. This variable allows you to allow or block access from certain IP addresses.

Request Header Values

Yes

Refers to the collection of all HTTP(S) request header values for the current request.

To match against some aspect of the entire list of request header values, leave the selection field empty.

To match against a particular header value, specify the name of the header in the selection field to the right of the colon.

For example, to block Ajax requests, select Request Header Values as the Variable, specify X-Request-With in the selection text box, and specify ajax in the Value field.

Request Header Names

Yes

Refers to the collection of all HTTP(S) request header names for the current request.

To match against some aspect of the entire list of request header names, leave the selection field empty.

To match against a particular header name, specify the name of the header in the selection field to the right of the colon.

For example, to block requests that are not referred by a trusted host, select Request Header Names as the Variable, specify Referrer in the selection text box, enter the host names or IP addresses of the trusted hosts in the Value field, select Not and select the Matches Keyword operator.

Response Header Values

Yes

Refers to the collection of all HTTP(S) response header values for the current request.

To match against some aspect of the entire list of response header values, leave the selection field empty.

To match against a particular header value, specify the name of the header in the selection field to the right of the colon.

Response Header Names

Yes

Refers to the collection of all HTTP(S) response header names for the current request.

To match against some aspect of the entire list of response header names, leave the selection field empty.

To match against a particular header name, specify the name of the header in the selection field to the right of the colon.

Response Content Length

No

Refers to the size of the response payload.

Response Payload

No

Refers to the web page content that is displayed to the user.

Portal Hostname

No

Refers to the virtual host name of the SonicWall SMA portal which accepts the request from the client.

To create a rule chain that applies to a particular virtual host, one rule would match the host and another would specify other criteria for the match.

Portal Address

No

Refers to the IP address or virtual IP address of the SonicWall SMA portal which accepts the request from the client.

Request Path

No

Refers to the relative path used to access a particular resource in a web site.

About Operators

There are a number of arithmetic and logical operators. Not is an inversion operator, which results in a match for any value except the configured condition.

These operators can be used in conjunction with Anti-Evasive Measures. For example, you might use the Equals String operator with Convert to Lowercase or Normalize URI Path in Anti-Evasive Measures.

The Rule operators table describes the available operators for use with rules.

 

Rule operators 

Operator

Type

Description

Contains

String

One or more of the scanned variables contains the content of the Value field.

Equals String

String

The scanned variable(s) match the alphanumeric string in the Value field exactly.

=

Arithmetic

The scanned variable is equal to the content of the Value field.

>

Arithmetic

The scanned variable is greater than the content of the Value field.

>=

Arithmetic

The scanned variable is greater than or equal to the content of the Value field.

<

Arithmetic

The scanned variable is less than the content of the Value field.

<=

Arithmetic

The scanned variable is less than or equal to the content of the Value field.

Matches Keyword

String

One or more of the scanned variables matches one of the keywords in the Value field. If multiple keywords are specified, they should be separated by spaces.

Matches Regex

String

One or more of the scanned variables matches the in the Value field. An example of a regular expression that matches any four decimal numbers is \d{4}.

About Anti-Evasive Measures

Anti-evasive measures are applied to input identified by the selected variables before the input is matched against the specified value. For instance, the String Length operation is used to compute the length of the matched input and use it for comparison. Some of the anti-evasive measures are used to thwart attempts by hackers to encode inputs to bypass Web Application Firewall rules. You can click on an anti-evasive measure in the list to read more information on it in the Tips/Help sidebar.

The anti-evasive measures can be used in conjunction with regular operators. There are ten operations to choose from in the Anti-Evasive Measures field, including the None operation which leaves the input alone.

Multiple anti-evasive measures can be selected together and individually enforced. You can select multiple measures by holding the Ctrl key while clicking an additional measure. When the None measure is selected along with other measures in your rule, the input is compared as is and also compared after decoding it or converting it with another measure.

The Anti-Evasive Measures for Rules table describes the anti-evasive measures available for use with rules.

 

Anti-Evasive Measures for Rules 

Operation

Description

None

Use the None measure when you want to compare the scanned input to the configured variable(s) and value(s) without changing the input.

String Length

Use the String Length operation when the selected variable is a string and you want to compute the length of the string before applying the selected operator.

Convert to Lowercase

Use the Convert to Lowercase measure when you want to make case-insensitive comparisons by converting the input to all lowercase before the comparison. When you use this measure, make sure that strings entered in the Value field are all in lowercase.

This is an anti-evasive measure to prevent hackers from changing case to bypass the rule.

Normalise URI Path

Use the Normalise URI Path measure to remove invalid references, such as back-references (except at the beginning of the URI), consecutive slashes, and self-references in the URI. For example, the URI www.eshop.com/././//login.aspx is converted to www.eshop.com/login.aspx.

This is an anti-evasive measure to prevent hackers from adding invalid references in the URI to bypass the rule.

Remove Spaces

Use the Remove Spaces measure to remove spaces within strings in the input before the comparison. Extra spaces can cause a rule to not match the input, but are interpreted by the backend web application.

This is an anti-evasive measure to prevent hackers from adding spaces within strings to bypass the rule.

Base64 Decode

Use the Base64 Decode measure to decode base64 encoded data before the comparison is made according to the rule.

Some applications encode binary data in a manner convenient for inclusion in URLs and in form fields. Base64 encoding is done to this type of data to keep the data compact. The backend application decodes the data.

This is an anti-evasive measure to prevent hackers from using base64 encoding of their input to bypass the rule.

Hexadecimal Decode

Use the Hexadecimal Decode measure to decode hexadecimal encoded data before the comparison is made according to the rule.

This is an anti-evasive measure to prevent hackers from using hexadecimal encoding of their input to bypass the rule.

URL Decode

URL Decode (Unicode)

Use the URL Decode measure to decode URL encoded strings in the input. Use the URL Decode (Unicode) measure to handle %uXXXX encoding. URL encoding is used to safely transmit data over the internet when URLs contain characters outside the ASCII character set.

NOTE: Do not use these measures against an input that has been decoded already.

This is an anti-evasive measure to prevent hackers from using URL encoding to bypass rules, knowing that the backend web server can interpret their malicious input after decoding it.

For example, the URI www.eshop.com/hack+URL%3B is converted to www.eshop.com/hack URL by this operator before the comparison is made.

Trim

Use the Trim measure to remove spaces before and after the input data before the comparison. Extra spaces can cause a rule to not match the input, but are interpreted by the backend web application.

This is an anti-evasive measure to prevent hackers from adding spaces before and after the input data to bypass the rule.

Example Use Cases for Rules

This section provides examples of positive and negative security models, as well as several examples showing the use of anti-evasive measures to provide a deeper understanding of these anti-evasive techniques.

Example – Positive Security Model: Blocking Bad Logins

To prevent login to an Application Offloaded web site if the length of the password is less than 8 characters, you would create a rule chain containing the following two rules:

1
Select Host as the Variable and click + to add it, set the Operator to Equals String, and set Value to the Virtual Host name of the portal. This checks that the Host header of the login request matches the site you are trying to protect. In this case, the rule chain is only being applied to one site.
2
Select Parameter Value as the Variable and type password into the selection field, then click + to add the variable and selected item to the rule, set the Operator to < (less than), and set Value to 8. Select String Length in the Anti-Evasive Measures list to compute the length of the password form parameter.

The action for the rule chain would be set to Prevent. Example Rule Chain – Blocking Bad Logins shows the rule chain for this example.

Example Rule Chain – Blocking Bad Logins

Example – Positive Security Model: Blocking a Form Submission with Unwanted Parameters

This rule chain blocks a form submission if the form has a request parameter other than formId or if the value of formId contains more than four digits. To accomplish this, you would need two rule chains:

1
The first rule chain contains two rules:
The first rule identifies the URL where the form is submitted.
The second rule checks if Parameter Names does not match the name of the valid parameter, formId. It uses the Equals String operator with the Not inversion checkbox selected.

2
The second rule chain contains two rules:
The first rule identifies the URL where the form is submitted.
The second rule checks if the value contained by the Parameter Value: formId variable matches the ^\d{1,4}$ which matches anything that does not consist of 1 to 4 digits. The Not inversion check box is selected to change the rule to match anything that does not consist of one to four digits.

Example – Negative Security Model: Blocking Malicious Input to a Form

To block malicious input to a form, you would create a rule chain containing the following two rules:

1
The first rule identifies the URL for the form.
2
The second rule identifies the form parameter, shell_cmd and the bad input, traceroute.

Example – Using URL Decode and None

If a hacker perceives that a Request URI is being scanned for CR and LF characters (carriage return and line feed), the hacker may attempt to sneak those characters into the request by performing URL encoding on the characters before adding them to the request. The URI will then contain %0D and %0A characters, which could be used to launch an HTTP response splitting attack. The URL Decode and/or URL Decode (Unicode) operations can be used to thwart this type of attack by decoding the scanned input before comparing it against the configured value(s) to check for a match.

Specifically, if a request is made to the URI http://www.host.com/foo%20bar/ and the URL Decode operation is selected, the scanned URI becomes http://www.host.com/foo bar/ after decoding, which can now be safely matched. To thwart a hacker who sends a non-encoded request in addition to the encoded one, the administrator can select the None and the URL Decode options in the rule.

Example – Using Convert to Lowercase and URL Decode with Parameter Values

An administrator wants to check whether the content of the variable Parameter Values matches the value foo bar in order to block such a request. Because the backend application accepts case-insensitive inputs (foo bar and FOO BAR), the hacker can pass foo BAR in the request and evade the rule. To prevent this evasion, the administrator specifies Convert to Lowercase as an anti-evasive operation and configures the value as foo bar in all lower case. This causes all request parameter values to be converted to lower case and compared against the value for a case-insensitive check.

Similarly, the hacker could pass foo%20BAR, which is the URL encoded version typically used by browsers. To prevent this evasion, the administrator specifies URL Decode as the anti-evasive operation to apply to the request entity. The input foo%20BAR is URL decoded to foo BAR. If the input is already foo BAR, then URL decoding is not applied.

Example – Using String Length and URL Decode with Parameter Values:ID

Comparing against a decoded input allows the administrator to use the String Length measure to check the length of the input against the matching variable. For example, if a web application ID parameter should not be more than four characters, the administrator could select Parameter Values in the Variable field, enter ID in the selection field, click + to add the variable and selected item to the rule, enter 4 in the Value field, select > in the Operator list, and select both URL Decode and String Length in the Anti-Evasive Measures list.

Deleting a Rule

To delete a rule from a rule chain:
1
On the Web Application Firewall > Rules page, click the Edit Rule Chain icon under Configure for the rule chain from which you want to delete a rule. The page for that rule chain opens.
2
Click the Delete icon under Configure for the rule you want to delete.
3
Click OK in the confirmation dialog box.
4
Click Accept.

Cloning a Rule

To clone a rule:
1
On the Web Application Firewall > Rules page, click the Edit Rule Chain icon under Configure for the rule chain which contains the rule you want to clone. The page for that rule chain opens.
2
Click the Clone icon under Configure for the rule you want to clone.
3
Click OK in the confirmation dialog box.

You can now edit the rule to customize it. See Adding or Editing a Rule Chain .

Adding or Editing a Rule

To add or edit a rule in a rule chain:
1
Click the Edit Rule Chain icon under Configure for the rule chain on which you want to add or edit a rule. The page for that rule chain opens.
2
Click the Add Rule button to add a new rule, or click the Edit icon under Configure for the rule you want to edit.
3
In the Add Rule page or the page for the edited rule, select a variable from the Variables drop-down list. See About Variables for information about the available variables.
4
If the chosen variable is a collection of variables, a selection field is displayed to the right of the Variables field, after the colon. If you wish to make a comparison against a particular member of the collection, type the name of that item into the selection field.

To test the collection itself against an input, leave the selection field blank. For example, to test whether a certain parameter exists in the request, you could select the Parameter Names variable and then type the specific parameter name into the Value field (but not into the variable selection field).

5
Click the Plus button to add the variable to the rule. Repeat Step 2 through Step 5 to add more variables.

To delete a variable, select it in the large text box and click the Minus button .

6
Select a string or arithmetic operator from the Operators drop-down list. To perform the inverse operation, select Not.
7
In the Value field, type in the value to be compared with the selected variable(s) in the scanned HTTP(S) input. To compare the input against multiple values, type in each value separated by a space. Each value will be compared individually.
8
Select one or more measures from the Anti-Evasive Measures list. Hold the Ctrl key on your keyboard while clicking to select multiple measures.
9
Click Accept when finished.

Using Web Application Firewall Monitoring

The Web Application Firewall > Monitoring page provides two screens: Local and Global. Both screens display statistics and graphs for detected/prevented threats over time and top 10 threats. The Local screen also displays web server status statistics and graphs of the number of requests and the amount of traffic during the selected monitoring period.

The monitoring functions of each screen are explained in the following sections:

Monitoring on the Local Screen

The Local screen displays statistics and graphs for the local appliance. Graphs are displayed for Web Server Status and WAF Threats Detected & Prevented. For the latter, you can use the Perspective options to change the view between Signature, Severity, and Server, and you can display the statistics in list format rather than as graphs.

Using the Control Buttons

The control buttons are displayed at the top of the screen. They control the statistics that are displayed on this screen. On the Local screen, you can use the control buttons to turn streaming updates on or off, refresh the data on the screen, clear the graphs, and download a report. If streaming is turned on, Web Application Firewall statistics information is fetched periodically, and displayed in the graphs and threat list. If streaming is turned off, no new information can be displayed.

To use the control buttons:
1
Select the Local screen. The active screen name is displayed in blue, while the inactive screen name is white. The control buttons act on the screen that is currently displayed.
2
To turn streaming on or off, click the ON or OFF indicator next to Streaming Updates.
3
To refresh the display, click Refresh.
4
To clear all Web Application Firewall statistics from the graphs and list, click Clear Graphs.
5
To generate a PDF report with Web Application Firewall statistics, click Download Report.
* 
NOTE: Internet Explorer requires Adobe Flash Player version 10 or higher to generate the report.
6
If prompted to install Adobe Flash Player, click Get Flash and then after the installation click Try Again to generate the PDF report from Internet Explorer.

Monitoring Web Server Status

On the Local screen, below the control buttons, this screen displays graphs for web server status. One graph shows the number of web requests detected over time, and another graph shows the amount of traffic in kilobytes (KB).

The web servers tracked are those servers within the local network of the SonicWall SMA/SRA appliance that provide HTTP/HTTPS bookmarks, offloaded applications, and other web services. The Traffic graph indicates the amount of HTTP/HTTPS payload data that is sent to client browsers.

You can view web server activity on the Local screen over different time periods by selecting one of the following options from the Monitoring Period drop-down list:

Last 60 Seconds
Last 60 Minutes
Last 24 Hours
Last 30 Days

Web Server Status For Last 24 Hours shows a 24 hour period of web server activity.

Web Server Status For Last 24 Hours

Web Server Status For Last 60 Minutes shows a 60 minute period of web server activity.

Web Server Status For Last 60 Minutes

Monitoring Detected and Prevented Threats

On the Local screen below the web server status graphs, the Web Application Firewall > Monitoring page displays graphs indicating the number of detected and prevented threats. Two graphs are presented, one showing the number of threats over time, and the other showing the top ten threats that were detected and prevented during that time frame.

You can change the time frame displayed in both graphs or change the view to display all threats in list format by selecting one of the following options from the Monitoring Period drop-down list:

Last 12 Hours
Last 14 Days
Last 21 Days
Last 6 Months
All in Lists

Threats Over Last 21 Days shows the number and severities of threats detected and prevented over the last 21 days.

Threats Over Last 21 Days

When displaying the top 10 threats graph with Perspective set to Signature, hovering your mouse pointer over the signature ID causes a tooltip to appear with details about the threat.

Threat Details Tooltip

Viewing Threats in List Format

To see the threats in list format rather than as a graph, select All in Lists from the Monitoring Period drop-down list. Threats in List Format shows the list format.

The Severity column of the threat list is color coded for quick reference, as follows:

High severity threats – Red
Medium severity threats – Orange
Low severity threats – Black

The initial, default sorting order lists the high severity threats with highest frequency values first. You can change the order of listed threats by clicking on the column headings to sort them by ID, signature name, classification, severity, or frequency. Click again to toggle between ascending and descending order. The active sorting column is marked by an arrowhead pointing upwards for ascending order, and downwards for descending order.

Threats in List Format

To view and hide threat details:
1
On the Web Application Firewall > Monitoring page, select All in Lists from the Monitoring Period drop-down list. The list of detected or prevented threats is displayed in the WAF Threats Detected & Prevented table.
2
To display details about a threat, click on the threat. The details include the following:
URL – The URL to the SonicWall knowledge base for this threat
Category – The category of the threat
Severity – The severity of the threat, either high, medium, or low
Summary – A short description of how the threat behaves

3
To collapse the threat details, click the threat link again.

Changing Perspective

For the Top 10 Threats graph, you can select the following display options from the Perspective drop-down list:

Signature – The name of each threat shown is listed at the left side of the graph.

Severity – High, medium, and low severity threats are displayed using color coding.

Server – The server names are listed at the left side of the graph.

Monitoring on the Global Screen

The Global screen displays statistics and graphs for threats reported by all SonicWall SMA/SRA appliances with Web Application Firewall enabled. Graphs are displayed for WAF Threats Detected & Prevented.

Using the Control Buttons

The control buttons are displayed at the top of the page. They control the statistics that are displayed on this page. On the Global screen, you can use the control buttons to turn streaming updates on or off, refresh the data on the screen, and download a report. If streaming is turned on, Web Application Firewall statistics information is fetched periodically, and displayed in the graphs and threat list. If streaming is turned off, no new information can be displayed.

To use the control buttons:
1
Select the Global screen. The active screen name is displayed in blue, while the inactive tab name is white. The control buttons act on the screen that is currently displayed.
2
To turn streaming on or off, click the ON or OFF indicator next to Streaming Updates.
3
To refresh the display, click the Refresh button.
4
To generate a PDF report containing Web Application Firewall statistics, click the Download Report button.
* 
NOTE: Internet Explorer requires Adobe Flash Player version 10 or higher to generate the report.
5
If prompted to install Adobe Flash Player, click Get Flash and then after the installation click Try Again to generate the PDF report from Internet Explorer.

Monitoring Detected and Prevented Threats

At the top of the Global screen, the Web Application Firewall > Monitoring page displays graphs indicating the number of detected and prevented threats. Two graphs are presented, one showing the number of threats over time, and the other showing the top ten threats that were detected and prevented during that time frame.

You can change the time frame displayed in both graphs by selecting one of the following options from the Monitoring Period drop-down list:

Last 12 Hours
Last 14 Days
Last 21 Days
Last 6 Months

Threats Over Last 21 Days shows the number and severities of threats detected and prevented over the last 21 days.

Threats Over Last 21 Days

Hovering your mouse pointer over the signature ID causes a tooltip to appear with details about the threat.

Threat Details Tooltip

The local signature database on the appliance is accessed to get detailed threat information, but if the database is not up-to-date, some detailed information for the Top 10 Threats might not be available. In this case, the threat color in the graph is light grey, and the severity is displayed as unknown in the tooltip for this threat. The following error message is also displayed below the graphs:

“Warning: Web Application Firewall Signature Database for this device is not current. Please synchronize the Database from the Web Application Firewall > Status page”

Using Web Application Firewall Logs

The Web Application Firewall > Log page provides a number of functions, including a flexible search mechanism, and the ability to export the log to a file or email it. The page also provides a way to clear the log. Clicking on a log entry displays more information about the event.

See the following sections:

Searching the Log

You can search for a value contained in a certain column of the log table, and can also search for log entries that do not contain the specified value.

To view and search Web Application Firewall log files:
1
On the Web Application Firewall > Log page, type the value to search for into the Search field.
2
Select the column in which to search from the drop-down list to the right of the Search field.
3
Do one of the following:
To start searching for log entries containing the search value, click Search.
To start searching for log entries that do not contain the search value, click Exclude.
To clear the Search field, set the drop-down list back to the default (Time), and display the first page of log entries, click Reset.

Controlling the Log Pagination

To adjust the number of entries on the log page and display a different range of entries:
1
On the Web Application Firewall > Log page, enter the number of log entries that you want on each page into the Items per Page field. The Log page display changes to show the new number of entries.
2
To view the log entries beginning at a certain number, type the starting number into the Item field and press Enter on your keyboard.
3
To view the first page of log entries, click the left-most button in the arrow control pad.
4
To view the previous page of log entries, click the left arrow in the arrow control pad.
5
To view the next page of log entries, click the right arrow in the arrow control pad.
6
To view the last page of log entries, click the right-most button in the arrow control pad.

Viewing Log Entry Details

The log entry details vary with the type of log entry. The URI (Uniform Resource Indicator) is provided along with the command for detected threats. Information about the agent that caused the event is also displayed. For an explanation of the rather cryptic Agent string, the following Wikipedia page provides a description and links to external sites that can analyze any user agent string: http://en.wikipedia.org/wiki/User_agent

To view more details about an individual log entry:
1
On the Web Application Firewall > Log page, click anywhere on the log entry that you want to view. The details are displayed directly beneath the entry.

2
To collapse the details for a log entry, click again on the entry.

Exporting and Emailing Log Files

You can export the current contents of the Web Application Firewall log to a file, or email the log contents by using the buttons in the top right corner of the Web Application Firewall > Log page.

Exported files are saved with a .wri file name extension, and open with Wordpad, by default.

Emailed files are automatically sent to the address configured on the Log > Settings page of the SonicWall SMA management interface. If no address is configured, the Status line at the bottom of the browser will display an error message when you click the E-Mail Log button on the Web Application Firewall > Log page.

To export or email the log:
1
To export the log contents, click the Export button in the top right corner of the Web Application Firewall > Log page. The File Download dialog box is displayed.

2
In the File Download dialog box, do one of the following:
To open the file, click Open.
To save the file, click Save, then browse to the folder where you want to save the file and click Save.
3
To email the log contents, click the E-Mail Log button in the top right corner of the Web Application Firewall > Log page. The log contents are emailed to the address specified in the Log > Settings page.

Clearing the Log

You can remove all entries from the Web Application Firewall log on the Web Application Firewall > Log page. The entries on the page are removed, and any attempt to export or email the log file while it is still empty will cause a confirmation dialog box to display.

To clear the Web Application Firewall log:
1
On the top right corner of the Web Application Firewall > Log page, click Clear.
2
Click OK in the confirmation dialog box.

Configuring an Application Offloading Portal

Because Web Application Firewall is used most often to protect an Application Offloading portal, this section provides a summary of how to configure such a portal. The SonicWall SMA/SRA appliance administrator can configure web (HTTP) or secure web (HTTPS) offloaded applications to allow user access to web-based resources and applications such as Sharepoint, Microsoft OWA Premium, or Domino Web Access.

Application Offloading should support any application using HTTP/HTTPS. SonicWall SMA has limited support for applications using web services and no support for non-HTTP protocols wrapped within HTTP.

The application should not contain hard-coded self-referencing URLs. If these are present, the Application Offloading proxy must rewrite the URLs. Since web site development does not usually conform to HTML standards, the proxy can only do a best-effort translation when rewriting these URLs. Specifying hard-coded, self-referencing URLs is not recommended when developing a web site because content developers must modify the web pages whenever the hosting server is moved to a different IP or hostname.

For example, if the backend application has a hard-coded IP address and scheme within URLs as follows, Application Offloading must rewrite the URL.

<a href=" http://1.1.1.1/doAction.cgi?test=foo">

For detailed configuration information, see the SonicWall SMA Application Offloading and HTTP(S) Bookmarks Feature Guide or the SMA 8.6 Administration Guide at: http://www.sonicwall.com

The Application Offloading Portal Settings table shows appropriate Application Offloading portal settings when the portal is providing Web Application Firewall protection to remotely accessed internal sites and to public sites.

 

Application Offloading Portal Settings 

Application Offloading Portal Settings

For Remote Access to an Internal Site

For Remote Access to a Public Site

DNS Configuration

Split DNS

Public DNS

Authentication

Enabled

Disabled (likely)

Access Policies

User/Group/Global

Global

SSL VPN Domains

Enabled

None

Login Customization

Optional

None

Custom Logo

Optional

None

SonicWall recommends using the same FQDN for the Virtual Host Name and the application server site to avoid the need for URL rewriting.

To offload a Web application and create a portal for it:
1
Navigate to Portals > Portals and go to the Virtual Host section. The Virtual Host Settings screen opens. This allows you to access the Portal directly.

2
Enter a descriptive name in the Virtual Host Domain Name field.
3
On the Offloading tab, select Enable Load Balancing for load balancing among offloaded application servers.
4
Select one of the following from the Scheme drop-down list:
Web (HTTP) – access the Web application using HTTP (default scheme)
Secure Web (HTTPS) – access the Web application using HTTPS
Auto (HTTP/HTTPS) – allows the user to determine the actual scheme used to talk to the backend server when accessing an offloading portal. Access is still under the control of the access policy.

When using the Auto scheme, users can type http://www.example.virtual.host.com  or https://www.example.virtual.host.com in browser’s address bar to test this feature. Even scheme set to Auto, it’s still under the control of the access policy.

* 
CAUTION: It is the Administrator’s responsibility to configure the correct scheme used to talk to the backend server. Auto (HTTP/HTTPS) Scheme can operate only if HTTP access is enabled for the Virtual Host (under the Virtual Host tab) and authentication is disabled (under the Offloading tab) that can be insecure. Therefore, you are prompted to click OK to enable HTTP for Virtual Host.
Generic (SSL Offloading) – use SSL offloading to access custom SSL applications
(non-HTTP(S) applications)
5
Enter the host name or private IP address of the backend host into the Application Server Host field.
6
Optionally enter the IPv6 address of the backend host into the Application Server IPv6 Address field.
7
In the Port Number (optional) field, optionally enter a custom port number to use for accessing the application.
8
In the Homepage URI (optional) field, optionally enter a URI to a specific resource on the Web server to which the user is forwarded the first time the user tries to access the Application Offloading Portal. This is a string in the form of: /exch/test.cgi?key1=value1&key2=value2

When this field is configured, it redirects the user to the Web site’s home page the first time the user accesses the portal. This happens only when the user is accessing the site with no URL path (that is, when accessing the root folder, for example: https://www.google.com/). This is not an alias for the root folder. The user can edit the URL to go back to the root folder.

The key=value pairs allow you to specify URL query parameters in the URL. You can use these for any Web site that does not have a default redirect from the root folder to the home page URL. Outlook Web Access is one example, but note that most public sites do have a default redirect.

a
Under Security Settings, select Enable Web Application Firewall to enable the feature.
b
Select Disable Authentication Controls, Access Policies, and CSRF Protection (if enabled) if you need no authentication, access policies, or CSRF protection enforced. This is useful for publicly hosted Web sites.
a
To configure ActiveSync authentication, clear Disable Authentication Controls to display the authentication fields. Select Enable ActiveSync authentication and then type the default domain name. The default domain name is not used when the domain name is set in the email client’s setting.
9
Select Automatically Login to configure Single Sign-On settings.

10
For automatic login using SSO, select one of the following radio buttons:
Use SSL-VPN account credentials – allow log in to the offloaded application using the credentials configured on the SonicWall SMA/SRA appliance.
Use custom credentials – displays Username, Password, and Domain fields where you can enter the custom credentials for the application or use dynamic variables. For the Password field, enter the custom password to be passed, or leave the field blank to pass the current user’s password to the offloaded application portal. For the other fields, dynamic variables can be used, such as those shown in the following table:
 

Supported dynamic variables 

Text Usage

Variable

Example Usage

Login Name

%USERNAME%

US\%USERNAME%

Domain Name

%USERDOMAIN%

%USERDOMAIN\%USERNAME%

Group Name

%USERGROUP%

%USERGROUP%\%USERNAME%

11
If you selected Automatically Login, select Forms-based Authentication to configure Single Sign-On for forms-based authentication.
Configure the User Form Field to be the same as the ‘name’ and ‘id’ attribute of the HTML element representing User Name in the Login form, for example:

<input type=text name=’userid’>

Configure the Password Form Field to be the same as the ‘name’ or ‘id’ attribute of the HTML element representing Password in the Login form, for example:

<input type=password name=’PASSWORD’ id=’PASSWORD’ maxlength=128>

12
In the Virtual Host section, set a host name for the application in the Virtual Host Domain Name field, and optionally enter a descriptive alias in the Virtual Host Alias field.

If you need to associate a certificate to this host, you should additionally set a virtual interface and import the relevant SSL certificate. You could avoid creating a virtual interface by importing a wildcard certificate for all virtual hosts on the SonicWall SMA/SRA appliance.

See the SonicWall Secure Mobile Access 8.6 Administration Guide for more instructions on configuring the fields in this section.

13
If authentication is disabled for this portal, you have the option to Enable HTTP access for this Application Offloaded Portal. This feature is useful for setting up offloading in trial deployments.

14
Click Accept. You are returned to the Portals > Portals page where you see the Web application listed as an Offloaded Web Application under Description.

15
If you have not disabled authentication, navigate to the Portals > Domains page and create a domain for this portal.
16
Update your DNS server for this virtual host domain name and alias (if any).
* 
NOTE: In the future, without a WAF license, Anonymous Application Offloading access will not be supported. Activate a WAF subscription or use the trial version from the System > Licenses page.