Web Application Firewall Evaluation Criteria

Public Draft 1 (October 7, 2005)


Table of Contents

Introduction
Contributors
Contact
Categories
Section 1 - Deployment Architecture
Section 2 - HTTP Support
Section 3 - Detection Techniques
Section 4 - Protection Techniques
Section 5 - Logging
Section 6 - Reporting
Section 7 - Management
Notes
Ideas and requirements on the waiting list
Excluded requirements
Resources
A. Licence

Introduction

Web application firewalls (WAF) represent a new breed of information security technology designed to protect web sites from attack. WAF solutions are capable of preventing attacks that network firewalls and intrusion detection systems can't, and they do not require modification of application source code. As today's web application attacks expand and their relative level of sophistication increases, it is vitally important to develop a standardized criteria for product evaluation. How else can we accurately compare or measure the performance of a particular solution?

The goal of this project is to develop a detailed web application firewall evaluation criteria; a testing methodology that can be used by any reasonably skilled technician to independently assess the quality of a WAF solution.

Current categories are as follows:

  1. Deployment Architecture

  2. HTTP Support

  3. Detection Techniques

  4. Protection Techniques

  5. Logging

  6. Reporting

  7. Management

We expect to cover the following categories in the subsequent releases:

  • XML support

  • Performance

  • Compliance, certifications, and interoperability

Contributors

This document is a result of team effort. The following people have contributed their time and expertise to the project:

  • Robert Auger (SPI Dynamics)

  • Ryan C. Barnett (Center for Internet Security)

  • Anton Chuvakin (Individual)

  • Matthieu Estrade (Bee Ware)

  • Jeremiah Grossman (WhiteHat Security)

  • Achim Hoffmann (Individual)

  • Dave Jevans (Teros)

  • Amit Klein (Individual)

  • Mark Kraynak (Imperva)

  • Ofer Maor (Hacktics)

  • Sylvain Maret (e-Xpert Solutions)

  • Rafael San Miguel (daVinci Consulting)

  • Ivan Ristic (Thinking Stone) [Project Leader]

  • Ory Segal (Watchfire)

  • Ofer Shezaf (Breach)

Contact

If you wish to comment on the evaluation criteria please join the team mailing list by contacting Ivan Ristic ().

Categories

Section 1 - Deployment Architecture

This section highlights the questions key to determining the feasibility of web application firewall deployment in a given environment.

1.1 Modes of Operation

Describe which of the following modes of operation apply to the WAF:

  1. Passive. Can be configured to passively listen to the traffic.

  2. Bridge. Can be installed as a transparent bridge. Can it be configured to fail open?

  3. Router. Network must be reconfigured to direct traffic through the WAF.

  4. Reverse Proxy. Traffic is re-directed to flow through the WAF by making changes to DNS configuration or by re-directing the traffic on the network level.

  5. Embedded. WAF is installed as a web server plug-in. Which web servers are supported? Explain the level of integration with the web server. Some embedded web application firewalls may only tap into the communication channel and do everything themselves. Others may rely on the web server to do as much of the work as possible. Both approaches have their advantages and disadvantages.

1.2 SSL Handling

SSL is often used to protect traffic coming from and to web applications. While this type of protection achieves the goal of data protection, it hides the data from the protection systems (e.g. intrusion detection systems, web application firewalls) at the same time. Since SSL is in widespread use--in fact, all really important deployments use it--if a WAF cannot get to the traffic then it will be unable to perform its function.

Describe how the WAF can be deployed to access the protected data:

  1. Terminates SSL. The network needs to be re-configured to move the SSL operations to the WAF itself. WAF decrypts the encrypted traffic to get access to the HTTP data. The communication between the WAF and the web server can be in plain-text, or SSL-encrypted.

  2. Passively decrypts SSL. Configured with a copy of the web server's SSL private key, WAF is capable of decrypting the SSL traffic. The original data stream travels to the web server unaffected, where it is decrypted and processed by the web server.

  3. Not Applicable. Working embedded in the web server, WAF can be positioned to work just after SSL data is decrypted into plain-text.

1.3 Traffic Blocking

If WAF is capable of blocking the offending traffic describe the nature of the blocking functionality:

  1. Complete blocking. Attack are prevented from reaching the destination. A WAF that works as a reverse proxy can simply inspect the request before it is forwarded to the web server. A WAF that works on the network level must buffer the data packets until enough of the HTTP request is reconstructed to achieve complete blocking.

  2. Partial blocking. Partial attacks may reach the destination. This may happen, for example, if a request is very large, too large to allow for buffering.

  3. Blocking via a third-party device. Blocking via a third-party device may be a more effective way of blocking, especially for WAFs that work on the HTTP level (embedded or reverse proxy-based). A third-party device may also be in a position to block the traffic more effectively.

