|
Purpose
The Baseline Protection Handler implements the rules that have been created by the Baseline Protection Wizard.
If a request matches one of the given patterns, Stingray Application Firewall denies the request with a configurable error code.
Note: Usually you don’t have to edit this handler manually. We recommend changing the default settings only in case you find too many false positives in detection mode, or if you want to fine tune particular settings for some other reason.
Severity
The severity of the events that are triggered by this handler depends on the particular rule that the handler applies. You can see each rule and the corresponding severity by clicking Show Rules. If several rules match a request, the one with the highest severity determines the severity.
(For details on severity levels, see Severity of Events Triggered by Handlers).
Expand /Collapse All Subsections
This handler is configured automatically by Stingray Application Firewall to provide Baseline Protection. This is achieved by a blacklisting mechanism that checks requests for known forms of attack.
If required, you can disable individual rules of the handler. However, you can’t delete any rule, as the rules are fully managed and updated by Stingray Application Firewall. Also you can exclude requests from the check that exceed a certain content size.
Note: Please note that there are a number of specialized handlers that partly run similar checks, but mostly provide a broader scope of functions. The answer to the question which handler is executed first, depends on the sequence in which the handlers are listed on the tabs Global Handlers / Handler Templates / Handlers of the administration interface. Handlers listed on top are always executed first. The order is preconfigured and can’t be changed.
|
The Baseline Protection Handler ignores arguments that have already passed the Whitelist Handler.
|
Attribute
|
Meaning
|
exclude from baseline check
|
The keys that you enter here and their corresponding values are not be checked by the handler. This makes sense when you want to exclude special fields that are checked by your web application anyway, such as a user-defined text field, for example.
Regular expressions can be used.
If you want to remove an entry, simply delete the entry from the field in the Regex column. When you save, all lines without an entry are automatically removed.
|
apply patterns to keys
|
By default, the Baseline Protection Handler only checks the values of requests for the patterns given under rules, but not the keys. For example, if you have a request such as http://host/foobar?key1=value1&key2=value2, the Baseline Protection Handler checks value1 and value2.
When the option apply patterns to keys is enabled, the Baseline Protection Handler checks both values and keys. This can be important, for example, when a web application processes requests in the form: http://host/foobar?something. In this case, something is not recognized as a value but as a key, and therefore usually isn’t checked. When the option apply patterns to keys is enabled, however, something is checked as well.
|
apply patterns to url parameter
|
By default, the Baseline Protection Handler does not check URL parameters, such as PARAMETER in the URL http://host.domain/path1;PARAMATER/path2?foo=bar. If you enable the option apply patterns to url parameter, the handler does check these URL parameters.
You should enable this option if you you’re actually using URL parameters, but you should not enable the option if you aren’t.
|
max variable size
|
Checking requests with a variable size of more than about 10KB can have a negative impact on performance. For this reason, max variable size defines an upper limit for the variable size. If the variable size of a request is greater than this value, Stingray Application Firewall does not check the request for the given patterns.
The value must be entered in Bytes, the default is 2048.
|
reject if oversize
|
When this option is enabled, Stingray Application Firewall denies a request if its variable is bigger than max variable size.
|
oversize key exclusion list
|
Optional; only has an effect if reject if oversize is enabled.
When the option reject if oversize is enabled, Stingray Application Firewall denies a request if its variable is bigger than max variable size. With the oversize key exclusion list you can define a list of of keys for which this doesn’t happen. You can use this, for example, for excluding big uploads from the check.
Regular expressions can be used.
Caution: Making the optimum choice here, requires some good knowledge of your specific web application. Before you actually activate your ruleset in protection mode, we recommend first running it for some time in detection mode and then to evaluate the log files whether actually no wanted requests were denied.
If you want to remove an entry, simply delete the entry from the edit field. When you save, all lines without an entry are automatically removed.
|
multiple decoding
|
Stingray Application Firewall is able to detect multiple encoding evasion attempts. The values specified in the Decoding Steps column determine how many times Stingray Application Firewall attempts to decode the URIs, headers, and arguments of requests. After each decoding, Stingray Application Firewall applies the rules once more.
Checking is finished when one of the rules match or when the handler has processed all Decoding Steps without finding any match.
If the the check box in the Reject column is activated, Stingray Application Firewall tries to decode once more. If this is possible, Stingray Application Firewall immediately denies the request (without applying the rules once more).
Important: The more decoding steps you have, the more time is required for the analysis. To avoid a negative impact on performance, don’t specify bigger values than actually required for your web application.
|
match timeout
|
Determines the maximum amount of time (given in milliseconds) that Stingray Application Firewall spends working on each rule. If pattern matching takes longer than allowed, Stingray Application Firewall aborts the check.
The default value is 100 ms.
It depends on the settings of the attribute reject if match timeout what happens next:
| ▪ | If the option reject-if-match-timeout is enabled, Stingray Application Firewall denies the request. |
| ▪ | If the option reject-if-match-timeout is disabled, Stingray Application Firewall continues by matching the request to the pattern of the next rule. |
|
reject if match timeout
|
Determines whether requests are denied if pattern matching takes longer than the setting for match timeout allows.
|
categories
|
Describes the scenarios of attack that are covered by baseline protection.
In order to simplify the ruleset and to optimize performance, you can disable an item if you’re absolutely certain that your web application isn’t vulnerable to this kind of attack, or if you’ve configured other handlers to perform adequate protection.
Depending on your selection, particular rules are automatically removed from the rules list.
|
tags
|
Some rules aren’t needed if your web application doesn’t use some particular technologies.
In order to simplify the ruleset and to optimize performance, you can disable an item if you’re certain that your web server doesn’t provide the corresponding technology.
Depending on your selection, particular rules are automatically removed from the rules list.
|
rules
|
These rules are added automatically by Stingray Application Firewall when you run the Baseline Protection Wizard or when you enable additional options for categories and tags.
If a request matches one of the rules, Stingray Application Firewall denies the request with the specified error code.
Note: You can only view the rules and enable/disable them, but you can’t change individual parameters.
To view a rule in detail, click the arrow symbol or the rule’s name.
Stingray Application Firewall only checks requests for the patterns of visible and enabled rules. To enable/disable a rule, click the traffic light symbol next to the rule’s name to toggle the status. A green light indicates an enabled rule, a red light a disabled one.
Tip: If your web application does not use some particular technologies, you can use the tags attribute to remove all rules that are specific only to these technologies very easily. So you don’t need to disable the rules individually. Similarly, if you’re absolutely sure that your web application is not vulnerable to particular kinds of attack, you can can use the categories attribute to remove the corresponding rules.
|
error code
|
HTTP error code that Stingray Application Firewall returns when the request matches one of the patterns specified by the rules.
(For an overview of possible error codes, see HTTP Error Codes.)
|
usertext
|
Optional:
Here you can specify some text that Stingray Application Firewall adds to the log file entries created by this handler. You can use this, for example, to document why you’ve added the handler to your configuration, and how the handler is intended to behave.
|
enable logging
|
Disable this option if you do not want Stingray Application Firewall to create a log file entry when the handler is executed. This can be useful to keep log files smaller in case the handler creates a large number of entries but you don’t need these entries.
Caution: When in detection mode, disabling logging de facto makes the handler ineffective. Disabling logging also prevents the actions of the handler from being taken into account for the Top-10 lists in Attack Analysis, and from being listed in Reports.
To decrease the size of the log files, also consider to enable reduced logging, which excludes all non-handler-related information from the log files (see Editing Applications).
|
See also
Log file entries written by this handler
Handlers
Editing Handlers
Invalid Args Handler
Invalid Body Text Handler
Invalid Parameter Handler
Invalid URL Handler
Valid HTTP Method Handler
Baseline Protection Wizard
Baseline Protection
Configuring and Updating Baseline Protection
Baseline Management
|