Describe the scope of blocking capabilities:

  1. Blocks the HTTP request.

  2. Blocks the connection.

  3. Blocks the IP address.

  4. Blocks the application session.

  5. Blocks the application user.

1.4 Method of Delivery

Describe how WAF is delivered:

  1. Appliance. Software bundled with hardware. Appliances are usually highly optimised. They may contain specialised hardware components to increase performance. Are there other optional hardware components that may further increase performance?

  2. Software only. WAF is delivered as software application that can be installed on a generic computer. Describe the reference hardware configuration. Are there other optional hardware components that can increase performance further?

1.5 High availability

There are two aspects of the high availability requirement. One is to prevent the web application firewall from becoming a single point of failure. The other, to allow the WAF to scale and remain useful for very busy sites. The questions are as follows:

  1. Does the WAF support multi-node operation? If not, can it be configured to fail open?

  2. In a two-node high availability system, can the second node share the load?

  3. Is the node state shared? If the state is shared then a node can go down without any impact on the system.

  4. Can multiple WAF nodes be configured to work in a cluster (of more than two nodes)?

Section 2 - HTTP Support

2.1 Supported HTTP versions

Provides support for:

  1. HTTP/0.9

  2. HTTP/1.0

  3. HTTP/1.1

2.2 Widely-used encoding types

The following encoding types should be supported:

  1. Supports application/x-www-form-urlencoded encoding

  2. Supports multipart/form-data encoding

  3. Supports v0 cookies

  4. Supports v1 cookies

  5. Supports chunked encoding in requests

  6. Supports chunked encoding in responses

  7. Supports request compression

  8. Supports response compression

2.2 Strict protocol validation

  1. Can restrict methods used

  2. Can restrict protocols and protocol versions used

  3. Strict request validation per-RFC

  4. Validate URL-encoded characters

  5. Validation of the non-standard %uXXYY encoding

  6. Validation of UTF-8 content

  7. Can enforce cookie types used (e.g. only allow v1 cookies)

2.3 Additional protocol limits

The following protocol limits should be supported:

  1. Can restrict request method length

  2. Can restrict request line length

  3. Can restrict request URI length

  4. Can restrict query string length

  5. Can restrict protocols length

  6. Can restrict the number of headers

  7. Can restrict header name length

  8. Can restrict header value length

  9. Can restrict request body length

  10. Can restrict parameter name length

  11. Can restrict parameter value length

  12. Can restrict the number of parameters

  13. Can restrict combined parameter length (names and values included)

2.4 File transfers

  1. Support for POST file uploads (multipart/form-data encoding)

  2. Support for PUT file uploads

  3. Individual file size can be restricted

  4. Combined file size can be restricted

  5. The number of files in a request can be restricted

2.5 Support for different character encodings

Web Application Firewall must evaluate request data in the character encoding used by the application in order to provide adequate protection.

2.6 Authentication

Support for standard or widely deployed authentication methods:

  1. Basic Authentication

  2. Digest Authentication

  3. NTLM Authentication

Section 3 - Detection Techniques

3.1 Normalisation techniques

Web systems are often designed as a combination of many related systems. This allows the attackers to attempt evasion by transforming the attack payload into a form that appears harmless to the web application firewall. The large variety of backend systems used makes the work of WAFs very difficult. In order to make rules and signatures useful WAFs must attempt to detect evasion attempts and transform input data into a normalised form.

Does the WAF support the following normalisation methods:

  1. URL-encoding

  2. UTF-8 encoding

  3. Null byte string termination

  4. Self-referencing paths (i.e. the use of /./)

  5. Path back-references (i.e. the use of /../)

  6. Mixed case

  7. Excessive use of whitespace

  8. Comment removal (e.g. convert DELETE/**/FROM to DELETE FROM)

  9. Conversion of (Windows-supported) backslash characters into forward slash characters.

  10. Conversion of IIS-specific Unicode encoding (%uXXYY)

3.2 Negative security model

When negative security model is used transactions are allowed by default. Only those transactions that contain attacks are rejected. The success of this model depends on the WAF being able to detect bad requests.

The questions are as follows:

  1. Signature-based. Signature-based products usually detect attacks by performing a string or a regular expression match against traffic.

  2. Rule-based. Rules are similar to signatures but allow for a more complex logic to be formed (e.g. logical AND, logical OR). They also allow for specific parts of each transaction to be targeted in a rule.

3.3 Positive security model

Positive security model denies all transactions by default, but uses rules to allow only those transactions that are known to be valid and safe. This approach can be more efficient (fewer rules to process per transaction) and more secure, but it requires very good understanding of the applications being protected. The positive security model can also be more difficult to maintain if the web application changes frequently.

The questions in this section are as follows:

  1. Is positive security model supported?

  2. Can positive security model be configured manually?

  3. Can positive security model be configured automatically (training)?

  4. Does the tool support model updates (without re-training)?

Positive security model can be achieved using strict content-validation policies, or using statistical analysis or neural networks in an approach commonly referred to as anomaly-based detection.

3.4 Signature and rule database

Signature/rule database:

  1. Does the product come with a database of signatures (or rules), which are designed to detect known problems and attacks.

  2. How many products does the database support?

  3. How often is the database updated?

  4. Is the database cross-referenced to operating systems, applications, and versions, allowing the administrator to apply only the applicable signatures?

3.5 Extension API

Extension API allows programmers to build plug-ins. Plug-ins can contain custom logic to evaluate requests.

Section 4 - Protection Techniques

Common web application problems identified so far:

  1. Brute Force Attacks

  2. Insufficient Authentication

  3. Insufficient Authorisation

  4. Weak Password Recovery Validation

  5. Credential/Session Prediction

  6. Insufficient Session Expiration

  7. Session Fixation

  8. Content Spoofing / Cross-Site Scripting

  9. Command Execution / Buffer Overflow / OS Commanding / Format String Attack

  10. LDAP Injection / SQL Injection

  11. SSI Injection

  12. XPath Injection

  13. Directory Indexing

  14. Information Leakage

  15. Path Traversal

  16. Predictable Resource Location

  17. Abuse of Functionality

  18. Denial of Service

  19. Insufficient Anti-Automation

  20. Insufficient Process Validation

  21. NTLM Authentication Connection Sharing

  22. Insecure Indexing

  23. DOM-based XSS

  24. Cross-Site Request Forgery

  25. HTTP Response Splitting

  26. HTTP Request Smuggling

Section 5 - Logging

5.1 Unique transaction IDs

Unique transaction IDs are assigned to every HTTP transaction. A transaction is one request and response pair.

5.2 Access logs

Access logs refer to a record of all transactions that went through the WAF. Access logs are most commonly delivered as files, although other forms are also in use (e.g. databases).

  1. Access logs can be exported as files.

  2. Commonly-used log formats are supported.

  3. Access log format can be customised.

  4. Access logs can be sent to the logging server via Syslog.

  5. Access logs can periodically be uploaded to the logging server (e.g. via FTP or SCP).

5.3 Event logs and notification

Event logs refer to a record of all suspicious transactions. Events logs are commonly delivered as files, or are stored in a database.

We are expecting web application firewalls to support the following notification methods:

  1. Email

  2. Syslog

  3. SNMP Trap

  4. OPSEC Event Logging API (ELA - http://www.opsec.com/intro/sdk_overview.html#ela)

  5. Periodic file upload via FTP or SCP.

5.4 Full transaction logs

Full transaction logs must include complete HTTP requests and responses. The emphasis is on the request body, with the option to record the response body too. The requirements are as follows:

  1. The transaction log format should be well documented.

  2. It should be possible to configure the detail level. For example, to allow users to record request bodies but not record response bodies. A really smart tool can be configured to allow with limited detail on non-suspicious transactions, but to log with full detail of suspicious details.

  3. It should be possible to configure which transactions are logged. For example, a user may want to log only the suspicious transactions, or only the transactions that involve dynamic processing on the server.

5.5 Log access

The following are requirements for log access:

  1. Logs can be exported (as files) via FTP or SCP, periodically or on demand.

  2. Logs can be accessed directly in the a database (either real or simulated), using an ODBC/JDBC driver. The database schema is published and documented.

  3. Logs can be accessed via an API (pull).

  4. API exists that allows a plugin to be developed to manipulate log entries as they arrive (push).

5.6 Syslog support

If the tool supports Syslog then the following requirements need to be evaluated too:

  1. Supports UDP-based Syslog logging.

  2. Supports connection-oriented Syslog logging.

  3. Connection-oriented Syslog logging can be wrapped in SSL to protect the logs in transport.

  4. When SSL is used, client and server certificates can be specified for additional security.

5.7 Log retention

Log retention refers to the ability of the device to preserve the important logs in accordance with the organisational policies, and to prevent the system from overflowing.

  1. Maximum age of the logs can be specified. Logs older than the specified age are deleted.

  2. Maximum size of the log store can be specified. Once the store reaches the maximum size the oldest logs are deleted.

  3. There is support for multiple log retention policies (e.g. transactions involving policy violations can be kept for longer).

  4. Logs can be automatically backed up before they are deleted.

Section 6 - Reporting

6.1 Event reports

While it is expected the analysts will review the events frequently, reports are needed to track the overall security level:

  1. Can generate comprehensive event reports.

  2. Reports can be generated on demand.

  3. Reports can be generated on schedule (e.g. daily, weekly)

6.2 Report formats

The following report formats are deemed of relevance:

  1. Word

  2. RTF

  3. HTML

  4. PDF

  5. XML (for further, custom, processing)

6.3 Report customisation

The goal of customisation is for reports to appear as most other documents produced in the organisation:

  1. Visual customisation (e.g. colour, logo, etc).

  2. Content customisation (target groups, e.g. Executive, Developers, etc)

6.4 Report distribution

How can reports be distributed:

  1. Automatically via email (push).

  2. Automatically via FTP (push).

  3. Through a report portal (pull).

Section 7 - Management

Management is a key part of any network device. This is especially true for application security devices, since this layer is constantly changing to address specific needs, which are directly related with business requirements. For this reason, a WAF’s management component should meet a set of requirements that will guarantee adequate policy enforcement, refinement, and verification. Also, management should be designed and implemented carefully, so that it doesn't interfere with service components in terms of throughput or availability. The following are topics that must be covered by WAF’s management components. They are classified into several categories in order to better understand what requisite belongs to which component. Also, this approach make easier to evaluate a WAF device from a high abstraction level: components can be scored individually without delving into specific details related to them.

7.1 Policy Management

7.1.1 Simplicity to relax automatically-built policies

Most of WAF devices can automatically learn application logic and build a policy that addresses security and service requirements in that application. Nevertheless, if this policy generates too many false positives, there should be an easy procedure to selectively relax its enforcement rules, instead of having to rebuild it from scratch with lower security level.

7.1.2 Simplicity to manually accept false positives

There must be an easy way to include legitimate requests originally considered as attacks by the current security policy. This task shouldn't be harder than clicking on a log entry and pushing changes to the WAF device.

7.1.3 Ability to define different policies for different applications

This is very self-descriptive. Newer applications probably need a learning-mode phase that shouldn't apply to the rest of applications for which a stable policy has been already built.

7.1.4 Ability to create custom attack signatures or events

Positive Security Model should clear the need for signatures. Nevertheless, many commercial products combine both methods of detection for improved accuracy. In this case, management components should include facilities to develop custom signatures that identify specific, unique risks associated with protected applications.

7.1.5 Ability to customise Denial of Service policies

There is no standard definition of what can be considered a denial of service in every environment. For this reason, WAFs must let the administrator define or refine parameters used to identify this type of attacks. Even better, the device may be smart enough to build an statistical model of what is considered legitimate use of an application and identify when a DoS is taking place, in terms of deviation from this model.

7.1.6 Ability to combine detection and prevention

Policies must offer a high level of granularity. Switching between detection and policy enforcement (prevention) modes cannot be associated with the whole application, but must be granularly associated with every component of an application or every type of attack. This lets an administrator just monitor some potential illegal activity in the application while blocking true intrusion attempts at the same time.

7.1.7 Policy roll-back mechanism

If the new version of one policy fails to correctly protect the website or affects the way services are provided, there must exist one mechanism to easily roll-back to the previous applied policy. Otherwise, it can be too difficult to restore a stable policy before the new one causes serious impact.

7.2 Profile Learning Process

7.2.1 Ability to recognise trusted hosts

Learning mode is based on watching traffic between clients and applications, considering that no attacks will occur over that period of time. This assumption may not be true in many cases; for this reason, there must be management configuration facilities to specify trusted hosts that will let the WAF device learn only legitimate traffic.

7.2.2 Ability to learn about the application without human intervention

There must exist some built-in mechanism that lets the WAF learn application logic without the need for users to manually browse the website. This can be a spider, scanner or crawler that automatically visits every link on every page and behaves as a human user, making use of all the services in the website. The spider must be accurate enough and fully integrated with the policy editor. Also, it may be useful to schedule these scan tasks in order to quickly identify changes made to web applications and adjust the current policy accordingly.

7.2.3 Ability to adjust policies outside the GUI

Sometimes wizards and WAF’s intelligence is not enough to create accurate policies. For this reason, there must exist a way to delve into low-level details of policies and adjust them somehow. This can mean making changes to regular expressions or adding new ones.

7.3 Configuration Management

7.3.1 Ability to create and manage users with different level of access

There must be at least two profiles: administrator and operator. Administrators can make changes to current configuration and perform management tasks, while the operator can just review logs and generate reports. If more than one application is protected, it must be possible to assign different administrators and operators to every application.

7.3.2 Ability to quickly specify and update error pages

When an attack is detected, the WAF returns a default error web page to the user. There must be possible to easily change this page, instead of using low-level components involving command-line tasks.

7.3.3 Ability to filter attacks coming from trusted hosts

It’s recommended that IT departments schedule internal or third-party security audit services that identify vulnerabilities in currently deployed applications. A WAF device must comply with these activities and let the administrator specify a list of hosts that will generate no alerts in the log subsystem. Auditors will use these hosts for authorised pen-testing purposes.

7.3.4 Automatic signature update and install

If signatures are included as an additional detection method, they must be automatically downloaded and installed in every sensor. It makes no sense to wait until the administrator can perform the upgrade process, since at that time the vulnerability window will probably be too wide. On the other hand, update operations must include not only adding new stuff, but also getting rid of inadequate signatures included in previous sets.

7.3.5 Automatic software update and install

Software patches must be transparently downloaded and applied to WAF devices. This way, bugs can be quickly removed and no human intervention is required. Nevertheless, this feature must be optional, since some organisations may decide to test updates in a lab environment before they are installed in production systems (that is, in WAF devices protecting production systems).

7.3.6 Ability to remotely manage sensors

It’s recommended that WAF devices communicate with management systems over a dedicated management network. This enables administrators to securely perform maintenance and configuration tasks. Also, communications between the management systems and WAF devices must be simple enough to traverse firewalls and secure enough (that is, encrypted with strong algorithms) to avoid eavesdropping or other types of attacks based on protocol analysis.

7.4 Logs and Monitoring

7.4.1 Ability to identify and notify system faults and loss of performance

The management components must be able to monitor system status and alert the administrator when an error condition occurs or when performance is somehow impacted. Typical notification mechanisms are e-mail, SNMP, syslog and pager.

7.4.2 Ability to suppress logs

Log suppression is a simple mechanism to aggregate logs in a clever way and simplify WAF’s activity reviews: similar entries are presented as being just one, with an additional column showing how many times this entry was registered. Criteria used for joining entries are user-defined.

7.4.3 Ability to generate service and system statistics

Statistics can help an administrator check if the WAF device is performing as expected. Also, it provides hints about the protected servers’ activity and performance. The following is basic statistical data that must be available in the ligament tool:

  • number of requests/connections/sessions per second

  • percentage of malicious requests

  • percentage of blocked requests (when combining detection and prevention)

  • number of errors over time

  • types of browsers identified (through User-Agent header)

  • most accessed URLs

7.5 Miscellaneous

7.5.1 Interface robustness and reliability

Buggy interfaces are painful when dealing with WAF devices. For this reason, special care should be taken to avoid exceptions, management subsystems faults and error messages while using the UI. There must exist a mechanism to assure that if an error occurs while pushing new policies to the sensor, the WAF device will get back to its original state.

On the other side, the UI must be hardened enough to make sure that it is not vulnerable to the same types of attacks it protects of. This includes common techniques like SQL Injection or Parameter Tampering , but also advanced forms of exploitation.

7.5.2 Integrated Management with other technologies and devices

Checkpoint Web Intelligence (which I don’t consider a WAF product) is having a great success because of its integrated management within other Checkpoint technologies (like FW-1). This argument cannot be used with any true WAF products, but obviously it drives decision-making processes in organisations with a high volume of Checkpoint technology.

Notes

Ideas and requirements on the waiting list

Management:

  1. Log access user interface (view access/event/transaction logs, search, view user sessions)

  2. Event management user interface (tagging, notes, categorisation, escalation)

  3. Being able to mark certain transactions as containing sensitive information (e.g. credit card numbers)

Excluded requirements

Logging:

  1. Log hardening (e.g. using hashes).

  2. Sensitive information sanitation (e.g. remove the credit card numbers from the transaction logs).

  3. IDMEF (http://www.ietf.org/html.charters/idwg-charter.html)

  4. Log expiration

  5. Log data mining

Reporting:

  1. Web traffic reports

Resources

Some interesting documents:

A. Licence

This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.