SS120 Web Application Security Course Manual 03202017 Desbloqueado
SS120 Web Application Security Course Manual 03202017 Desbloqueado
.
12.0
ed
rv
Web Application
se
re
Security and Compliance
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
Imperva SecureSphere
rv
se
Web Application Security
re
Course Manual
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
SecureSphere 12.0 Web Application Security Course Manual
Copyright Notice
© 2002 - 2017 Imperva, Inc. All Rights Reserved.
Follow this link to see the SecureSphere copyright notices and certain open source license terms:
https://www.imperva.com/sign_in.asp?retURL=/articles/Reference/SecureSphere-License-and-Copyright-
Information
This document is for informational purposes only. Imperva, Inc. makes no warranties, expressed or implied.
No part of this document may be used, disclosed, reproduced, transmitted, transcribed, stored in a retrieval system,
.
ed
or translated into any language in any form or by any means without the written permission of Imperva, Inc. To
obtain this permission, write to the attention of the Imperva Legal Department at: 3400 Bridge Parkway, Suite 200,
rv
Redwood Shores, CA 94065.
Information in this document is subject to change without notice and does not represent a commitment on the part
se
of Imperva, Inc. The software described in this document is furnished under a license agreement. The software may
be used only in accordance with the terms of this agreement.
re
This document contains proprietary and confidential information of Imperva, Inc. This document is solely for the use
of authorized Imperva customers. The information furnished in this document is believed to be accurate and
s
reliable. However, no responsibility is assumed by Imperva, Inc. for the use of this material.
ht
TRADEMARK ATTRIBUTIONS
ig
Imperva and SecureSphere are trademarks of Imperva, Inc. lr
All other brand and product names are trademarks or registered trademarks of their respective owners.
Al
PATENT INFORMATION
c.
In
The software described by this document is covered by one or more of the following patents:
US Patent Nos. 7,640,235, 7,743,420, 7,752,662, 8,024,804, 8,051,484, 8,056,141, 8,135,948, 8,181,246, 8,392,963,
a,
8,448,233, 8,453,255, 8,713,682, 8,752,208, 8,869,279 and 8,904,558, 8,973,142, 8,984,630, 8,997,232, 9,009,832,
9,027,136, 9,027,137, 9,128,941, 9,148,440, 9,148,446 and 9,401,927.
rv
Imperva Inc.
pe
.
ed
Feedback E-mail any comments or questions about our courseware to
[email protected].
Document Part Number 210-120-WAS
rv
Revision SecureSphere Web Application Security 12.0 - 02212017
se
Publication Date 2/17/2017
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
Contents at a Glance
Lesson 0 Lab Environment and Web UI
.
Lesson 2 Verifying the Initial Configuration
ed
Lesson 3 Web Application Level Preparations
rv
Lesson 4 Security Policies
se
Lesson 5 Web Application Profiling
re
Lesson 6 ThreatRadar
s
ht
Lesson 7 Alerts and Violations
ig
Lesson 8 Web Application Security Tuning
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
.
ed
Chapter Objectives
rv
• Configure users, roles and permissions for the SecureSphere Web Application Firewall.
se
• Create additional SecureSphere users with local or external authentication, as needed.
re
Users, Roles & Permissions
Several SecureSphere user accounts are defined during initial deployment; however, additional users may be
s
required to properly limit access to SecureSphere, based on company requirements.
ht
ig
Default Roles and Permissions for Web Application Security Deployments
lr
Out of the box, SecureSphere provides two roles that are relevant for Web Application Security deployments, the
Al
Administrator role, and the Web Security Admin role.
c.
Web Security Admin View, Edit, and Create The Web Security Admin role is limited to SecureSphere
permissions for SecureSphere Web Application Security components. This role is
Im
Web Application Security appropriate when the security team is not directly
components. responsible for the ongoing administration of the
17
SecureSphere servers.
Table 1-1 SecureSphere Roles for Web Application Security
20
©
© 2017 Imperva, Inc. All rights reserved 1-1 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 1-1 Users & Roles
re
s
Note:
ht
If more granular access is required, refer to the online help or the Web Security User Guide. The Web Security
ig
Users Guide and other Imperva SecureSphere documentation is available on the Imperva customer portal.
lr
Al
Configuring SecureSphere Web UI Users, Roles, and Permission for
c.
To create a new Web User Interface user based on an existing role in SecureSphere:
a,
Assigned window. For Web Application Security deployments, the most likely role will be either the Web
Security Admin role or the Administrator role.
20
9. Click Create.
©
Note
SecureSphere supports multiple authentication methods which are discussed in the SecureSphere Administrator’s
guide and covered in the SecureSphere Administration Class.
© 2017 Imperva, Inc. All rights reserved 1-2 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
Review Questions
No questions.
Exercises
Exercise 1: Create an Administrator User in the SuperVeda Lab Environment
.
ed
This activity was performed during Lesson-3 of the Administration class. If you are continuing from Administration,
skip this exercise and move on to Exercise-2. If you attended the administration class during a previous training and
rv
are only attending the Web Application Security course this week, please take a moment here to create a personal
administrative account.
se
Instructions: Create an administrator user for use during the remainder of the class. Be aware that you will be
re
prompted to change the password during the first login. Due to the configuration of the Training environment, you
will be able to reuse the original password as the new password.
s
ht
1. Beginning with the Veda Client virtual machine, open the Firefox Web Browser.
ig
2. The default homepage for Firefox is set to the SecureSphere login interface, however, if that doesn’t load,
manually enter the SecureSphere URL - https://veda-mx.superveda.local:8083/
lr
or https://192.168.51.200:8083/
Al
3. Login: admin
PW: Impuser123
c.
In
a,
rv
pe
Im
© 2017 Imperva, Inc. All rights reserved 1-3 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
6. From the Users & Roles window, click the button and select Create New User
se
re
s
ht
7. In the Create New User window, perform the following:
ig
a. Name the user after yourself following your company’s account naming convention.
b. Set the password to Barbapapa1. lr
Note:
Al
The password entered here is temporary and will be reset at first login. The password Barbapapa1 is
c.
recommended for temporary use. During the first time login, changing the password to Impuser123 is
recommended to simplify future lab access.
In
c. Select the Administrator role and click the right arrow to move it to Assigned
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 1-4 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
Exercise 2: Create a Web Security Admin User in the SuperVeda Lab Environment
rv
Create a second SecureSphere user and assign the Web Security Admin role to the secondary user
pe
1. From Users & Permissions again select Create > Create New User.
2. Create the new user account with your name and something to identify the role of Web Security Admin.
Im
Note:
17
The password entered here is temporary and will be reset at first login. The password Barbapapa1 is
20
recommended for temporary use. During the first time login, changing the password to Impuser123 is
recommended to simplify future lab access.
©
© 2017 Imperva, Inc. All rights reserved 1-5 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
Exercise 3: Compare Interface Views when using Administrator and Web Security Roles
Compare the SecureSphere web interface when using the Administrator and Web Security Admin Roles.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 1-6 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
Answers to Exercises
Exercise 1
Creating an administrator user closely follows the steps in the lesson. The Create New User window will look similar
to this screenshot:
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
Name the account following your company’s administrative account naming convention or FirstName_LastName.
Use the default SecureSphere user Password: Barbapapa1
17
Exercise 2
20
© 2017 Imperva, Inc. All rights reserved 1-7 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
Name the account following your company’s administrative account naming convention or First_Last_Web_Sec.
Again, use Barbapapa1 for the initial, temporary, password and later when logging into this account set the
a,
password to Impuser123.
rv
pe
Exercise 3
Compare the SecureSphere web interface when using the Administrator and Web Security Admin Roles.
Im
To simplify the process, consider logging in with one user account using Internet Explorer, and the other account
17
with Firefox.
20
© 2017 Imperva, Inc. All rights reserved 1-8 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
• Workspaces available to Web Security Admin users.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 1-9 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 1-10 Lesson 1: Web Application Security Admin Setup
SecureSphere 12.0 Web Application Security Course Manual
.
Overview
ed
You may find that SecureSphere has already been deployed in your organization. An important step, whether or not
you are responsible for deploying SecureSphere in your network, is to verify the configuration of SecureSphere to
rv
ensure that important Web assets are being monitored or secured by SecureSphere. To begin monitoring and
protecting the Web applications, you will need to verify the Sites Tree is configured with the proper network
se
settings, install SSL Keys for the protected Web applications, and configure the Web Service to work with proxied
and load balanced connections. To prevent exposure of sensitive information in the SecureSphere logs, you will
re
need to configure Data Masking for known sensitive data. To prevent exposure of sensitive information to clients
through Web error pages, you will need to take steps to configure a Custom Error Page.
s
Objectives
ht
By the end of this chapter, you should be able to:
ig
• Verify and configure all Web assets are protected by SecureSphere.
• Verify network traffic from Load Balancers and Proxies will be handled correctly.
•
•
Understand how to install SSL keys for the Web applications to be protected.
Prevent potential compliance issues by configuring Data Masking.
lr
Al
• Customize the SecureSphere default Error Page.
To ensure SecureSphere is able to monitor and protect Web applications, follow this high level outline of steps
In
described in the table below. Further details of how to conduct each step follow in the chapter.
a,
Process for Verifying the Monitoring and Protection of Web Assets in SecureSphere
Step Description
rv
In many organizations, the SecureSphere administrators provide a basic site configuration for known assets. Use the
following steps to verify, or add, the IP addresses of the Web servers.
©
© 2017 Imperva, Inc. All rights reserved 2-1 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
2. In the Sites Tree, expand a Site object.
rv
3. Select a Server Group object.
se
re
s
ht
ig
Note
It may not always be obvious that a Server Group object is a Web Server Group object if another naming
lr
convention has been followed.
Al
4. On the Definitions tab, review the Protected IP Addresses section. Confirm the system administrator:
a. Entered the appropriate IP addresses for the Web servers requiring monitoring or protection
c.
5. If an IP address is missing, it can be added by clicking the Create button to add a row to the Protected IP
20
Addresses list.
©
© 2017 Imperva, Inc. All rights reserved 2-2 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
6. Input the relevant IP Address, select the Gateway Group, and include a comment to identify the server
being protected.
se
re
s
ht
7. Once the information has been entered click to save your changes.
ig
Note
lr
The Gateway Group is used to identify which Gateways will be responsible for monitoring traffic to the IP address.
If you are unclear which Gateway Group should be selected, work with the system administrator to determine the
Al
correct setting.
By default, SecureSphere will monitor Web traffic directed to Ports 80 and 443. Traffic to non-standard ports will be
In
ignored unless these ports included in the Sites Tree, HTTP Service object.
To verify the HTTP and HTTPS ports and configure non-standard ports for protection, log into the SecureSphere Web
a,
4. On the Definitions tab, locate the HTTP Ports and SSL Ports entries.
©
© 2017 Imperva, Inc. All rights reserved 2-3 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
5. Enter any additional HTTP Ports and SSL Ports (HTTPS), using commas to separate the values.
ig
6. Click to Save Changes.
lr
Al
Verifying Forwarded Connections Settings
c.
When analyzing Web traffic, every aspect of the client request is inspected in an effort to separate the good traffic
from the bad. The SecureSphere Gateway inspects the network packets for source and destination IP addresses and
network ports. A load balancer or HTTP proxy server can complicate IP address identification. Depending on the
a,
network topology, the true source or destination IP address may differ from what is observed on the network.
The following diagram shows a Gateway first topology, where the SecureSphere Gateway handles client requests
pe
© 2017 Imperva, Inc. All rights reserved 2-4 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
client requests before the SecureSphere Gateway.
ed
rv
se
re
s
ht
Figure 2-2 - Load Balancer / Proxy Server First - Network Topology
ig
Each topology option raises specific configuration requirements for SecureSphere. The following table details the
most common impacts when SecureSphere is deployed with load balancers or proxy servers. lr
Al
Topology Inspection Impacts Impact Details
Gateway Source IP Address None The source IP address will be correct.
First Destination IP Configuration Use the Virtual IP address from the Load Balancer or proxy
c.
SSL Certificates None The SecureSphere Gateway will need all SSL Certificates to
properly inspect traffic for the protected assets.
LB/Proxy Source IP Address Configuration The source IP address will be obfuscated by the load balancer
a,
Destination IP Configuration All IP addresses and HTTP/HTTPs Ports on the Web servers
Address should be configured in SecureSphere.
pe
SSL Certificates Possible simple SSL certificates may not be required if the load balancer or
Configuration proxy performs SSL offloading.
Im
Table 2-2 - Comparison of Gateway and load balancer / proxy server topolocy impacts
Note
17
Load balancers and proxy servers often make it easy to direct additional IP addresses and ports to the protected
Web applications, all of which need to be configured in SecureSphere. If not, an uninspected path to the
application could exist, significantly degrading the security position of the SecureSphere deployment.
20
When client traffic passes through a load balancer or proxy server first, the Gateway is likely to identify the IP
address of the load balancer or proxy as the source IP address and not the client’s original IP address. If a load
© 2017 Imperva, Inc. All rights reserved 2-5 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
balancer or proxy server is unaccounted for in the configuration of SecureSphere, this will impact all policies that
depend on the true client source IP address including the ThreatRadar IP reputation policies. Fortunately, load
balancers and proxies will add an HTTP Header containing the clients IP address and this can be extracted by
.
ed
SecureSphere with the Forwarded Connections configuration.
rv
se
re
s
ht
ig
lr
Al
Figure 2-2 - Load Balancer and Proxy impact on client requests
c.
Figure 2-3 - Main > Setup > Sites - HTTP Service object - Forwarded Connections
The Forwarded Connections is enabled by selecting Identify real client IP according to HTTP forwarding header. For
©
each load balancer or proxy, enter the Header Name and select a proxy IP group from Proxy IP Group drop down
list.
© 2017 Imperva, Inc. All rights reserved 2-6 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Figure 2- 4 - Forwarded Connections settings
It is important to include an IP group for each Header Name instead of the default value of Any. If the Proxy IP Group
se
left with the default setting of Any, it is then possible for an external user to spoof, or fake, their IP address which
will limit the effectiveness of all security policies depending on an IP address match condition.
re
s
ht
ig
lr
Al
c.
In
a,
rv
Additional information on the configuration of Forwarded Connections is available in the SecureSphere Web
pe
keys must be uploaded to the HTTP Service object in SecureSphere. Extreme caution should be used when working
with SSL Key files due to the damage that could be done if the keys were to fall into the wrong hands. Follow your
company’s policies for all SSL Key handling procedures and avoid any unnecessary copying of the SSL Key files. For
20
example, when uploading the SSL Keys to SecureSphere from a network share it would be better to upload the SSL
Keys directly from the network share, instead of copying to your desktop to then upload.
©
© 2017 Imperva, Inc. All rights reserved 2-7 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Note
If the Hardware Security Module (HSM) is installed on your gateways, the SSL Keys will be installed directly to the
.
gateway appliance and a ‘fake’ key is generated by the HSM for importing into the SecureSphere Web Interface.
ed
Detailed instructions are provided in the Imperva SecureSphere Administration Guide.
rv
Installing SSL Keys
se
To install the SSL Keys into SecureSphere, log into the SecureSphere Web interface and perform these steps:
1. Acquire the SSL Keys, or arrange for someone who has access to the SSL Keys to be available during this
re
configuration.
2. Select Main > Setup > Sites.
3. Expand the Site and Server Group objects to locate the relevant HTTP Service object.
s
ht
ig
lr
Al
c.
6. Click the Create button and the Add SSL Keys pop-up window will appear.
rv
pe
Im
17
20
© 2017 Imperva, Inc. All rights reserved 2-8 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Tip
When uploading SSL Keys to SecureSphere, include the expiration date in the name of the key. Doing this
.
consistently will help with key management.
ed
8. Select the key file format based on the SSL Key.
a. For PEM format SSL Keys, the public and private keys will be in separate PEM files.
rv
se
re
Note
s
The public key may also be called a certificate or signed certificate.
ht
b. For PKCS12, PFX, or P12 files, the public and private keys are in the password protected file.
ig
lr
Al
9. Click the Browse button. A file browser window to locate the SSL Key will appear.
10. When the file or files have been selected and the password entered, if required, click the Upload
button.
c.
In
a,
rv
pe
Im
11. When the upload completes, the Web interface will show the details of the uploaded certificate.
17
© 2017 Imperva, Inc. All rights reserved 2-9 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Note
Verification of the SSL Keys in the Alerts log is normally performed immediately after installation to verify the SSL
.
keys are working properly. It is also possible that more than one SSL Key is in use and a required key was not
ed
installed. However, the necessary background topics have not been covered yet so the verification of SSL Keys will
be covered later in the tuning lesson.
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-10 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
traffic for the configured Web applications. This also means SecureSphere can record traffic occurring between the
ed
clients and server. However, this can cause issues with sensitive information like credit card numbers, government
identification numbers, or login credentials. If sensitive information is recorded in the SecureSphere traffic logs, it
rv
can cause serious problems with regulatory compliance. Fortunately, sensitive data can be excluded from the logs
with Data Masking. Data Masking is a feature that replaces sensitive values with repeated asterisks (*) symbols. Data
se
masking is performed by the Gateway during traffic inspection and the sensitive values are masked in memory
before the first write. Data Masking only applies to the process of logging events in SecureSphere and does not alter
the client requests or server responses.
re
Data Masking is configured under the Sites Tree in the HTTP Service object. Two forms of data masking for Web
applications are available:
s
1. Mask Data in Elements
ht
2. Sensitive Dictionaries
ig
lr
Al
c.
In
a,
rv
Each of these Data Masking methods has advantages and limits that are important to understand in order to ensure
pe
Masking based on elements is ideal for sensitive values that appear in a consistent location in the Web application,
like the username and password parameters on a Web login page.
20
SecureSphere provides a default list of elements for masking called the Default Data Masking Group. The list is
located in Global Objects, Data Masking Groups scope.
©
© 2017 Imperva, Inc. All rights reserved 2-11 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 2-7 - Main > Setup > Global Objects - Scope Selection - Data Masking Groups
Note
re
In the Data Masking Group view, the masking elements are referred to as fields.
s
The Default Data Masking Group is predefined and contains sensitive elements used in popular Web application
ht
frameworks. The performance impact of the Data Masking in Elements check is minimal and the default list will not
have a negative impact on performance. For these reasons, the Default Data Masking Group is an excellent starting
ig
point for new deployments and newly on-boarded Web assets. However, Web assets built in-house often have
elements unique to the application which will require customization of the Mask Data in Elements list.
Additional lists may be required with additional protected Web assets based on the types of sensitive information
and the customizations present in the Web pages. For some organizations with a common Web server software and
In
content framework, a single list may be sufficient. A good example of this would be for a Web hosting company that
provides WordPress content management for the sites. Because all sites have a common content management
system, a single Data Masking Group could be used. In most corporate deployments, however, multiple
a,
technologies are in use and it will likely be better to have several custom Data Masking Groups.
rv
Tip
pe
If multiple Web content management technologies are in use, prioritize the most sensitive Web assets first and
customize a list for those assets. Customized lists for lower priority assets can be created when needed.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-12 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
Figure 2-8 - Data Masking Group
s
ht
The Data Masking Group is a listing of names to be identified during traffic inspection. The associated values will be
masked for every name that matches. Inspection for a particular field name is performed if the Enabled checkbox is
checked and will apply to the Parameters, Headers, or Cookies based on which boxes are checked.
ig
Column
Name
Purpose
The name of the field to match in the Web traffic.
lr
Al
Enabled Enable or disable matching for this field. New fields are enabled by default. To disable them
deselect the enable checkbox.
Match Option, Full or Prefix. From the dropdown menu, select whether you want to match the full name,
c.
Parameters Determines if inspection for this parameter should apply to Web page parameters.
Headers Determines if inspection for this parameter should apply to Web headers.
Cookies Determines if inspection for this parameter should apply to cookies.
a,
Consider an accounting firm that receives regular sensitive information from their customers through an Application
Programming Interface (API). The earnings field, API_Earnings, and the API ID, API_ID_XXXXX, field need to be
masked. The API_Earnings value should be matched anywhere while the API_ID only occurs in the HTTP headers or a
Im
cookie. Unfortunately, the XXXXX part of API_ID_XXXXX is randomly assigned so the masking needs to work for all
names starting with API_ID. The following entries are configured to properly mask these sensitive values. Commented [A1]: Can this be clarified?
17
20
Note
©
Names in the Data Masking Group are case insensitive, so api_earnings will match API_Earnings.
© 2017 Imperva, Inc. All rights reserved 2-13 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
Host: 192.168.53.105
ed
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
rv
Accept-Encoding: gzip, deflate
Cookie: ASPSESSIONIDCQBCRBQC=IGPLOOOBAKHOCNLGBEDMAECA; API_ID_93155
se
API_Customer_Name=BronzeWerks&API_Earnings=1.238M
SecureSphere Logs POST https://www.supervedal.local:8443/api_cust.asp HTTP/1.1
Host: 192.168.53.105
re
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
s
Accept-Encoding: gzip, deflate
Cookie: ASPSESSIONIDCQBCRBQC=IGPLOOOBAKHOCNLGBEDMAECA; API_ID******
ht
API_Customer_Name=BronzeWerks&API_Earnings=******
ig
Table 2-3 - HTTP request details before and after masking
1. Select Main > Setup > Sites and expand the Sites Tree to select the relevant HTTP Service object.
c.
© 2017 Imperva, Inc. All rights reserved 2-14 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
b. In the Create Data Masking pop-up window, enter the name for this list.
.
ed
rv
se
c. Choose Use Existing and select Default Data Masking Group from the menu.
re
Note
Generally, it is easier to tune a list of common elements, rather than create the list from scratch. If; however, the
s
Web developers supply a list of all sensitive elements that require masking, creating a custom list with just those
ht
elements would make sense.
ig
d. Click Create.
5. In the HTTP Service window, verify the newly created Data Masking Group is selected.
6. Click to save the changes.
7. Select Main > Setup > Global Objects.
lr
Al
8. In the Scope Selection menu, select Data Masking Groups and then locate your newly created Data Masking
Group in the Globals Tree.
c.
9. With the new Data Masking Group selected, use the + and X buttons to add or remove rows to the table to
customize the fields as needed.
In
The secondary method for masking sensitive information is with Sensitive Dictionaries. A Sensitive Data Dictionary is
a Global Object consisting of one or more regular expression patterns that match the sensitive data. Data Masking
pe
with Sensitive Dictionaries is especially useful when masking must be performed and the name of the parameter,
HTTP header, or cookie is unknown. Sensitive Dictionaries require the data have a predictable format like credit
Im
card numbers or government identification numbers. Sensitive data that does not follow a consistent format, like
passwords, needs to be masked with the Masking in Elements feature previously covered.
17
Note
A regular expression a sequence of characters that define a search pattern. This course will not cover the design
20
or creation of regular expression patterns. However, the SecureSphere Web Security User’s Guide does provides
sufficient information creating basic regular expressions.
©
© 2017 Imperva, Inc. All rights reserved 2-15 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
masking. SecureSphere comes pre-configured with the following Sensitive Data Dictionaries:
ed
Name Description
American Express Credit Card Numbers Credit Card Identification and Masking
rv
Diner's Club/Carte Blanche Credit Card Numbers Credit Card Identification and Masking
se
Discover Credit Card Numbers Credit Card Identification and Masking
JCB Credit Card Numbers Credit Card Identification and Masking
MasterCard Credit Card Numbers Credit Card Identification and Masking
re
U.S Social Security Numbers US Social Security Number Identification and Masking
Visa Long Credit Card Numbers Credit Card Identification and Masking
s
Visa Short Credit Card Numbers Credit Card Identification and Masking
ht
enRoute Credit Card Numbers Credit Card Identification and Masking
ig
Understanding Sensitive Data Dictionaries
lr
Sensitive Data Dictionaries are located in Main > Setup > Global Objects, Sensitive Data Dictionary Groups scope.
Al
c.
In
a,
Figure 2-9 - Main > Setup > Global Objects - Sensitive Data Dictionary Groups scope
rv
The Sensitive Data Dictionary window shows the configuration for the selected dictionary. The predefined Sensitive
Data Dictionaries will show the Application Defense Center (ADC) emblem which indicates that changes are limited.
pe
Below the ADC emblem are several configuration options that will be covered later because it is important to first
understand the patterns themselves.
Im
Column Purpose
Display Name The specific name of the pattern. If this Sensitive Data Dictionary
is used in a security policy, the name will be visible in any
17
Pattern (Type - Simple) The exact text to mask for in the Web traffic.
Pattern (Type - Advanced) The regular expression pattern to be applied to the Web traffic.
©
© 2017 Imperva, Inc. All rights reserved 2-16 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Elements without masking (Type - Advanced) This is only available for Advanced patterns and identifies the
regular expression pattern groups that will remain in plain text,
i.e. unmasked.
.
ed
Figure 2-4 - Dictionary Patterns Table Details
rv
The following custom Sensitive Data Dictionary example has one Simple and one Advanced pattern showing.
se
re
Figure 2-10 - Example - SuperVeda Custom Sensitive Data Dictionary
s
Simple patterns are, not surprisingly, easy to configure. The exact text that should be identified is entered in the
ht
pattern field. The Advanced setting allows for both simple and advanced pattern matching and has the following
requirements:
ig
• Simple patterns are proceeded part= and Advanced, regular expression, patterns with rgxp=
•
•
The pattern itself must be enclosed in double quotes lr
Search terms are comma separated and spaces are acceptable before or after the commas
Al
• Multiple part= terms are allowed but only one rgxp= term can be used per pattern
• Data Masking behavior is controlled by parenthesis ( ) groupings in the regular expression
• Regular expression groups are counted from the left and used in Elements without masking as $1,$2,…
c.
The additional configuration options for the Sensitive Data Dictionary above the patterns list.
In
The Validation option allows an additional Luhn validation check on numeric identified by the patterns. Luhn
Im
validation is a form of error checking that is used for credit card numbers. An identified number that passes both the
regular expression match and the Lunh validation check can be identified as a credit card number with very high
confidence. The last two options, Case Sensitive and Limited Values, are relatively self-explanatory and are typically
17
needed for sensitive dictionaries that will be used in security policies by allowing precise matching of the Web
traffic.
20
Note
Luhn validation is commonly referred to as the Luhn Algorithm or the Modulus 10 / Mod 10 algorithm. It is a
©
© 2017 Imperva, Inc. All rights reserved 2-17 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
1. Select Main > Setup > Sites and expand the Sites Tree to select the relevant HTTP Service object.
ed
2. Select tab in the HTTP Service window.
3. Click the icon to expand the Data Masking section.
rv
se
re
s
ht
ig
4. On the top of the Sensitive Dictionaries list, click the button. A new row will be added to the list.
5. Select an option from existing Sensitive Dictionaries drop down list as needed.
lr
Al
c.
In
a,
rv
6. If the available data dictionaries are not suitable, you will need to create a custom Sensitive Dictionary as
follows:
pe
a. Click the icon and the configure Sensitive Dictionary window will appear.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-18 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
b. On the top of the Global Trees pane, click the and the Custom Data Dictionary window will appear.
.
ed
rv
se
re
s
c. Enter the Name for the custom dictionary.
ht
d. Set the Case Sensitive and Limited Values options as needed; these options can be changed later.
ig
e. Click the button.
f. From the Sensitive Dictionary window, click the button at the top of the patterns table to add a row to
the table. lr
Al
c.
In
a,
7. When the Configure Sensitive Dictionary window closes you will see the HTTP Service window.
8. If the newly created Sensitive Dictionary is not selected, select it.
pe
The next configuration step for the HTTP Service object is to set the default error page. This is a preparation step
that will become effective when SecureSphere is configured to block traffic. The default error page will be displayed
to clients blocked by a security policy. There are two main reasons to change the default error page from the pre-
20
defined value.
• Company branding
• Unintended disclosure of SecureSphere Protection
©
© 2017 Imperva, Inc. All rights reserved 2-19 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
If a regular client is blocked, the block page ensures they know there was a problem with their request. Having the
block page branded by the company ensures the client is aware that their request went to the right location and
that it was intentionally denied. This is especially important when legitimate client traffic is accidentally identified as
.
ed
an attack and is blocked. The block page will encourage legitimate users to report the issue and the incorrect traffic
identification can be identified and resolved.
rv
The second reason is less obvious but is still important. The default error message is known to hackers and criminals.
If they are blocked and see SecureSphere’s pre-defined default error page, it is as good as advertising that your Web
se
application is protected by SecureSphere. For unskilled hackers, the realization that SecureSphere is protecting the
site may be enough to convince them to give up and move along. However, for elite hackers and criminal
organizations this is just valuable information and they will use to adjust to more stealthy investigations and attack
re
preparations which can be much harder to detect.
It is important to note that the Default Error Page is only visible to Web users when the Server Group mode is set to
s
Active and a security policy configured for blocking is triggered by the user’s activity. For most, switching the Server
ht
Group to Active will only be done be after the initial deployment, configuration and at least one round of tuning.
Depending on the complexity of the protected Web assets, this could take between three weeks to a couple of
ig
months from the installation date for SecureSphere to the switch to active. Since the changing the default error
page is important for the overall security position of SecureSphere, but is only noticeable when SecureSphere is set
lr
to blocking several weeks later, it is considered a best practice to update the configuration during the initial
deployment. This excludes the chance of forgetting later on.
Al
The Error Page settings are on the HTTP Service object under the Default Tab.
c.
In
a,
rv
pe
Im
17
20
© 2017 Imperva, Inc. All rights reserved 2-20 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Tip
.
ed
For most organizations, redirecting to an URL which is maintained by the Web developers is the best choice. This
lets the Web developers retain design and branding control over the block page, instead of requiring the
SecureSphere team to maintain the page through the SecureSphere Web interface.
rv
Customizing the Default Error Page
se
1. Select Main > Setup > Sites.
2. Expand the Site and Server Group objects to locate the relevant HTTP Service object.
re
s
ht
ig
3. In the HTTP Service window, select the tab.
lr
Al
4. Click the to expand the Error Page section.
c.
In
a,
rv
pe
5. By default, Page is selected and shows the default HTTP Page that needs to be modified:
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-21 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Note
Even if the default error page will be a redirection URL, it is important to change the default page text to ensure it
.
will always be different from the original page block page provided by SecureSphere.
ed
6. Locate and remove text starting with “This page can’t be displayed…” and ending with “The incident id is:
${SESSION_ID}.
rv
se
re
7. Enter a unique error statement like “Your page could not be displayed” or “Problem processing your request”
s
or “Page not found.” Uniqueness is important because any consistent pattern here could become a clue for the
hackers.
ht
ig
lr
Al
8. Click to save changes.
9. If SecureSphere will be configured to redirect to a URL, select the Redirect option and enter the desired
c.
destination URL.
In
a,
rv
Note the use of the $(HOST) placeholder. This will be substituted with the host name in the client request.
10. Click to save changes.
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-22 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Review Questions
1. Explain what Data Masking does and the possible consequences of unmasked sensitive data for a
.
SecureSphere deployment.
ed
2. Describe what will happen with Web traffic directed at an IP Address that is not present in the Protected IP
Addresses list. Likewise, what will happen with traffic directed to a port that is not configured as an HTTP or
rv
SSL Port?
3. For a Web asset with both HTTP and HTTPs activity, how serious of an issue would it be to not upload the SSL
se
Key to SecureSphere? Why?
4. Give two or more reasons to modify the default error page.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-23 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Exercises
.
ed
Instructions: For the SuperVeda Site, verify the IP Addresses and Ports are configured for traffic inspection. If
anything is missing or incorrect, update the SuperVeda site objects to match the following:
rv
Item Setting
Server: VedaWeb 192.168.53.105
se
HTTP Ports 80, 8008
HTTPs Ports / SSL Ports 443, 8443
re
Note
s
You will need to check both the Server Group and Service levels of the Sites Tree to complete this task.
ht
Use the following steps to verify, or add, the IP addresses of the Web servers.
ig
1. Beginning with the Veda Client virtual machine, open the Firefox Web Browser.
2. The default homepage for Firefox is set to the SecureSphere login interface. If the page fails to load
lr
automatically, try manually entering the SecureSphere URL - https://veda-mx.superveda.local:8083/
or https://192.168.51.200:8083/
Al
3. After successfully logging in, the default page, Main > Setup > Sites, should appear. If not, select Main >
Setup > Sites.
4. Locate the Sites Tree and expand the SuperVeda Site.
c.
6. On the Definitions tab, review the Protected IP Addresses section. Confirm the system administrator
Im
entered the appropriate IP addresses for the Web servers requiring monitoring or protection by the
specific SecureSphere Web security gateway or Gateway Group. In this case, verify the
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-24 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
www.superveda.local IP address is configured as 192.168.53.105, and the Gateway Group is set as veda-gw.
.
ed
rv
se
re
s
ht
ig
7. For the SuperVeda Web server group, the required IP addresses are present. If an IP address was missing,
however, it could be added at this time.
© 2017 Imperva, Inc. All rights reserved 2-25 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
3. On the Definitions tab, locate the HTTP Ports and SSL Ports entries.
.
ed
rv
se
re
s
ht
ig
4. For your convenience, the required ports documented at the beginning of this section are repeated here:
Instructions: Configure the default error page so that when SecureSphere is configured to block the page will be
displayed to clients blocked by a security policy.
rv
© 2017 Imperva, Inc. All rights reserved 2-26 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
5. Use Default Error Page is selected by default and the error page type is set to Page with the Imperva defined
HTTP Page which needs modification.
lr
Al
c.
In
a,
rv
Note
pe
Even if the default error page will be a redirection URL, it is important to change the default page text to ensure it
will always be different from the Imperva defined page to remove the possibility of accidentally advertising that
Im
6. Locate and remove text starting with “This page can’t be displayed…” and ending with “The incident id is:
${SESSION_ID}.
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-27 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
7. Enter a unique and minimally informative error statement. Uniqueness is important because any consistent
pattern across multiple Imperva customers could become a clue for attackers.
.
ed
rv
se
Possible alternatives:
The page could not be displayed.
Problem processing your request.
re
Page not found.
8. Click to save changes.
9. If SecureSphere will be configured to redirect to a URL, select the Redirect option and enter the desired
s
destination URL. The placeholder $(HOST) can be helpful since it will be replaced with the host name in the
ht
client’s blocked request.
ig
lr
Al
10. Click to save changes.
c.
Instructions: Upload the wc.superveda.pfx certificate to the SuperVeda – Http – Service. The Certificate is a wildcard
certificate and is located under the tools folder.
a,
Certificate Details:
rv
masking list named SuperVeda Data Masking List and apply this custom list to the SuperVeda HTTP Service object.
©
© 2017 Imperva, Inc. All rights reserved 2-28 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
• American Express
• MasterCard
• Visa (Short & Long)
rv
• SuperVeda Credit Cards
se
The SuperVeda company cards will require a custom sensitive data dictionary and the following information has
been provided:
re
• SuperVeda Credit Card Numbers are 16 digits long and start with 1234 for the first four digits.
The following regular expression pattern has been provided for identifying SuperVeda credit cards:
part="1234", rgxp="([^\d]|^)(1234)([-\.\s\\\/=]?)(\d{4})([-\.\s\\\/=]?)(\d{4})([-\.\s\\\/=]?)(\d{4}([^\d]{1}|$))”
s
Elements without Masking: $1,$3,$5,$7,$8
ht
Tip:
ig
The info.txt file available on the desktop has the above regular expression for your convenience. Be sure the final
string is properly formatted with a part= and rgxp= parts and the patterns are enclosed in quotes. If you have any
lr
difficulty with this part check the answer to this exercise or work with the instructor to identify the issue.
Al
Exercise 7: Modify the Default Error Page Text
c.
Instructions: Modify the text in the pre-defined Default Error Page to reduce the risk of outsiders identifying
SecureSphere.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-29 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
SecureSphere deployment.
ed
a. Data Masking replaces sensitive values with hash symbols in the SecureSphere security logs. It only applies
to SecureSphere logging and does not alter the client request, or server response.
rv
b. Having un-masked sensitive data in the security logs is likely non-compliant with common compliance
regulations like PCI or HIPPA and can result in falling an audit.
se
2. Describe what will happen with Web traffic directed at an IP Address that is not present in the Protected IP
Addresses list. Likewise, what will happen with traffic directed to a port that is not configured as an HTTP or
SSL Port?
re
a. Web traffic directed to an IP address absent from the Protected IPs list is allowed and ignored by
SecureSphere. It will not be inspected, logged, or controlled in any way.
b. Web Traffic directed to a network Port number absent from the SecureSphere configuration will be allowed
s
and ignored by SecureSphere. This traffic will not be inspected or controlled in any way.
ht
3. For a Web asset with both HTTP and HTTPs activity, how serious of an issue would it be to not upload the SSL
Key to SecureSphere? Why?
ig
a. A missing SSL Key is a serious issue.
b. Without the SSL Key, absolutely no protection is provided for the HTTPs traffic based on that key. The
lr
encrypted areas of a Web application almost always sensitive areas of the application and being unable to
inspect this traffic leaves the application unprotected.
Al
4. Give two or more reasons to modify the default error page.
a. Modifying the error page allows for company branding and messaging and can minimize end-user questions
to being blocked.
c.
b. Hackers and internet criminals are familiar with the SecureSphere Default Error Page and seeing it will let
them know that SecureSphere is protecting the Web application. With this information, skilled criminals
In
may obfuscate their attack preparations and making them harder to track. Without this information, the
criminal is likely to trigger more simple security violations, each of which is an opportunity for the security
a,
© 2017 Imperva, Inc. All rights reserved 2-30 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
Answers to Exercises
.
ed
1. Log into SecureSphere with the custom administrator login created in the exercises from lesson 1. Commented [A2]: So screenshot should have first_last
instead of student_admin
rv
se
re
s
2. If this is the first time logging in with this account the password will need to be reset. Set the password to
ht
Impuser123.
ig
lr
Al
c.
In
a,
4. From the Sites Tree, expand the SuperVeda Site and select SuperVeda Web SG.
17
20
©
5. Verify the VedaWeb server IP address, 192.168.53.105, is in the Protected IP Addresses table:
© 2017 Imperva, Inc. All rights reserved 2-31 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
Exercise 2: Verify all HTTP and HTTPS Ports are Protected lr
1. Select the SuperVeda – Http – Service object from the Sites Tree.
Al
c.
In
a,
rv
2. Verify HTTP ports 80 and 8008 and SSL ports 443 and 8443 are listed and if not, add the ports using commas to
pe
separate them.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-32 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
Exercise 3: Configure and Customize a Default Error Page
ht
The steps in this exercise are fully documented in Exercise 3. When done the setting Use Default Error Page should
ig
still be selected, the page type is Redirect, and the redirect URL should be HTTP://$(HOST)/error.htm.
© 2017 Imperva, Inc. All rights reserved 2-33 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
2. From Scope Selection select Data Masking Groups. It may be necessary to scroll down when locating the Data
Masking Groups scope.
rv
se
re
s
ht
ig
3. Click to create a new Data Masking Group.
4. In the Create Data Masking Group window, name the new data masking group SuperVeda Data Masking List.
5. Select Use Existing: Default Data Masking Group. lr
Al
c.
In
a,
rv
pe
Im
6. Click . The custom data masking group is now available for use with the SuperVeda – Http –
Service.
7. Select Setup > Sites to return to the Sites Tree.
17
© 2017 Imperva, Inc. All rights reserved 2-34 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
11. Select the SuperVeda Data Masking list.
s
ht
ig
12. Click to save changes. Modifications of the custom Data Masking list will be limited to SuperVeda Data
and will not impact other Web applications. lr
Exercise 6: Assign Sensitive Dictionaries
Al
Assigning the predefined sensitive data dictionaries is relatively straightforward.
c.
1. Select Main, Setup > Sites and the SuperVeda – Http – Service object.
In
2. From the Service window, select the Operation tab and expand the Data Masking section.
a,
rv
pe
Im
17
3. On the Sensitive Dictionaries table, click the Create button four times
© 2017 Imperva, Inc. All rights reserved 2-35 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
5. Configure the resulting rows as follows:
se
o American Express Credit Card Numbers
o MasterCard Credit Card Numbers
o Visa Long Credit Card Numbers
re
o Visa Short Credit Card Numbers
s
ht
ig
6. Click to save changes.
lr
Al
7. Create a custom Sensitive Data Dictionary as follows:
c.
© 2017 Imperva, Inc. All rights reserved 2-36 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
12. Name the new Sensitive Dictionary SuperVeda Credit Cards.
ht
13. Leave the remaining settings in their default values and click .
ig
14. Once the SuperVeda Credit Cards sensitive data dictionary group is created, it is auto-selected and ready for
configuration.
lr
Al
c.
In
Type Advanced
rv
Pattern:
part="1234", rgxp=”([^\d]|^)(1234)([-\.\s\\\/=]?)(\d{4})([-\.\s\\\/=]?)(\d{4})([-\.\s\\\/=]?)(\d{4})([^\d]{1}|$)”
pe
Note
© 2017 Imperva, Inc. All rights reserved 2-37 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
If you copy and paste the pattern, you may see the following error message:
.
ed
rv
This can be corrected by checking every dash and quote in the pattern for windows smart-replacements. If found,
se
simply delete the smart quote or extended hyphen and type in a replacement quote or hyphen. In the
SecureSphere Web Interface, the regular character will be entered and your pattern should be allowed to save.
re
17. After saving the changes, close the Sensitive Dictionary window.
s
ht
ig
19. Click to save changes.
lr
Al
Exercise 7: Modify the Default Error Page
c.
The steps in this exercise tightly follow the process documented earlier in this lesson. Any significant modification to
the default error page would be acceptable. If you followed the steps demonstrated in this lesson the resulting
In
© 2017 Imperva, Inc. All rights reserved 2-38 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 2-39 Lesson 2: Verifying the Initial Configuration
SecureSphere 12.0 Web Application Security Course Manual
.
create and map Web application objects in the Sites tree and how to set default learning thresholds used by all Web
ed
application objects in the learning process.
rv
Objectives
se
By the end of this lesson you should be able to:
re
• Create and Configure Web Applications, as needed.
• Direct client activity to the relevant Web Application objects.
s
• Adjust the initial learning thresholds based on the protected applications and Imperva best practice
ht
recommendations.
ig
Creating and Configuring Web Applications lr
Web Application Sites Tree objects are useful for two reasons. First, Web application objects allow application of
Al
unique security policies allowing tight control over activity on each protected asset. Second, Web application objects
are directly tied to SecureSphere’s Web Application Profile, a learning engine that builds a model of expected client
c.
For example, a company may have both a content management system (CMS) and an e-commerce application on
a,
the same server. Having a unique Web application object for each asset would allow aggressive security on the CMS
application, such as limiting logins to only intranet IP addresses. At the same time a cautious security policy for the
rv
e-commerce application could require a few abnormal requests before initiating a block, addressing concerns
pe
around the possibility of blocking legitimate activities. For both applications, the learning process will perform better
because the client behavior for each application is more consistent. The CMS client activity is directed to the CMS
Im
application object and shopping activity is handled by the e-commerce application object. Both security Policies and
the Web Application Profile will be covered in detail in future lessons.
17
Proper naming of items in the Sites Tree is an important practice to streamline management of SecureSphere. For
example, when an HTTP Service object is created, SecureSphere automatically creates a Default Web Application
20
object underneath it. However, if several HTTP Service objects are created, there will be multiple Web application
objects all named “Default Web Application” which can lead to confusion.
©
Note
It is an Imperva best practice to rename all Default Web Application objects to unique names that correspond
with the protected Web assets.
© 2017 Imperva, Inc. All rights reserved 3-1 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
3. From the Web Application window, select the Definitions tab and locate the Name field.
s
ht
ig
lr
Al
c.
In
a,
4. Enter a new name in the Name field and click to save your changes.
rv
5. Verify the name is updated by checking the full name across the top of the Web Application window.
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 3-2 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
Note
Although the name change has been saved, the Sites Tree requires a page reload to display the change. The value
showing at the top of the Web Application window shows the current value.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
© 2017 Imperva, Inc. All rights reserved 3-3 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
A more nuanced strategy is often better. Review the existing applications and group them by the sensitivity of the
data involved, the underlying technology of the Web application, and the purpose of the Web application. If several
.
ed
applications have a similar level of sensitivity, common technology, and a similar purposes, they would be excellent
candidates to share a common Web Application object in SecureSphere.
rv
The following table shows an analysis of the SuperVeda Web environment, including future planning.
se
Web Application Purpose Sensitivity Data Types Technology Possible Grouping
re
VedaAdmin SuperVeda Admin Portal Very High PW Custom ASP App 1
SuperVeda E-commerce Website High PW, PII, PCI Custom ASP
s
ht
SuperVeda-2.0 App 2
E-commerce Website High PW, PII, PCI Custom ASP
(future)
ig
Customer Forum
Forum / Social Low lr PW, PII WordPress App 3
(future)
Al
Table 3-1 - Categorizing Web applications for protection
From this analysis, all SuperVeda Web applications could be protected with three SecureSphere Web Application
c.
objects.
In
If many applications will be protected but only a few handle sensitive information it may be helpful to only create
a,
application objects for the sensitive applications. The remaining non-sensitive applications can will use the Default
Web Application which will simplify management of those applications.
rv
To create additional Web Application objects under a single HTTP Service object, follow the steps below:
Im
3. With the HTTP Service object selected, click the Create button, the Create Application dialog will appear.
© 2017 Imperva, Inc. All rights reserved 3-4 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
4. Name the Web application object something different from your prior Web Application object and click Create.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 3-5 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
To configure the Host/URL to Application Mapping setting, follow the steps below:
ed
1. Select Main > Setup > Sites.
rv
2. Expand the Site down to the HTTP Service object.
se
re
s
ht
ig
lr
3. On the HTTP Service window, select the Applications tab.
Al
c.
In
a,
rv
pe
Im
17
4. From the Host/URL to Application Mapping area, click the Create button to add a new row to the mapping
20
table.
©
© 2017 Imperva, Inc. All rights reserved 3-6 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
The Host/URL to Application Mapping feature supports precise matching conditions. However, it is sufficient to begin
with a simple matching setting. For example:
.
ed
Parameter Value
rv
Priority 1
se
Host admin.superveda.local
re
Host Match Type Exact
s
Exclude URLs <BLANK>
ht
Application VedaAdmin – Web Application
ig
lr
Al
c.
In
a,
rv
5. Once you have entered your desired parameters and values, click to save your changes.
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 3-7 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
Switching to “Protect” Mode Thresholds (Web)
ed
The global learning threshold settings are located in the Admin Workspace under Admin > System Definitions.
rv
se
re
Figure 3-1 - Selecting Admin > System Definitions in the SecureSphere Web Interface
Note
s
ht
Viewing and adjusting these settings will a SecureSphere user account with administrator privileges. Depending on
ig
the account permissions, it be necessary to work with the SecureSphere administrators for the following settings.
lr
From the System Definitions pane, expand the Dynamic Profile folder and select the Switching to “Protect” Mode
Al
Thresholds (Web).
c.
In
a,
rv
pe
Im
© 2017 Imperva, Inc. All rights reserved 3-8 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 3-3 - Switching to "Protect" Mode Thresholds (Web)
The Imperva Best Practice recommendation for Web application Switching to “Protect” Mode Thresholds (Web) are
re
as follows:
Threshold Setting Recommended Default
s
Duration (in hours) required to switch all Cookies to protect or ignored mode
ht
720 (hrs.)
Duration (in hours) required to switch all URLs to protect mode
ig
Table 3-2 - Imperva Best Practice – Duration in Hours for Switching To "Protect" Mode Thresholds (Web)
lr Protected Application Size
Al
Threshold Setting Small Medium Large and Highly
Active
c.
Table 3-3 - Imperva Best Practice – "Occurrences" settings for Switching to "Protect" Mode Thresholds (Web)
a,
Note
rv
For this class, any remaining threshold settings should be left with their default values.
pe
Im
Adjusting the threshold settings outside class can be easily done by entering the desired values in the fields of the
Switching to “Protect” Mode Thresholds (Web) window and clicking Save.
17
20
©
© 2017 Imperva, Inc. All rights reserved 3-9 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
Review Questions
1. Give two reasons for renaming the default Web application.
Exercises
.
Exercise 1: Rename the Default Web Application
ed
Instructions: For the SuperVeda – Http – Service, rename the Default Web Application object.
rv
Original Name New Default Web Application
se
New Name SuperVeda – Web Application
re
Follow the steps outlined below:
s
2. From the Sites Tree navigation pane, expand the SuperVeda Site object and select Default Web Application.
ht
ig
lr
Al
c.
In
3. From the Web Application window, select the Definitions tab and locate the Name field.
a,
rv
pe
Im
17
20
4. Enter the new Name SuperVeda - Web Application and click to save your changes.
5. Verify the name is updated by checking the full name across the top of the Web Application window.
©
© 2017 Imperva, Inc. All rights reserved 3-10 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
1. Select Main > Setup > Sites.
ed
2. Expand the SuperVeda Site to the SuperVeda – Http – Service object and select it.
rv
se
re
s
ht
ig
3. With the SuperVeda – Http – Service selected, click the Create button, the Create Application dialog will
appear.
lr
Al
4. Name the application VedaAdmin – Web Application and click Create.
c.
In
a,
© 2017 Imperva, Inc. All rights reserved 3-11 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
1. Select Main > Setup > Sites and expand the SuperVeda Site down to the SuperVeda – HTTP – Service object.
.
ed
rv
2. On the HTTP Service window, select the Applications tab.
se
re
s
ht
ig
lr
Al
c.
3. From the Host/URL to Application Mapping area, click the Create button to add a new row to the mapping
In
table.
a,
rv
pe
Im
4. Under the SuperVeda – Http – Service, configure the Host/URL to Application Mapping.
a. Set the Default Application.
17
Parameter Value
20
© 2017 Imperva, Inc. All rights reserved 3-12 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
Parameter Value
Priority 10
Host admin.superveda.local
Host Match Type Exact
Included URLs <BLANK>
Excluded URLs <BLANK>
Application VedaAdmin – Web Application
.
ed
c. Create a mapping for the SuperVeda website.
Parameter Value
rv
Priority 20
se
Host www.superveda.local
Host Match Type Exact
re
Included URLs <BLANK>
Excluded URLs <BLANK>
s
Application SuperVeda – Web Application
ht
5. Click to save your changes.
ig
Exercise 4: Configure Initial Learning Thresholds lr
Al
Instructions: From the Admin Workspace configure the initial learning thresholds with the following, non-standard,
settings in the tables below.
c.
In
Important
a,
The following settings are specific to the SuperVeda lab and are not guidelines for any other environments.
rv
Duration (in hours) required to switch all Cookies to protect or ignored mode
12 (hrs.)
Duration (in hours) required to switch all URLs to protect mode
Im
© 2017 Imperva, Inc. All rights reserved 3-13 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 3-14 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
Answers to Exercises
.
ed
rv
se
re
s
ht
3. Click to save your changes
ig
lr
Exercise 2: Create and Configure Additional Web Application Objects
Al
1. Select the SuperVeda – Http – Service Sites Tree object.
c.
2. Click Create to create a new application and name the application VedaAdmin – Web Application.
In
a,
rv
pe
Im
17
20
3. Click Create.
©
© 2017 Imperva, Inc. All rights reserved 3-15 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
2. Set the Default Application
re
s
ht
ig
3. Create a mapping for the SuperVeda administrative portal, admin.superveda.local
lr
Al
c.
© 2017 Imperva, Inc. All rights reserved 3-16 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 3-17 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 3-18 Lesson 3: Web Application Level Preparations
SecureSphere 12.0 Web Application Security Course Manual
.
and support compliance review processes.
ed
Objectives
rv
se
At the end of this lesson, you will be able to:
• Given different types of Web attacks, configure appropriate polices to defend Web applications.
re
• Review Action Set policies from the system administrator, and create new Action Set policies as needed.
• Use Action Set policies in the followed actions of the subsequent Security Policies, as needed.
s
• Configure and apply signature policies to defend Web applications from attacks with easily recognizable
ht
signatures.
ig
• Configure and apply protocol policies to defend Web applications from protocol attacks.
• Configure and apply correlation policies to protect against multi-front Web attacks.
•
lr
Configure and apply custom Web policies to protect specific application weaknesses.
Al
• Configure and apply ThreatRadar policies to protect against advanced Web attacks, and the latest Web attacks.
• Explain the factors that determine when to use modify a built-in policy, and when to create a copy of a built-in
c.
A Security Policy is a set of rules that identify concerning Web traffic and the actions to take in response. Security
Policies are located in Main > Policies > Security.
pe
Im
17
• Policies List Pane – Lists all policies matching the current filter
• Policy Details Pane – Shows the settings for the currently selected Security Policy
© 2017 Imperva, Inc. All rights reserved 4-1 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 4-2 - Security Policy Panes
re
Security Policies consist of one or more Rules. Policy Rules are definitions of concerning activity that will be matched
during the inspection process. For policies consisting of just a single rule, the rule definition is a collection of Match
Criteria. A Match Criteria defines the search pattern for a specific aspect of inspected traffic. Match Criteria will be
s
covered in more detail in the Custom Web Application Policies section later in this lesson.
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
SecureSphere contains an expansive set of predefined policies that provide protections against the majority of
20
known attacks and threats. During the initial configuration, a set of the predefined policies are automatically
applied, providing a baseline of security for protected Web applications. Many predefined policies are maintained
©
and updated by the Imperva Application Defense Center (ADC) team. These ADC based policies only allow limited
modifications and can be identified by the ADC emblem shown here:
© 2017 Imperva, Inc. All rights reserved 4-2 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
While the baseline security provides an excellent starting point for securing Web applications, additional ADC
policies and custom security policies can be applied in order to protect advanced Web application or to address
specific business concerns.
.
connection to the Web server and sends an HTTP request like the following example.
ed
GET /homepage.asp HTTP/1.1
rv
Host: www.superveda.local
se
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
re
Accept-Encoding: gzip, deflate
Referer: http://www.superveda.local/
s
ht
Table 4-1 - Client HTTP Request
ig
The first line shows the HTTP request method, the URL, and HTTP version. The remaining lines begin with the HTTP
request headers. Request headers provide additional details about the client and browser that can be useful to the
lr
Web server.
Al
When the Web server receives an HTTP request from the client, it processes the request and returns the relevant
c.
HTTP/1.1 200 OK
Cache-Control: no-cache,private
a,
Content-Length: 1687
Content-Type: text/html
rv
Server: Microsoft-IIS/8.5
Set-Cookie: ASPSESSIONIDCSSBRBAA=ICOLBCEAKPMCOKLAANDFMBFE; path=/
pe
<html>
<head>
17
<title>Super VEDA</title>
…
20
The top line of the response gives the response status including the server response code of 200. The response code
©
is a three digit number provided by the Web server that identifies the results of processing the client request and
indicates if problems occurred while trying to deliver the page.
© 2017 Imperva, Inc. All rights reserved 4-3 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Code Description
1XX Informational
2XX Success
3XX Redirection
4XX Client Error
5XX Server Error
Figure 4-5 - HTTP Server Response Codes
.
ed
The server response headers start at the second line and continue to the blank line. Response headers provide
information about the returned data, are used by the browser for displaying the Web page, and manage the user’s
rv
activity within the Website. The HTTP data is visible after the two blank lines. This is the information parsed by the
browser and turned into a user-friendly Web page.
se
As we explore Security Policies in more depth, we will examine aspects of the client to server communication
re
process. The terminology in the table below will be helpful in these discussions.
Term Description
s
Web traffic Web traffic is any HTTP traffic between client and server.
ht
Web or HTTP request Web or HTTP request is an HTTP request originating from the client and directed to
ig
the Web server.
Web or HTTP response Web or HTTP response is an HTTP response from the server, returning with the
lr
results of processing the client HTTP request.
Al
Event or Web event An Event or Web event is a single HTTP request or HTTP response. In general,
events should be inspected by the SecureSphere Gateway.
c.
Security Event Security Events are events that matches SecureSphere Security Policy rules.
Violation A Violation is a Gateway generated message, created when an event matches a
In
Security Policy rule. The violation is created by the Gateway and passed to the
Management Server for logging.
a,
HTTP and HTTPS HTTP and HTTPS identify un-encrypted and encrypted Web communications,
rv
respectively. In SecureSphere, the use of HTTP generally represents both HTTP and
HTTPS traffic except when HTTPS is specifically mentioned in the same context.
pe
Web applications present a broad attack surface for cybercriminals. Web applications often contain hundreds or
thousands of vulnerabilities, some of which may be totally unknown to the application owners. Some vulnerabilities
20
may be exploited in more than one way. Combined, the vulnerabilities and possible exploits are the attack surface.
SecureSphere addresses this challenge with a broad set of default, predefined and custom security policies and are
organized by policy type and by level they are applied in the Sites Tree.
©
Some policy types only allow single instance of the policy to be applied on a given Sites Tree object while other
policy types allow multiple instances on the same Sites Tree object. One example is the Firewall Policy which is a
single instance policy. The Firewall Policy allows the Gateway to enforce basic network firewall rules. Allowing two
firewall policies for the same Sites Tree object would be confusing and not benefit because the inspection is being
performed by just one Gateway. For this reason, the Firewall Policy is a single instance policy.
© 2017 Imperva, Inc. All rights reserved 4-4 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
The Sites Tree structure and Security Policies reflect the traffic inspection process. When traffic arrives at the
SecureSphere gateway the inspection process begins with network level analysis. When the network level inspection
is complete, the inspection continues with the HTTP payload. The final level of analysis is application aware, taking
the unique structure of the protected Websites into account. The SecureSphere Site Tree objects, and
corresponding analysis, broadly mirror the Open Systems Interconnection Reference Model (OSI Model).
.
Data Unit OSI Layer SecureSphere Objects
ed
7+ Custom Application Web Application
rv
7 Application
se
HTTP Data 6 Presentation HTTP Service
Site
re
5 Session
Segments 4 Transport
s
Server Group
ht
Packets 3 Network
ig
Frames 2 Data link
Bits 1 Physical
lr
Al
Table 4-4 - OSI+1 Network Model and the SecureSphere Sites Tree
c.
Two significant differences exist between the OSI Model and the SecureSphere Sites Tree levels. The first and most
significant difference is in OSI layer 7 application traffic. In the OSI Model the application level represents traffic
In
belonging to a named protocol like SMTP, FTP or HTTP. However, inspecting just to the protocol level leaves out
attacks specific to the Web application. For an example of an application specific attack, consider an insurance
a,
Website being slowed by an attacker repeatedly requesting a price quote to create latency for legitimate customers.
rv
Another example could be an attacker trying to invalidate an online poll where an individual stuffs the ballet by
repeatedly submitting an unpopular answer. In SecureSphere the Web Application Sites Tree object represents a
pe
specific protected Web application, or Website, with unique URLs, pages, logins, forms, etc. At Imperva, we refer to
a Seven Plus-One OSI Model, where the additional layer represents a specific Custom Application that is being
Im
protected.
The second difference between the OSI Model and the SecureSphere Sites Tree is subtle. In the OSI Model network
17
ports, like Port 80 for HTTP and 443 for HTTPS, are part of the TCP/IP Packet and belong in OSI layer 3. However, in
SecureSphere the network port is part of the HTTP Service object.
20
The mapping between the OSI Model and The SecureSphere Sites Tree may be useful when trying to determine the
©
level at which a Security Policy is applied. For example, knowing that the Firewall Policy performs network level
analysis, OSI layer 3, helps identify that the Firewall Policy is assigned at the Server Group level. For another
example, consider a policy designed to identify abnormal HTTP requests. The policy is applied at the HTTP Service
level of the Sites Tree, which corresponds to OSI layer 7. For a final example, consider a policy inspecting repeated
submissions to an online forum. Since this policy would require the ability to identify a specific Web page, it would
be applied at the Web Application level and doesn’t have a corresponding OSI level.
© 2017 Imperva, Inc. All rights reserved 4-5 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
The following tables list the available policy types, the instances allowed per Sites Tree object, and a brief
description of the policy purpose.
.
ed
Stream Signatures Multiple Identifies well know attacks for generic services
Table 4-5 - SecureSphere Sever Group Level Security Policy Types
rv
HTTP Service Level Security Policies Instances Description
se
Validates proper use of the HTTP protocol according to the
HTTP Protocol Validation Single
RFC standard
re
Web Service Correlated Validation Single Protects against multi-stage Web application attacks
HTTP Protocol Signatures Multiple Protects against known protocol attacks using signatures
s
Enables creating user-defined Web service level policies
ht
Web Service Custom Multiple
based on various combinations of Match Criteria
ig
Enables cookie signing and verification. Only used with
Cookie Signing Validation Single
reverse proxy deployments.
lr
Table 4-6 - SecureSphere HTTP Service Level Security Policy Types
Al
Web Application Level Security Policies Instances Description
c.
• Credential Stuffing
• Device Intelligence (Client Device Inspection)
a,
Bot Mitigation Multiple Identifies bot attacks meant to cause Denial of Service and
other automated attacks.
Im
Captcha - Activity Based N/A The Captcha policies complement existing Threat Radar
Bot Protection analysis and will be discussed in the
ThreatRadar Policy. Note: 11.5 Captcha - Activity Based
17
© 2017 Imperva, Inc. All rights reserved 4-6 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
(Continued)
Web Application Level Security Policies Instances
Description
Threat Radar Bot Protection Single
Multistep analysis policy to categorize clients. For example
a client can be identified as human, Crucial Bots (i.e.
search engines), Bad Bots (Known to be Malicious) and
unknown.
Web Application Custom Multiple Enables creating of user-defined Web application level
policies based on various combinations of the Match
Criteria
.
ed
Web Application Signatures Multiple Protects against known application attacks using
signatures
Web Profile Single Alerts on and prevents the application user behavior that
rv
deviates from the Application Profile, as defined in
se
SecureSphere
Web Worm Single Provides protection for zero day Web worms based on
Imperva unique technology
re
Table 4-7 - SecureSphere Web Application Level Security Policy Types
s
Security Policy Responses
ht
ig
The wide collection of policy types allows for detailed analysis over all aspects of the Web traffic but without an
effective response these policies would be useless. Fortunately, SecureSphere Security Policies also provide detailed
lr
response options when policy violations occur. The policy response options are threefold. First, the violating event
Al
will be assigned a severity which will be visible in the Alerts and Violations logs. Second, an immediate block action
can be triggered, which will prevent the offending request from getting through. Finally, additional actions can be
triggered with Followed Actions setting that will be discussed shortly.
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-7 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
Figure 4-7 - Security Policy Responses - Severity, Action and Followed Action
s
High
ht
Medium
ig
Severity Low Assigned to violation and appears in security event logs.
Informational
No-Alert
lr
Al
None Determines if the event violating the policy rule will be blocked by
Immediate Action
Block SecureSphere.
c.
User- Defined
monitoring of the client that generated the violation.
a,
© 2017 Imperva, Inc. All rights reserved 4-8 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Important
Blocking requires the Server Group’s Operation Mode be set to Active.
.
ed
rv
Figure 4-8 - Sever Group Operation Mode set to Active
se
During the initial setup the Server Group’s Operation Mode will be Simulation and blocking will not occur.
re
s
ht
ig
Figure 4-9 - Server Group Operation Mode set to Simulation lr
Al
Policy rules with a Block action and triggered by a security event, while the Server Group is in Simulation Mode,
will be logged as an Immediate Block (Simulation Mode) to indicate the rule was triggered but the block was not
c.
enforced.
In
Action Interfaces are objects that define actions that SecureSphere can take when specific conditions or events
rv
occur. Action Sets are a type of policy that contain one or more Action Interfaces. Parameters that are not explicitly
configured in the Action Interface definition are configured in the Action Set. Followed Actions define when to
pe
implement Action Sets, and trigger after events such as a policy violation.
Im
Action Interfaces
Action Interfaces define parameters that allow SecureSphere to take action in response to specified events. They are
17
configured in Admin > System Definitions, under Management Server Settings > Action Interfaces. The system
administrators will configure action interfaces during the initial setup of SecureSphere.
20
Action Sets
©
Action Sets are policies that contain one or more Action Interfaces. Configure Action Sets from Main > Policies >
Action Sets. If an Action Interface has specific parameters defined, such as an SYSLOG Host, they cannot be changed
in the Action Sets. The Action Interface parameters which are undefined are user editable and will need to be
configured to complete the Action Set. The folowing image illistrates the defined Syslog Host parameter and the
remaining undefined parameters.
© 2017 Imperva, Inc. All rights reserved 4-9 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Figure 4-10 - A New SYSLOG Action Set using the Server System Log > Log to System Log (syslog) Action Interface
se
Note
re
If the available Action Interfaces are not sufficient, work with the SecureSphere administrators to for changes or
s
new Action Interfaces.
ht
Placeholders
ig
Placeholders are identifiers that will be replaced by the corresponding information from the violating event, which
lr
enables security administrators include relevant information in the Action Interface messages. Placeholders begin
with a dollar sign, and are enclosed by rounded brackets – sometime called curly braces – like this: ${}
Al
See the Message field in the image of the syslog Action Set below for an example of Placeholders.
c.
In
a,
rv
pe
Im
Note
20
By default, if a placeholder in a message does not have a value from the system, then the placeholder itself is sent
as raw text. For example, if the Username placeholder (${Alert.username}) is part of the message, and there is no
©
username in the alert, then the message will show ${Alert.username} instead of the username.
To hide the placeholder instead of sending the placeholder’s name as raw text, include an exclamation point
immediately after the dollar sign. For example, enter the above placeholder as $!{Alert.username} to prevent
${Alert.username} from appearing when the username is not contained in the alert.
© 2017 Imperva, Inc. All rights reserved 4-10 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Tip
You may want to enclose each parameter with its string within identifiers such as a comma (,), colon (:) or any
other character to later parse this information and extract specific items. This indicates to a script or a parser
where value start and end.
See the Placeholders index in the Web Application Firewall User Guide and SecureSphere Online Help for a
complete list of placeholders and further information on using Placeholders in SecureSphere.
.
ed
Followed Actions
rv
Followed Actions define when to implement Action Sets. Followed Actions are configured in places where
SecureSphere can take additional action in response to an event, such as responding to a policy violation (configure
se
the Followed Action in the Policy) or after a scheduled job, such as running an MX backup, completes (configure in
re
Admin > Jobs Status, then configure the job’s Followed Action tab). Followed Actions are not always labeled with the
more generic, Followed Action; however, the word Action is present, such as Audit syslog action.
s
Tip
ht
Configuring Followed Actions for sending notifications of high severity violation events to established incident
ig
management systems helps reduce administrative overhead while improving incident response times.
lr
Action Sets for Web Application Security Policies
Al
For Web Application Security Policies, notification and blocking System Events will be needed. SecureSphere ships
c.
with several predefined Action Sets which will provide the blocking Action Sets required initially. During the initial
In
setup, the system administrators will also create several Action Sets which will provide a good starting place for the
notification Followed Actions.
a,
SecureSphere has four Action Interfaces types usable for notifications: Email, SYSLOG, SNMP Traps, and Remedy –
rv
Create Incident. Organizations with an existing Security Information Management (SIM) system, or a Security
Information and Event Management (SEIM) system, will typically use SYSLOG Action interfaces or, when supported,
pe
Note
Predefined SYSLOG Action Interfaces are available to assist with integration to HP ArcSight and RSA Envision, as
17
By default, notification action interfaces will only generate a single notification when the violation first occurs. This
can be controlled with the Run on Every Event setting. In most cases, Run on Every Event should be selected with
SYSLOG and SNMP Trap Action Interfaces. SYSLOG servers are designed to handle high frequency events.
©
© 2017 Imperva, Inc. All rights reserved 4-11 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Figure 4-12 - Run on Every Event selected for SYSLOG Action Interface
rv
For email notifications, leave Run on Every Event unselected. It is very easy to overload an email inbox with
se
notification emails when an automated attack occurs like a Website vulnerability scan, or a hacker attempts a
password brute-force attack. In both cases thousands of emails could be generated in under a minute.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Figure 4-13 - Run on Every Event unselected for Email Action Interface
Im
Note
17
When first setting up an email Action Interface, selecting Run on Every Event is helpful when verifying email
delivery. Just remember to unselect this once successful email delivery is confirmed.
20
The following table shows the Action Sets in the SuperVeda environment after the initial configuration of
SecureSphere. The Action Sets that are suitable for Web Application Security Policies are indicated in bold-italics.
The origin column indicates whether the Action Set is predefined or created by the SuperVeda system
administrators.
© 2017 Imperva, Inc. All rights reserved 4-12 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
SV - Archive Reports Archiving
ed
SV - Email Security Admin Any Event Type
User Defined
rv
SV - Failed SecureSphere admin Login System Events
SV - Send System Event to syslog System Events
se
SV - Send to VedaDB syslog Any Event Type
Send Email to Blocked SharePoint User Security Violations - SharePoint Application Level
re
Send Email to Data Owner Security Violations - File Application Level
Short IP Block Security Violations – All
s
SecureSphere
ht
Short Session Block Security Violations - Web Service Level
Short User Block Security Violations - Service Level
ig
Terminate Session Security Violations - DB Service Level
2. In the Select section, click the Create button. The Action Set window opens.
3. Enter the name, SV - Violation - SYSLOG and Email Security Admin.
pe
5. Click Create.
6. In Available Action Interfaces, click the Move Up button next to the Server System Log > Log to System
Log (syslog). Server System Log > Log to System Log (syslog) moves up to Selected Actions.
© 2017 Imperva, Inc. All rights reserved 4-13 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
7. In Available Action Interfaces, click the Move Up button next to the Email > Sen an Email. Email > Send
an Email moves up to Selected Actions.
ig
lr
Al
c.
In
15. Enter the name, SV - Violation – Email Security Admin. Note the SMTP Server Address is not configurable
here as it was previously defined by the system administrators.
16. Set the From Address to, [email protected].
17. Set the To Address to, [email protected].
18. For the Email Subject, leave Use Default selected.
19. For the Email Body, Unselect Use Default.
© 2017 Imperva, Inc. All rights reserved 4-14 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
20. Click the button. The Choose Content window will appear.
.
ed
rv
se
22. Click OK. The pop-up will close.
23. For Email Format, select Text.
re
24. Select Run on Every Event. Note, during normal usage, Run on Every Event would be unselected for email
Action Interfaces. However, during setup and testing, it can be selected. When testing is complete, it
s
should be unselected.
ht
ig
lr
Al
c.
In
a,
rv
This completes the preparation for working with the initial Security Policies. The custom action set and previously
defined action sets are now ready for use as we work through the Security Policies.
Im
SecureSphere traffic inspection differs from other common security systems in two important ways.
20
1. When un-configured, SecureSphere allows all traffic without any blocking or logging. Contrast this with the
typical default behavior of network firewalls, which may block all inbound traffic by default.
2. Traffic being inspected is tested by all applied Security Policies, for the relevant site tree objects, and when
©
a blocking policy rule is triggered inspection continues with the remaining policies applied at the same level
of the sites tree.
These default behaviors provide several benefits. The first point ensures traffic inspection is limited to specifically
configured systems. It provides flexibility for the deployment process and allows the security team to focus on the
most critical Web applications first, without fear of impacting access to other Web applications. The second point
allows for multiple policies to work together effectively. For Example, a client event may trigger two separate
© 2017 Imperva, Inc. All rights reserved 4-15 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
policies. The first policy may have a block action and the request will be blocked. However the second policy may
have both a block action, plus a followed action that will generate a notification of the event.
.
ed
Finding the right policy with the Basic filter:
Policy Basic Filter Description Policies Displayed
rv
By ADC Keyword Enables filtering policies according to the predefined categories Applied & Un-applied
to present the following industry standards: EBS, HIPPA, PCI,
se
PeopleSoft, SAP, SOX.
By Type Presents policies according to policy types Applied & Un-applied
re
By Level Displays all policies assigned to the Network / Sever Group level, Applied & Un-applied
or the Web Service or Application levels of the Sites tree.
s
By Server Group Presents all the server groups in the alphabetical order and Applied Only
ht
enables you to view policies applied to the selected server
ig
group.
By Service Presents all the services in the alphabetical order and enables Applied Only
lr
you to view policies applied to the selected service.
Al
By Application Presents all the applications in the alphabetical order and Applied Only
enables you to view policies applied to the selected application.
c.
Default Policies Presents all default policies available in SecureSphere. Policies applied by
Default
In
Policy Origins Identifies the policies based on the policy creator. Used to Applied and Un-applied
quickly find ADC, User Defined or System defined policies
a,
From Main > Policies > Security, the Basic filter is on the left.
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-16 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
If the Basic Filter is not showing it has been hidden with the Filter hanging tab, as can be seen in the following figure
.
ed
rv
se
Figure 4-16 - Security Policy Filter Hanging Tab
The Basic Filter tab displays the available filters, which is expanded to see available filter criteria. The filter is defined
re
by selecting the relevant criteria. In the following example, the filter will display Web - Service Level - HTTP Protocol
Signatures policies:
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Figure 4-17 - Example Basic Filter for HTTP Protocol Signatures Policies
© 2017 Imperva, Inc. All rights reserved 4-17 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
Figure 4-18 - Basic Filter Apply Button
ig
Currently applied Filters are indicated with the funnel icon.
lr
Al
c.
In
a,
rv
When trying to identify policies that are currently applied the best filter options are the By Server Group, By Service
Im
and By Application. These filters will only show policies actually applied to the selected sites tree objects.
Alternatively, the Sites Tree objects will also list all applied policies on the Applied Policies Tab. From the Main
17
workspace, select Setup > Sites. Then select the relevant Sites Tree object.
20
©
© 2017 Imperva, Inc. All rights reserved 4-18 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 4-20 - Viewing Policies Applied to Sites Tree Objects
re
Tip
s
The Applied Policies tab will display all policies at the current level and higher levels. The Applied Policies tab for a
ht
Web Application object will show all currently applied Application, Service and Server Group policies.
ig
SecureSphere Web Application Security Policies lr
Al
The following Security Policy types will be used by virtually all SecureSphere Web Application Firewall deployments.
• Signature Policies
c.
• Correlation Policies
• Custom Web Service and Custom Web Application Policies
a,
Note
pe
The Web Profile Policies and ThreatRadar Policies will be discussed in later lessons.
Im
Signature Policies
17
Signature Policies are Security Policies consisting of one or more signature dictionaries. Each signature dictionary
acts as a policy rule. If any signatures within the dictionary match the inspected traffic, the policy response for the
20
dictionary is triggered. SecureSphere provides predefined Signature Policies for the Server Group and HTTP Service
levels. Signature policies are an essential tool in SecureSphere that provide both direct controls over attacks, as well
©
as providing information on the client activity which will be useful for other Security Policies.
Signatures
A Signature is a sequence of characters that define a search pattern. Signatures are similar with Data Dictionaries
discussed earlier. In particular, the signature patterns can contain part= and rgxp= components for simple text
© 2017 Imperva, Inc. All rights reserved 4-19 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
matching and regular expression matching, respectively. SecureSphere regular expressions follow Perl Style regular
expressions with some limitations.
Note
Some advanced features in Perl Style Regular Expressions are not supported by SecureSphere. This is intentional,
to avoid potential performance issues that could be caused by a misbehaving regular expression. If you require
large, complex regular expressions, work with Imperva Professional Services or Imperva Technical Support to
verify the regular expressions can be supported.
.
ed
The following shows the proper format of part= and rgxp= terms within a signature.
Component Example Use Note
rv
part= part="cmd.exe" Will match exact text: cmd.exe
se
Multiple part= allowed
rgxp= rgxp="http[s]?:\/\/localhost[\x2E:\/\s]" Only one rgxp= allowed
re
part= and part="update.php", part="function_dir", Components separated by commas.
rgxp= rgxp="function_dir\s*=" Whitespace allowed around
s
commas.
ht
Table 4-10 - Examples of part= and rgxp= signature components
ig
lr
Signatures can be viewed from Main > Setup > Signatures. The following example shows a signature dictionary
designed to identify path traversal activity, a distinctive behavior that strongly indicates malicious intent. Note the
Al
usage of part= and rgxp=.
c.
In
a,
rv
pe
Im
17
20
The predefined signature database is maintained by the Imperva ADC team and included in the ADC updates. Each
©
signature is evaluated for performance and accuracy. The Matching Target tab provides information about the
complexity of the attack, the risk posed by a successful attack, and details about the underlying issues on the
targeted system.
The following image, shows the Matching Target tab, which provides details on a WordPress vulnerability signature.
© 2017 Imperva, Inc. All rights reserved 4-20 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 4-22 – Signature Matching Target tab
re
The Additional Info tab provides information on affected systems, associated bug or vulnerability numbers, and the
s
signature accuracy.
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
Note
It is possible to create custom Signatures when needed. The process will be described in the following section.
©
Signature Dictionaries
A Signature Dictionary is a container holding one or more related signatures. Signature Dictionaries can be viewed
from Main > Setup > Signatures.
© 2017 Imperva, Inc. All rights reserved 4-21 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Figure 4-24 - Main > Setup > Signatures
se
A Signature Dictionary typically contains signatures grouped first by the risk posed by the attack. This is due to the
structure of Security Policies that will be covered shortly. An example of this can be seen when comparing the
re
signatures in two similar related Signature Dictionaries. For example:
s
• Recommended for Blocking for Web Applications
ht
These two dictionaries are used to protect Web applications. A quick review of the signatures in the Recommended
ig
for Detection for Web Applications will show they tend to have a risk of Medium. In contrast, the signatures in the
lr
Recommended for Blocking for Web Applications dictionary all have a risk of High.
Al
Signature Policy Types
c.
Signature Policies are Security Policies consisting of one or more signature dictionaries. Each signature dictionary
acts as a policy rule. If any signatures within the dictionary match the inspected traffic, the policy response for the
In
dictionary is triggered. SecureSphere provides predefined Signature Policies for the Server Group and HTTP Service
levels.
a,
rv
At the Server Group level, the Signature Policies are called Stream Signatures, because the network traffic stream is
inspected.
Im
17
20
©
Figure 4-25 – ADC Stream Signatures Policy Recommended for General Applications
© 2017 Imperva, Inc. All rights reserved 4-22 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Stream Signature Policies provide similar protections to many Intrusion Prevention Systems (IDS) and packet
inspecting firewalls. Organizations with existing network level protections will still benefit with the addition of
SecureSphere. An additional layer of protection from an independent vendor improves the risk position.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
Note
a,
Notice that many of the Dictionaries are set to No Alert for severity. These Dictionaries contain signatures that will
rv
Creating custom Signature Policies may require the creation of one or more Signature Dictionaries first and creating
custom Signatures.
20
• Filter Dictionary
• Threat Radar Dictionary – Remote File Include (RFI)
• Manual Dictionary
The Filter Dictionary and Threat Radar Dictionary – Remote File Inclusion (RFI) are both collections of Imperva
maintained signatures. The Manual Dictionary is a fully custom dictionary built from custom signatures.
© 2017 Imperva, Inc. All rights reserved 4-23 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Creating Filter Dictionaries and ThreatRadar Dictionary – Remote File Include (RFI)
The Filter Dictionary and Threat Radar Dictionary consist of all available ADC Signatures or ThreatRadar RFI
signatures, respectively. The dictionaries are then configured by disabling unwanted signatures.
.
ed
rv
se
re
s
ht
ig
lr
Al
Note
Creating these custom Signature Dictionaries takes several minutes as the management server creates the new
c.
b. Right click and select Disable Signatures From This Dictionary Only.
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-24 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
c. The status column will show to indicate the signature is disabled and to indicate an enabled
signature.
.
ed
rv
se
re
d. Using the Page Selection, work through the remaining signatures, disabling all undesirable signatures from
s
the current dictionary. Strategic use of the Signature Filter can also speed the process.
ht
ig
lr
Al
c.
e. The Filter Dictionary will be available for use in the Signature Policies.
In
© 2017 Imperva, Inc. All rights reserved 4-25 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
3. In the Create New Dictionary window Name the dictionary SuperVeda Manual Signature Dictionary and select
Dictionary Type: Web.
.
ed
rv
se
4. Click Create.
re
5. In the SuperVeda Manual Signature Dictionary - Manual, Web window, click the Create button to create a
custom signature.
s
ht
ig
lr
Al
6. Configure the Add Signature window as follows:
Signature Name: Suspicious Comments.
c.
Signature: part=”IPwnYou”.
In
7. Click Create.
8. Add additional Signatures as needed.
The custom Manual Dictionary can now be used with signature Security Policies.
© 2017 Imperva, Inc. All rights reserved 4-26 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
3. Configure the Create New Policy window as follows:
Name: SuperVeda Custom Signature Policy.
se
Select From Scratch.
Type: HTTP Protocol Signatures.
re
s
ht
ig
lr
Al
c.
4. Click .
5. From the Policy Window, click the Create button. This will add a row to the Dictionaries Table.
In
Select Enabled.
rv
Severity: Low.
Action: None.
pe
© 2017 Imperva, Inc. All rights reserved 4-27 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
8. Click to save changes.
ig
Protocol Validation Policies lr
Al
Another important class of policies are the Protocol Validation Policies. SecureSphere has predefined Network
Protocol Validation and HTTP Protocol Validation policies, which are automatically applied to new Site tree objects.
c.
The network protocol validation policy is applied to Server Group objects in the sites tree and inspects the network
level traffic for compliance with the TCP/IP standards. The policy can perform detailed analysis of the network
a,
traffic, however only two of twenty eight rules are enabled by default. The reason for these defaults are twofold.
rv
First, this network level validation is likely redundant with other infrastructure in the network such as firewalls and
routers. Second, it is quite common for normal network traffic to fall short of strict protocol compliance and with
pe
the number of individual packets passing back and forth on the network, large numbers of security violations can be
generated in just a few moments.
Im
The Two Network Protocol Validation rules that are enabled by default are quite important overall. They are:
17
The SSL Untraceable Connections rule is triggered when encrypted Traffic is identified by the SecureSphere Gateway
but cannot be decrypted for inspection. This can occur for the following reasons:
©
1. If the SecureSphere gateway did not see the initiation of the SSL connection.
2. If SecureSphere has no access to the server's private key used to establish this session.
3. If the SSL cipher method used for this session is not supported by SecureSphere.
Reason one will generally resolve itself rapidly and is usually does not indicate any problems. Reasons two and three
can indicate serious configuration issues that requires attention. SSL Untraceable events will be covered in more in
the tuning lesson.
© 2017 Imperva, Inc. All rights reserved 4-28 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
The TCP – Invalid Data Length in Header rule identifies packets that have an inconsistency in their size which can
indicate an overflow attack.
.
ed
rv
se
re
s
ht
ig
lr
Al
Figure 4-27 - Automatically applied Web Protocol Policy
Many attacks are based on sending invalid requests to the Web server to exploit a server weakness, or vulnerability.
c.
Validating the traffic follows the HTTP protocol standards can quickly identify many common attacks. For example a
In
hacker’s automated reconnaissance tool will test for vulnerabilities, like encoding backspaces and control character
in the URL to illicitly access sensitive files on the Web server. The Illegal Byte Code Character in URL rule would
a,
Figure 4-28 - Web Protocol Policy Rule - Illegal Byte Code Character in URL
17
Many highly damaging attacks can be prevented by enforcing protocol compliance. For example, an attacker may try
20
to leverage a buffer overflow vulnerability on a Web server. A buffer overflow vulnerability is a weakness on the
server that allows excess data to be written beyond the allocated memory area. An attacker exploiting this
vulnerability can force malicious code into overflow region, causing the Web server to run the malicious code. A
©
successful buffer overflow attack can gain full control of the Web server, and after the fact, it may be very difficult to
detect that the server has been compromised. This type of attack necessarily includes a large amount of submitted
data to trigger the overflow. The HTTP Protocol rules like Extremely Long HTTP Request and Extremely Long
Parameter can prevent these types of buffer overflow attacks.
The HTTP Protocol policy also addresses denial of service attacks with the following four policies:
© 2017 Imperva, Inc. All rights reserved 4-29 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
A Slow HTTP or HTTPS Denial of Service attack prevents legitimate clients from using the Web application by tying
.
up all of the available Web server processes that are listening for new client connections. The listening process can
ed
only communicate with one client at a time, so a pool of listeners is available for new client connections.
rv
The slow HTTP/S denial of service attacks allow one client to keep hundreds or thousands of listeners busy with very
se
minimal overhead allowing a very small number attackers interfere with all legitimate client activities. In some cases,
a single client attacking from a single computer has been successful. The attacker ties up a Web listening process on
re
the destination Web server by opening a connection and very slowly adding to the HTTP request headers. The client
sends data just fast enough to keep the connection from timing out, and never completed the request. The attack
s
would look similar to the following example:
ht
POST / HTTP/1.1
ig
Host: www.superveda.local
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
lr
X-Y8fn2rdnvIItBCz: F1BB87
Al
...10 second delay...
X-W65lEIZ7YfE5Fsh: F375DB
...10 second delay...
c.
X-GMZCLIasp9P0d7q: 078D17
...10 second delay...
In
X-7jC7tMk5M9rBz4J: 92EEE4
...10 second delay... (etc…)
a,
This process requires very little resources on the client’s side, allowing the attacker to open hundreds or thousands
rv
of connections to the Web server, thus tying up all available listening processes and shutting out valid clients.
pe
There are slight differences between the slow HTTP and slow HTTPS attacks, however, the details are not important
here because the overall client behavior is what causes problems and it is what the policy rules identify. By default
Im
the policy multiple source policies are looking for over one hundred unique clients, each with a slow connection. For
a single source, the criteria is fifty or more unique connections, all slow. The client and connection thresholds are
17
located in the rule details and can be adjusted. The following image shows details for the rule Slow HTTP from
Multiple Sources.
20
©
Figure 4-29 - HTTP Protocol Policy Rules Slow HTTP from Multiple and Single Sources Details.
The following image shows details for the rule Slow HTTP from a Single Source.
© 2017 Imperva, Inc. All rights reserved 4-30 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Figure 4-30 - HTTP Protocol Policy Rules Slow HTTP from Single Sources Details
The thresholds used to determine a slow connection are also configurable. The default Values are:
.
ed
1. The client is actively sending data, but at a rate less than 500 bytes per second.
2. The client connection is five or more seconds old.
rv
3. Notifications and followed actions will occur at the start of the violation and again are resent every 300
seconds during the attack.
se
The slow connection thresholds can be viewed and edited from the Advanced tab of the Web protocol policy.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Figure 4-31 - Web Protocol Policy Settings for Slow HTTP / HTTPS Attack – Thresholds
Im
Note.
In rare situations an extremely slow Web application, or very high network latency can mimic a multiple-source
17
HTTP/S denial of service attack, causing false positives. This is resolved by addressing the causes of latency.
20
Correlation Policies
©
The next policy type we will discuss is the Web Service Correlated Validation policy type. Like the other policy types
discussed earlier, this type also has a predefined policy, the Web Correlation Policy, which is automatically applied to
new HTTP Service objects.
Correlation policies make use of SecureSphere’s unique Correlated Attack Validation technology, which analyzes
multiple pieces of information from the network, protocol and application levels over time. By basing decisions on
© 2017 Imperva, Inc. All rights reserved 4-31 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
multiple observations rather than a single event, Correlated Attack Validation delivers a highly accurate, fully
automated defense system with accuracy that cannot be matched by several standalone data security products.
For example, a signature may identify a User-Agent header commonly associated with an automated Web scanner.
However, some Web scanners will spoof the headers of a common Web browser, so in this case, there may be a
chance of false positives, making a block response unsafe at this point. The Signature Violation is passed to the
SecureSphere Correlation Engine and retained there. Later in the traffic inspection process, the HTTP Protocol Policy
identifies an illegal byte code in the parameters of this request. The HTTP Protocol Violation is also passed to the
.
ed
SecureSphere Correlation Engine. The combination of a signature that likely identifies a Web scanner, and
suspicious data being passed in a parameter field strongly indicates an attack and a correlation policy rule can
rv
identify and block this attack.
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
© 2017 Imperva, Inc. All rights reserved 4-32 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
Figure 4-34 - Cross Site Scripting Rule Details
s
ht
The SQL Injection attack provides another example of the benefit of correlation policies.
ig
Note
lr
If you are unfamiliar with how an SQL Injection works see the video: Anatomy of an SQL Injection Attack.
Al
Video 4-1 - Anatomy of an SQL Injection Attack
c.
The benefit can be seen with one of the most basic SQL Injection patterns.
In
‘or 1=1--
a,
rv
This pattern supersedes an existing logical constraint with the always true condition of 1=1. However, effectively
blocking all variants of this pattern presents challenges because the attacker can easily make a minor adjustment to
pe
evade pattern based matches, without affecting the logic of the operation: For example:
Im
‘or 123456=123456--
17
Or…
20
‘or “blue”=“blue”--
©
The SQL Injection correlation policy rule uses signatures to identify the individual parts of the attack and triggers
when the all of the required parts are present.
© 2017 Imperva, Inc. All rights reserved 4-33 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Common reasons for creating a Security Policy:
1. Modifications to an ADC defined policy are required.
rv
2. A policy needs to operate differently between two or more Server Groups, or HTTP Services, or Web
Applications.
se
3. An alert or notification is required when specific activities occur.
4. A unique aspect of the Web application requires a unique policy securing it.
re
The first two reasons for creating custom Security Policies are typical encountered during the initial configuration of
s
SecureSphere. In the first case, the ADC policy only allows minor modifications. In the second case, the existing
ht
policy may be fine for some Sites Tree objects, but a subset of the protected assets require different settings. In
both cases, the typical resolution is to clone the existing policy and apply the copied policy to the relevant Sites Tree
ig
objects. Cloning a policy is also referred to as copying the policy.
lr
The third and fourth reasons commonly surface later in the configuration process and will require progressively
Al
more detailed custom policies. This will be covered in more detail in the Web Application Security Tuning lesson.
c.
d. Click
20
©
© 2017 Imperva, Inc. All rights reserved 4-34 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
5. Expand the Sites Tree and select the SuperVeda - Http – Service
.
ed
rv
se
re
6. Only one HTTP/1.x Protocol Policy is allowed per HTTP Service object, when notified click OK.
s
ht
ig
lr
Al
7. Click to save changes
c.
a. Select Main > Setup > Sites, expand the sites tree and select SuperVeda – Http –Service
b. Verify the newly created policy is displayed on the Applied Policies tab
a,
rv
pe
Im
17
At the HTTP Service and Web Application analysis levels, an additional class of policies is available. These policies
define just one rule, unlike previous policies discussed which have multiple rules per policy.
©
© 2017 Imperva, Inc. All rights reserved 4-35 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
Figure 4-35 - Structure of Single Rule Policies - Automated Vulnerability Scanning Policy
ig
Note
lr
Although the majority of Web Application level Security Policies will be single rule policies, there are several
exceptions. The Web Profile Policy is an example which will be discussed in the Web Application Profile lesson.
Al
c.
In a single-rule Security Policy the rule is defined by Match Criteria. Each Match Criteria matches a specific aspect of
the inspected traffic. For example, the Source IP Address Match Criteria will match the originating IP address in the
In
inspected traffic.
a,
rv
pe
Im
17
For comparison, the Application User Match Criteria will match username of users that have logged into the
protected Web application.
©
© 2017 Imperva, Inc. All rights reserved 4-36 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Note
The Application User Match Criteria also depends on proper user identification, which will be discussed in the
Web Application Profile Lesson.
The following table describes some of the more commonly used Match Criteria. A description of all Match Criteria is
available in the Web Application Firewall User Guide and SecureSphere Online Help . The following table
.
shows some of the most frequently used Match Criteria:
ed
Match Criteria Description
rv
Application User Matches the Web Application Username for authenticated users.
se
Generic Dictionary Lookup Custom pattern matching. Simple and regular expression pattern matches can be
performed
re
HTTP Request * Multiple, Match Criteria that match specific attributes of the HTTP request or
response.
s
Lookup Data Set Search Allows identification of additional information not present in the request, but
ht
relevant for inspection. For example, a user’s activity may be prevented because
they are not in the right company department.
ig
Number of Occurrences Correlation Match Criteria, able to identify activity over time. Minimum time
lr
frame 5 Seconds and increments in 5 second intervals.
Sensitive Dictionary Lookup Custom pattern matching. Simple and regular expression pattern matches can be
Al
performed.
Signatures The request matches the selected signatures
c.
Source Geo Location Threat Radar Match Criteria: Matches the source IP address based on the GEO
In
Violations Correlation Match Criteria: The current request also triggered the selected
violations.
rv
© 2017 Imperva, Inc. All rights reserved 4-37 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
12. Since the Web Service Custom policy was created from scratch, it will not have Match Criteria defined.
se
re
s
ht
ig
lr
Al
c.
13. Select and configure Match Criteria to define the policy rule:
In
a. From the Available Match Criteria section, select the Application User Match Criteria by clicking the
arrow.
a,
rv
pe
Im
c. Expand Application User and click the button to add a row to the table.
© 2017 Imperva, Inc. All rights reserved 4-38 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
15. Expand the Sites Tree and select the SuperVeda - Http – Service.
16. Verify the policy from the Sites Tree (Optional):
Al
a. Select Main, Setup > Sites and expand the sites tree to select the SuperVeda – Http – Service object.
b. Verify the newly created policy is displayed on the Applied Policies tab.
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-39 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Note
Creating a Web Application Custom policy will follow the above process, with the adjustment of selecting the Web
Application Custom policy type, instead of Web Service Custom policy types. The desired Match Criteria will also
likely be different.
.
The Web Profile Policy receives abnormal client event information that was identified by the SecureSphere Web
ed
Application Profiling. This policy will be discussed in the Web Application Profiling lesson.
rv
Threat Radar Policies
se
ThreatRadar Policies are an advanced set of policies that utilize the Imperva ThreatRadar data feed. This is a license
re
subscription service with regularly updated reputation feeds to identify internet bad-actors. The Threat Radar lesson
will have detailed coverage of the ThreatRadar based policies.
s
ht
Security Policy Configuration Report
ig
Once the initial set of predefined and custom Security Policies are in place it will be important to periodically verify
lr
the policies are all applied. Ideally the verification process should be standardized, repeatable, and require minimal
overhead. SecureSphere Configuration Reports are the ideal tool to gain visibility into the Security Policies applied.
Al
The following Security Policy Configuration report provides an example of the information provided by Security
c.
Warning
a,
Reports are owned by the SecureSphere user that originally created the report.
rv
Removing a user from SecureSphere will clear all scheduled reports that were owned by the user.
pe
The reports are retained and assigned to the SecureSphere Admin user account, but they cannot be rescheduled.
Im
Instead, the report needs to be cloned. Create a new report and choose Use Existing and select the original report.
This copy can be scheduled as desired.
17
© 2017 Imperva, Inc. All rights reserved 4-40 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
3. Configure Create Security Policies Report window as follows:
Al
a. Name: SV – All Active Security Policies.
b. Select: From Scratch.
c.
c. Click .
4. The Report Window will show the settings for the new report.
In
7. Assigning keywords is recommended to simplify filtering reports. If a relevant keyword is available, select it and
move it to the Report Keywords column with the arrow. Refer to the SecureSphere Administration class or
SecureSphere Admin Guide for information on creating keywords. The following example shows the
© 2017 Imperva, Inc. All rights reserved 4-41 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
8. Select the Data Scope tab and use the arrow to move Applied to Assets and Rule Enabled report fields into
the Enabled Fields section.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
9. Expand the Applied to Assets Field and click the Create button to define the SuperVeda Sites Tree assets as
follows:
a. Site: SuperVeda.
b. Server Group: SuperVeda Web SG.
c. Services: SuperVeda – Http – Service.
© 2017 Imperva, Inc. All rights reserved 4-42 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
d. Applications: <BLANK>.
.
10. Expand the Rule Enabled field and verify it is set to True.
ed
rv
se
11. Select the Tabular tab and click the create button repeatedly to add nine rows to the table.
re
s
ht
ig
lr
Al
c.
In
a,
rv
© 2017 Imperva, Inc. All rights reserved 4-43 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
16. Save the changes.
s
17. Select the General Details tab and click (scroll to the bottom of the page).
ht
18. Download and review report.
ig
Example Results:
lr
Al
c.
In
a,
Tip
rv
The provided report is just an example and the following additional columns may also be desirable in some
pe
Applied to Assets – Lists the Sites Tree Object the policy is applied to
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-44 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Review Questions
1. Describe several benefits of using Followed Actions in Security Policies and explain which notification option(s)
you expect to use in your SecureSphere deployment (Email, Syslog, SNMP Traps, Remedy)?
2. Describe a key benefit provided by each of the following policy types:
a. Stream Signature Policies or HTTP Protocol Signature Policies (pick one).
b. HTTP Protocol Validation Policies
c. Correlation Policies
.
ed
d. Custom Policies
3. What is the difference between a policy rule and a Match Criteria? How are they related?
rv
4. Describe how to identify a multi-rule policy and a single-rule policy.
se
Exercises
re
Prerequisite:
s
Important
ht
Before beginning the exercises, you must complete the steps detailed in the following class interactive sections.
ig
1.Creating Manual Dictionaries and Custom Signatures.
Exercise 1
lr
Al
Configure a Followed Action for later use that meets the following requirements:
c.
Parameter Value
Name: SV - Violation - Send to VedaDB Syslog
a,
Parameter Value
Action Interface Server System Log > Log to System
Im
Configure the Server System Log > Log to System action interface as follows:
17
Parameter Value
Name: SV - Violation – Send to VedaDB Syslog
20
Facility Local0
Run on Every Event Selected
© 2017 Imperva, Inc. All rights reserved 4-45 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Exercise 2
Create a custom Manual Signature Dictionary and a corresponding Signature Policy to address hacker taunting
messages in the SuperVeda environment.
.
Description Collection of hacker taunts seen on SuperVeda
ed
Dictionary Type Web
rv
Configure two Hacker Taunt signatures:
se
Hacker Taunt 1
Parameter Value
re
Signature Name Hacker Taunt – IPwnYou
Signature part="IPwnYou"
s
Protocols http, https
ht
Search Signature In URLs And Parameters
ig
Hacker Taunt 2
Parameter Value
lr
Al
Signature Name Hacker Taunt - PwnedSuperVeda
Signature part=" PwnedSuperVeda"
c.
Severity Medium
Action None
©
When the new HTTP protocol signatures policy is complete, use the Apply To tab to assign the policy to the
SuperVeda - Http – Service. Verify policy successfully identifies the signature by leaving a hacker’s taunt.
© 2017 Imperva, Inc. All rights reserved 4-46 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Note: You must click the word here in order to view the Contact Us form.
se
2. In the Contact Us form, enter a subject and Comment and include the hacker’s taunt in either location
re
s
ht
ig
lr
Al
3. Check for the violation in the SecureSphere Main workspace, Monitor > Dashboard, looking for a security
violation named: SV – Hacker Taunting Signatures
c.
In
a,
rv
pe
Im
Exercise 3
17
Clone the Web Protocol Policy, naming the new policy SV – Custom Web Protocol Policy. Adjust the threshold for
20
Slow HTTP from Single Source rule from 50 to 10 in the new policy. Apply the cloned policy to the SuperVeda – Http –
Service sites tree object.
©
Exercise 4
Create a Web Service Custom policy that will identify persistent taunting activity.
© 2017 Imperva, Inc. All rights reserved 4-47 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Occurred More than 3
Within 60
rv
In the Context of a Single Originating Session
se
Match Criteria 2 – Signatures
re
Parameter Value
Operation At least one
[Signature Type] User Defined Signatures
s
ht
Selected Hacker Taunt - IPwnYou
Hacker Taunt – PwnedSuperVeda
ig
Match Criteria 3 – URL
Parameter Value
lr
Al
Match Exact URLs
Operation At least one
c.
Value: /sendmsg.asp
In
Parameter Value
Action None
rv
Severity High
pe
Exercise 5
Recreate the SV – All Active Security Policies report shown earlier in this lesson.
©
© 2017 Imperva, Inc. All rights reserved 4-48 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Tab: Tabular
rv
Title: (Optional)
Table
se
Column Aggregation Function Order
re
Rule Severity None 1
Policy Level None 2
Policy type None 3
s
ht
Policy Name None 4
Rule Name None 5
ig
Rule Action None 6
Rule Followed Action
Rule has Exception
None
None
lr 7
8
Al
ADC Content None 9
Sorting:
c.
Tab: Scheduling
Occurs: Recurring
Im
Monthly Selected
Day Selected
Monthly Scheduling Day 1 of every 1 month(s)
17
1. Describe several benefits of using Followed Actions in Security Policies and explain which notification option(s)
you expect to use in your SecureSphere deployment (Email, Syslog, SNMP Traps, Remedy)?
a. Benefits: Followed Actions allow tight integration between SecureSphere and the organizations established
event handling procedures. The exact configuration will depend on organizational requirements and the
deployment goals.
© 2017 Imperva, Inc. All rights reserved 4-49 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
b. Expected Use: Answers will vary. Some organizations will choose to use notifications only on blocking rules,
while others may choose to syslog all violation events.
.
ed
2. HTTP Protocol Signatures: Analyses HTTP traffic for known attacks on the server.
b. HTTP Protocol Validation Policies
rv
1. These policies identify abnormal Web requests or responses. Many simple attack strategies, like buffer
overflow attacks, can be quickly identified with protocol validation.
se
c. Correlation Policies
1. By using correlated events, these policies allow accurate identification of attack patterns while excluding
re
false positive events. Correlation policies allow confidence when blocking.
d. Custom Policies
s
1. Custom policies are the most flexible policies and are invaluable when securing highly sensitive Web
ht
applications.
ig
lr
3. What is the difference between a policy rule and a Match Criteria? How are they related?
a. Policy rules are composed of Match Criteria. Each Match Criteria defines a detail of the inspected traffic and
Al
collectively they build a rule associated with a Security Policy. For policies with multiple rules, Match Criteria
are not visible.
c.
In
a. A multi-rule policy has a table with multiple rules and associated Severity, Immediate Action and Followed
Action settings. A single rule policy will show the Match Criteria that defines the rule.
rv
pe
Answers to Exercises
Im
Exercise 1
Create the Followed Action: SV - Violation - Send to VedaDB Syslog.
17
20
©
Configure the Server System Log > Log to System action interface as follows:
© 2017 Imperva, Inc. All rights reserved 4-50 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Exercise 2
se
Create a custom Signature Dictionary and Signatures Policy meeting the following requirements:
re
Signature Dictionary Name: SV - Hacker Taunting Signatures.
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-51 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
Hacker Taunt 2:
ig
lr
Al
c.
In
a,
rv
pe
Im
17
© 2017 Imperva, Inc. All rights reserved 4-52 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
3. From the Create New Policy window, name the policy and select From Scratch and type HTTP Protocol
.
ed
Signatures.
rv
se
re
s
ht
ig
4. Click lr
to add a row to the signature rules table and configure the row based on the provided information:
Al
c.
In
© 2017 Imperva, Inc. All rights reserved 4-53 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Note: You must click the word here in order to view the Contact Us form.
rv
se
2. In the Contact Us form, enter a subject and Comment and include the hacker’s taunt in either location.
re
s
ht
ig
lr
3. Check for the violation in the SecureSphere Main workspace, Monitor > Dashboard, looking for a security
Al
violation named: SV – Hacker Taunting Signatures.
c.
In
a,
rv
pe
Im
Exercise 3
Clone the Web Protocol Policy, naming the new policy SV – Custom Web Protocol Policy. Adjust the threshold for
17
Slow HTTP from Single Source rule from 50 to 10 in the new policy. Apply the cloned policy to the SuperVeda – Http –
Service sites tree object.
20
Start by creating a new Web Service Security Policy and configuring the Create New Policy Window as follows:
©
© 2017 Imperva, Inc. All rights reserved 4-54 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Configure the Slow HTTP from a Single Source rule as follows:
se
1. Select the newly created policy and scroll down to the Slow HTTP from a Single Source rule.
re
2. Click to expand the rule and set the Number of Slow Connections to 10.
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
© 2017 Imperva, Inc. All rights reserved 4-55 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
5. Click OK to confirm the replacement of the Default Web Protocol Policy.
6. Click to save changes.
re
s
ht
ig
lr
Al
(Continued on next page)
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-56 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Exercise 4
1. Select Main > Policies > Security.
2. Click to create a new Web Service policy.
3. From the Create New Policy window, name the policy SV – Persistent Hacker Taunting, select From Scratch and
.
ed
type Web Service Custom.
rv
se
re
s
ht
ig
lr
4. Use the arrow to move the following two Available Match Criteria into the Match Criteria section:
a. Number Of Occurrences.
Al
b. Signatures.
5. Click to expand the Number of Occurrences Match Criteria and configure as shown in the following figure:
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-57 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
6. Click to expand the Signatures Match Criteria and configure as shown in the following figure:
.
ed
rv
se
7. Configure the Security Policy response as shown in the following figure:
re
s
ht
ig
lr
Al
8. Select the Apply To tab and expand the Sites Tree.
9. Select the SuperVeda – Http – Service sites tree object.
c.
In
a,
rv
pe
Im
17
© 2017 Imperva, Inc. All rights reserved 4-58 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
Exercise 5
Name the report SV – All Active Security Policies and follow the instructions provided in the Example SV - All Active
Security Policies Report section.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-59 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 4-60 Lesson 4: Security Policies
SecureSphere 12.0 Web Application Security Course Manual
.
contrast to security policies discussed earlier that represent a "blacklist" or restrictive model of what is not allowed.
ed
SecureSphere provides a visibility and control over the learning process ensuring accurate and timely learning.
When configured, the profile can automatically restart learning when changes to the protected applications are
rv
detected. Responses to abnormal client activity are managed through the Web Profile Policy giving security
se
administrators fine-grained controls over the response.
re
Chapter Objectives
• Describe the components of the Web Application Profile.
s
ht
• Explain how the Web Application Profile learns and protects web applications.
• Define and explain how application activity is mapped to the profile application mapping.
ig
• Identify common web application components used in the learning process.
•
•
lr
Define and explain how web application user tracking operates.
Explain how to select Web Profile Policy rules for the protected web application.
Al
• Configure appropriate reports to help administrators analyze profiles and profile learning.
c.
The following preparation steps will populate the SecureSphere Web Profile for the SuperVeda environment and will
a,
From the point that the SuperVeda Sites Tree was configured in SecureSphere, web activity events that meet safety
requirements can become learning events and will be learned. Previous exercises directed some activity to the
pe
www.superveda.local ecommerce web application and some learning should be visible there. The administrative
portal - admin.superveda.local/vedaadmin/, however, has received little or no activity and can be used to confirm
Im
© 2017 Imperva, Inc. All rights reserved 5-1 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Note
se
The numbers displayed in the URLs and URL Tracking columns will vary based on the amount of activity to the
re
SuperVeda applications.
3. The SuperVeda – Web Application object will likely show some numbers, indicating learned activity. However,
s
the Vedaadmin – Web Application most likely will not show any numbers, indicating a lack of activity.
ht
ig
lr
Al
4. Manually generate activity on the web application. Start Internet Explorer and brows to
c.
http://admin.superveda.local/vedaadmin/.
In
a,
rv
pe
<- admin
<- system
Im
17
URL: Credentials
20
Username: admin
http://admin.superveda.local/vedaadmin/
Password: system
©
© 2017 Imperva, Inc. All rights reserved 5-2 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Note
re
Avoid the User Removal and Logout Links.
s
ht
6. After generating some web activity, refresh the SecureSphere Profile Overview page, look for newly learned
ig
URLs.
lr
Al
c.
This screenshot shows new URL counts for the Vedaadmin – Web Application.
In
Note
a,
If either the SuperVeda – Web Application or Vedaadmin – Web Application objects have no numbers under the
rv
URL columns, double check the Host/URL Application Mapping discussion in Lesson 3, Web Application Preparation
pe
and re-generate traffic events with Internet Explorer. IF the problem persists, work with your instructor to ensure
the Sites Tree configuration is correct.
Im
7. Next you will simulate web activity with a script on the SecureSphere Gateway.
8. From Client PC, start the Putty SSH tool and connect to the SecureSphere Gateway.
17
Field Value
IP Address 192.168.51.201
20
Username imperva_user
Password Impuser123
©
Note
Be certain to connect to the SecureSphere Gateway. The script used is not present on the Management Server.
9. At the command prompt enter the command admin and re-enter the password.
© 2017 Imperva, Inc. All rights reserved 5-3 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
SecureSphere> admin
[root@vedagw ~]#
rv
se
Note
re
You can verify you are the full administrative, root, user by noting the command prompt. The un-privileged
imperva_user account prompt ends with >
s
ht
SecureSphere>
ig
While the Root prompt ends with #
[root@veda-gw ~]#
lr
Al
10. Enter the following command to generate common profile traffic (only type the text in bold).
c.
Tip
rv
The SecureSphere Linux CLI supports tab-completion. You can simplify typing the above command by using tab to
pe
11. Leave the command running and let the instructor know you are finished. The traffic simulation will take
approximately 5 to complete.
17
Understanding the profile depends on a baseline understanding common elements of web applications. In particular
it will be necessary to recognize the following:
©
© 2017 Imperva, Inc. All rights reserved 5-4 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
• Parameters
• HTML Forms & Form Submission process
• ECMA Script (JavaScript)
• XML / JSON
• SOAP, AJAX, and REST
The remainder of this section will provides some basic details on the structure of web applications and can be
skipped if you are comfortable with the above topics.
.
ed
HTTP Request and Response Formats
rv
Examples of HTTP Request and Response formats were discussed in the Web Security Policies lesson.
se
Uniform Resource Locators (URLs) and Uniform Resource Identifiers (URIs)
re
A URL or URI is a string of characters used to identify the name of a resource on a network or the internet. There are
subtle differences between URLs and URIs. However, due to our current focus on web applications they can be
s
treated as equivalent and this text will use URL.
ht
ig
The following is an example of a URL from the SuperVeda Web Appliction:
http://www.superveda.local/home.asp
lr
Al
c.
HTTP Headers
In
The HTTP request and responses both include headers provided by the client and server, respectively. The following
headers will be relevant for web profiling.
a,
HOST Client The Fully Qualified Domain Name, or Address, in the URL.
pe
Set-Cookie Server Header containing a Cookie. A Cookie is an identifier and value that are stored
by the client’s browser and included subsequent requests request to the
Im
server.
Cookie Client The cookie or cookies defined by the server and stored by the client browser.
17
Examples
20
Original URL:
HTTP://www.superveda.local/home.asp
Headers:
GET /home.asp HTTP/1.1
Host: www.superveda.local
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Iceweasel/38.2.0
© 2017 Imperva, Inc. All rights reserved 5-5 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.superveda.local/
Table 5-2 - Example: HTTP request (Client origin) showing original URL and request headers
Note
.
ed
HOST header is in bold.
rv
(Continued on next page)
se
Set-Cookie Header:
re
HTTP/1.1 200 OK
Cache-Control: no-cache,private
s
Content-Length: 1687
Content-Type: text/html
ht
Server: Microsoft-IIS/8.5
ig
Set-Cookie: ASPSESSIONIDCSSBRBAA=ICOLBCEAKPMCOKLAANDFMBFE; Privileges=FreeShip
Date: Tue, 22 Sep 2015 21:32:04 GMT
lr
Table 5-3 - Example: HTTP Response (server origin) showing response headers
Al
Cookie-Header:
c.
HTTP Methods
rv
The HTTP protocol provides for multiple Methods that allow the client to define the desired action of the client
pe
request. The two most commonly used actions are GET and POST. Other methods can be dangerous if left enabled
on the web server. For example the PUT method allows the client to upload a new document to the URL location.
Im
Another example is the DELETE method which allows the client to delete the resource defined in the URL. The Web
Application Profile will identify all methods used by clients.
17
Parameters
Parameters are named variables containing data from the client. Most commonly this data is furnished when the
20
client fills in a web-form and submits the results. Parameter data may be defined in other ways. For example a script
in the webpage may set the value based on calculations, or the Web Server may have included a hidden and read-
©
© 2017 Imperva, Inc. All rights reserved 5-6 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
http://www.superveda.local/login.asp?mode=draw&return=home.asp
.
ed
& or + Used to separate parameters when more than one is present
Table 5-6 - URL Parameter Identification
rv
se
re
Note
The above is the, most common URL format but it is not universal. Other URL formats exist, particularly for newer
s
web applications.
ht
HTTP POST Method Headers Example
ig
When a client a request using the HTTP POST method, returned parameters are located in HTTP request headers.
lr
Al
POST /login.asp HTTP/1.1
Host: www.superveda.local
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
c.
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
In
Accept-Language: en-US,en;q=0.5
Referer: http://www.superveda.local/login.asp?mode=draw&return=home.asp
Cookie: ASPSESSIONIDCSSBRBAA=ICOLBCEAKPMCOKLAANDFMBFE; Privileges=FreeShip;
a,
Content-Length: 82
username=bugsb&password=carrots&submit.x=6&submit.y=2&mode=login&return=home.asp
rv
pe
HTML forms are one of the most common client interaction interfaces in web applications. Take for example the
SuperVeda Login Page:
17
20
©
Clients enter and submit their credentials to log into the SuperVeda website. Below, the HTML source show the
form. The form parameters are identified in bold text.
© 2017 Imperva, Inc. All rights reserved 5-7 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
</tr>
<tr>
<td colspan="2">
rv
<input name="submit" type="image" src="images/login_button.jpg">
se
</td>
</tr>
</table>
re
<input type="hidden" name="mode" value="login">
<input type="hidden" name="return" value="home.asp">
s
</form>
ht
Table 5-8 - SuperVeda HTML source of the login page
ig
When the client clicks submit, information provided by the client is assigned to the parameters and for POST
lr
requests, included in the HTTP Headers, or for GET requests, included in the URL.
Al
ECMA Script (JavaScript)
c.
ECMA Script or JavaScript, is a programming language that can be embedded in web pages and run by the client’s
In
browser. JavaScript can provide a rich user experience. Additional calls to the web application can be triggered from
the JavaScript itself. For example, an online investing website may include a Stock-Ticker JavaScript program that
a,
XML / JSON
pe
Rich web applications, like the Stock-Ticker example above, may use an alternate format for updates. Two of the
most commonly used alternatives are XML and JSON. Although these two formats are quite distinct in their
Im
appearance, in both cases they serve the purpose of passing data between a script in the browser and the web
server to provide a rich user experience. For example, a web hosting company may provide a WYSIWYG webpage
editor for customers. A customer using the editor will work directly with the JavaScript running in their browser.
17
When the customer submits their updates, the data could be packed into an XML or JSON object and passed up to
the server at that point.
20
communications for rich web applications. SOAP is limited to XML format for data exchange, but variants of SOAP do
support other formats. AJAX typically uses either XML or JSON for data exchange but can also support other formats.
REST applications can work with many data exchange formats but JSON seems to be most common followed by
XML.
© 2017 Imperva, Inc. All rights reserved 5-8 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
The Web Application Profile (profile) is the learning engine and learning dataset used to identify abnormal client
activity. The profile starts in Learning, allowing new and unique client activity to be added to the profile. When the
learning period is over, the profile switches to protect. Client requests that deviate from the learned profile are
identified and responded to with Security Policies. All traffic is evaluated for safety to ensure that attack or
potentially dangerous traffic is excluded from learning.
The SecureSphere Web Application Profile separates detection and enforcement. The profile data set contains the
collection of learned client behavior. During Inspection, the Imperva Gateway identifies any request that deviates
.
ed
from previously learned requests. This difference is passed to the Web Profile Policy, which is responsible for the
response to the concerning request. Questions often arise about the interaction of the Profile when the Server
rv
Group Mode can be set to either Simulation or Active. SecureSphere’s behavior is easier to understand by
remembering that learning and detection activities are separate from enforcement.
se
A real world comparison that may help is that of a criminal investigation. When a crime occurs, police respond,
investigate, and arrest the perpetrator. However, punishment for the crime is determined by a judge or jury in the
re
courts. With SecureSphere profiling, the profile itself is like the police force and is responsible for identifying
abnormal events while the Web Profile Policy is like the courts, and is responsible for enforcement.
s
ht
Criminal Investigations SecureSphere Equivalent
ig
Detection
Police monitor for criminal Profile Learning:
activities.
lr
Profile engine initially learns to identify normal activity.
Al
Identification
Profile Protection:
Investigators find the
c.
Judgement
Profile Policy:
Legal system determines guilt
a,
A well-trained Web Application Profile can significantly enhance the security for the assets protected by
Im
SecureSphere. On the other hand, a poorly trained Web Application Profile can generate numerous false positive
alerts and create needless work for the web security team.
17
Warning
Be aware that the SecureSphere Personal Information Masking (PIM) feature cannot be used with Web
20
© 2017 Imperva, Inc. All rights reserved 5-9 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 5-2 - Web Application Profile Overview
re
Note
s
Application Mapping is required to direct web activity to newly created Web Application objects for analysis. The
ht
Default Web Application is an exception because it is automatically configured. Application Host Mapping is
ig
discussed in lesson 3, Web Application Level Preparations.
lr
The profile Overview is particularly useful when verifying that the learning process is progressing correctly. The
individual profiles themselves are viewed from Main > Profile > Application View. The Application View requires an
Al
application to be selected.
c.
In
a,
rv
pe
Im
With a web application selected, the Application View provides visibility into the learned activity.
20
©
© 2017 Imperva, Inc. All rights reserved 5-10 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 5-4 - Choose Application Profile for Review with from the Sites Tree
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
The views pane provides visibility into each aspect of the profile.
View Description Usage
17
URLs (Tree View) URLs view – hierarchical display of web application URLs
Learned data
URLs (List View) URLs view – List display of URLs including searching and sorting
20
URL Patterns are used to tune the profile and will be covered in
URL Patterns Tuning
the tuning lesson
Cookies Displays learned cookies and identifies tracking behavior Learned data
©
Application user
User Tracking Identifies login page URLs and tracks application users
identification
Learned Hosts Listing of all valid HOST headers in use Learned data
Listing of all sensitive directories known to be targets of internet Exploit
Susceptible Directories
worms and exploits protection
URL Insight Graphs Application usage and performance graphs. URL Analysis
© 2017 Imperva, Inc. All rights reserved 5-11 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Access Patterns
Broken Links & References Listing of identified broken links and references URL Analysis
Optimization Profile analysis to identify tuning opportunities Tuning Assistant
Table 5-10 - Description of profile views
URL Views
The URLs (Tree View) and URLs (List View) each provide a convenient view of the application URLs learned by
.
ed
SecureSphere. The URLs (Tree View) groups URLs into folders to match the file structure on the web server while
the URLs (List View) presents a tabular displays of the full URLs plus related information gathered during learning.
rv
URLs View Figure
se
re
s
ht
Tree View
ig
lr
Al
c.
In
a,
rv
List View
pe
Im
17
Table 5-11 - Comparison of URLs (Tree View) and URLs (List View)
20
In both the Tree and List View, the URL icon provides information about the learning status of the page. Additionally
SOAP or XML based URLs are also identified.
© 2017 Imperva, Inc. All rights reserved 5-12 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
SecureSphere Web Profile Learning
ed
rv
URL Based Learning
se
For many, the structure of the web profile is significantly different than what is imagined by the term learning. It is
easy to envision a learning process building a history of client activity, like a sequence of pages visited. However this
re
type of history would be of little use because it would distract from looking at the user submitted data on each URL
which is a critical part of virtually every attack.
s
ht
SecureSphere learning groups all client activity by URL and tightly classifies the data submitted into each web page
parameter. For example, a web application registration form may require an address and part of the address could
ig
be a postal code field. For clients in the United States, even a small set of unique submissions would quickly reveal
lr
the pattern of the five digit ZIP code. If client submitted letters, numbers and punctuation for a U.S. ZIP code there is
clearly something wrong. Other fields in the address, like the street name and number would be expected to contain
Al
numbers, letters and possibly punctuation characters as well, and it will almost certainly be longer than five
characters long.
c.
In
Selecting a URL from either the Tree or List view displays the learned information for the selected URL in the Profile
window.
a,
rv
pe
Im
17
20
©
Figure 5-6 - Profile Window showing selected URL and learned activity
© 2017 Imperva, Inc. All rights reserved 5-13 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
The following image shows some of the learned parameters from the SuperVeda new user registration page.
.
ed
Figure 5-7 - SuperVeda new user registration page parameters
rv
For each parameter, an expected character set is listed, along with a minimum and a maximum length. Parameters
se
that must have a value will be identified as Required and parameters that do not allow modification will be identified
as Read Only. The prefix column indicates the parameter was manually defined for tuning purposes and will be
re
discussed later.
Clicking the value type link will display the learned values for the selected parameter.
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
The expected values are defined first by the primary value type and then by the selection of any additional character
groups. The example above shows learning from the SuperVeda Address parameter which is expected to have
©
• Numeric
• Latin Characters
• Foreign Language Characters (UTF-8)
© 2017 Imperva, Inc. All rights reserved 5-14 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Custom Value Type allow for a regular expression patterns to define the expected input format. The Custom Value
Type could be used for application specific ID values, or regularly formatted values like U.S. Social Security Numbers.
When the SecureSphere web profile is fully trained, every parameter on every URL in the application has an
expected character set, size and required or read-only classification. Malicious client activity like an SQL Injection
attack is easy to identify because it likely contain unexpected characters or is the wrong size.
.
Manually setting URL Learning Status
ed
The Learning Status of a URL can be updated manually by right clicking on the URL and choosing the new status
from the menu.
rv
se
URL State - Learning URL State - Protect URL State - Locked
Switch to Protect: Switch to Learn: Unlock URL:
re
s
ht
ig
Lock URL: lr Switch to Learn:
Al
c.
In
In the Folders in the URLs (Tree View), all URLs in the folder can be updated as follows.
a,
Learn.
17
and Folders
from scratch
© 2017 Imperva, Inc. All rights reserved 5-15 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Add HTTP Method to all
URLs in folder.
rv
se
re
s
ht
ig
A locked directory prevents the learning of any additional URLs. With the Default Security Policy, requests to an un-
profiled URL in the locked folder will generate block violation.
lr
Al
User Tracking
c.
The User Tracking view displays login pages used by the web clients and allows SecureSphere to track authenticated
users throughout the web application.
In
a,
rv
pe
Im
17
All identified login URLs for the application are identified in the Action URL column. When a particular URL is
selected, the learned details of the login process are identified in the Action URL Details window.
©
© 2017 Imperva, Inc. All rights reserved 5-16 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
Figure 5-10 - Action URL Details
ht
The Action URL Details displays the current status of the selected URL. A URL can be In Learning, Active, or in
ig
Manual Editing. SecureSphere identifies successful user login events by observing the application server’s response
to the login request. SecureSphere scans the response for one of three response types:
lr
• Redirect – The client was redirected to a URL matching the specified value
Al
• Response Code – The HTTP Response code, part of the response headers, matches a specified value
• Pattern – The response page contains text matching the specified value
c.
One or more of each condition can be tested for a given URL. When the server response matches one of the defined
In
patterns, the client login attempt is assigned the value from the Login Result column. This can be Succeeded, Failed,
or Unknown. Unknown is assigned by default and is a placeholder during the learning process. When a user
a,
successfully logs into the web application the value in the name field is retained as the name of the application user.
rv
If none of the defined patterns match the response page, the default decision is applied.
pe
Note
Im
In security, the usual decision is set the default value to the most conservative setting. In this case it would be to
default to a login failure. However, while monitoring web traffic, SecureSphere is just an observer. If a client
successfully logged in, but the response did not match the defined patterns, then the user will be authenticated
17
but be logged without a user name. Sometimes the best default decision is to default to success, because
SecureSphere will then retain the user name submitted during the last login attempt.
20
©
Cookies Learning
The SecureSphere profile identified cookies set by the web application. Some cookies are known as persistent
cookies and are issued with a long time to live. Other cookies are only valid for the duration of the client session and
are known as Session cookies. The SecureSphere profile focus is on Session cookies, due to the sensitive nature of
the session specific data contained in the cookies. Persistent cookies are primarily used for non-sensitive data. For
© 2017 Imperva, Inc. All rights reserved 5-17 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
example a persistent cookie may identify the user’s language and text size preferences for the web application,
where a session cookie may contain shopping information on an e-commerce web application.
.
ed
rv
Figure 5-11 - Profile Cookies View
se
The Cookies view displays a list of identified cookies. When a cookie is selected, the details are displayed on the
re
right. Cookies are either protected or ignored. When a cookie is protected, it is monitored for cookie tampering. If
Injection is selected, the profile also monitors for the cookie being submitted by the client that is not related to any
s
Set-Cookie events from the server.
ht
Occasionally, a temporary cookie name may include randomized or unique information for each client session.
ig
Unfortunately, since the SecureSphere profile will treat each cookie as unique, this can overload the profile. The
lr
cookie prefix checkbox indicates that the cookie name should be treated as a prefix, and any additional characters in
the name can be ignored. For example a cookie name may be VendorID09A292F, however the hexadecimal number
Al
is likely randomly assigned. Creating a new cookie with the name VendorID and selecting Prefix will remove the
variable part of the name, and will treat all future VendorID cookies the same.
c.
Learned Hosts
In
The Learned Hosts view displays the HTTP Host header value used in successful client connections to the web
a,
application.
rv
pe
Im
17
The learned Hosts list is particularly helpful when determining if additional Web Application Sites Tree objects are
required for web servers supporting multiple sites.
©
Susceptible Directories
The susceptible Directories view displays web server directories that are known to contain sensitive information.
During the learning process, the profile identifies normal access to the susceptible directories. Later when the
susceptible directories are being protected, any abnormal access to the directories can be identified and blocked.
© 2017 Imperva, Inc. All rights reserved 5-18 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Application Analysis
During the learning process, details of the overall application behavior are available for review through the following
views:
.
ed
The URL Insights graphs help visualize the learned URLs and parameters in the web application. The Access Patterns
display the amount of activity for the web application URLs. The Broken Links and References view provides a quick
location to identify any broken links in the web application.
rv
se
Managing Learning
re
Learning event exclusions
s
A key concern with any learning engine is the ability to prevent learning attack traffic. For SecureSphere web traffic
ht
must pass two strict tests in order to be eligible for learning.
ig
• Client request is clean – Request did not trigger any security policy rules
lr
• Server response is clean – No response policy violations, i.e. data leakage signatures, and server response code
is 200 or 304
Al
Security Policy rules set to Informative, or No-Alert still qualify as a policy match and will prevent triggering events
from being learned.
c.
In
Two important caveats arise from the above learning requirements. First, If all requests to a URL generate a
violation, the URL may never be learned. Second, If the web server is designed to issue a 304 redirect for invalid
a,
The acceptable response codes are configured under Admin > System Definitions on the Dynamic Profiling - Learning
pe
Exceptions page.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-19 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Figure 5-13 - System Definitions, Dynamic Profiling - Learning Exceptions
se
re
s
ht
Figure 5-14 - Learning Exceptions - Response Code
ig
URL Patterns
lr
URL Patterns are used to tune the profile learning process and will be covered in the tuning lesson.
Al
Optimization
c.
Optimization is used to identify potential issues with the learning process and will suggest remedies for learning
In
The Web Profile Policy controls the reaction to abnormal client traffic that has been identified by the Web Profile.
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-20 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
The Web Profile Policy allows for fine-grained control over any concerning events identified by the profile. The only
rule set to block is the Unauthorized URL Access rule. This rule will only trigger if a client requests a non-profiled URL
a,
Several powerful rules are not enabled by default because in combination with a poorly trained profile, they can
pe
Over time, web applications are updated and changed and it is critical that the profile remains current. It is possible
17
for the security administrators to manually switch the profile back into learning. However, the overhead of profile
maintenance can become prohibitive as the number of protected web applications grow.
20
Fortunately, SecureSphere profiles can restart the learning process through Automatic Profile Updates. The
Automatic Profile Update (APU) is a set of rules in the web profile policy which define specific thresholds required to
©
re-initiate learning. For security minded individuals, the possibility of the profile automatically restarting the learning
process may raise some concerns. However, Web Security Administrators have full control of this process.
• APU changes only effect the URLs or Cookies that require updating, other URLs and Cookies remain protected.
• Security Admins can prevent automatic updates on sensitive URLs by Locking the URL in the Web Profile.
© 2017 Imperva, Inc. All rights reserved 5-21 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
• Security Admins can set the threshold to restart learning for every APU condition.
• Security Admins can disable each APU condition.
APU settings are located on the Web Profile Policy, Advanced tab.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
Figure 5-16 - Web Profile Policy, Advanced tab, Automatic Profile Update settings
20
Each APU rule has a specific threshold of activity that must be reached to initiate the switch to learning. Automatic
Profile Updates for each aspect of the profile policy can be configured or disabled. De-selecting Enabled will disable
©
automatic profile updates for the rule. For example, a company knows the core web application may change over
time, but does not foresee any changes to cookie names or the structure of the information stored in the cookies. In
that context, de-selecting Enabled for Cookie Injection and Cookie Tampering APU rules will prevent the profiled
cookies from being switched back to learning automatically.
© 2017 Imperva, Inc. All rights reserved 5-22 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
Figure 5-17 - APU Settings for Parameter Type Violation rule
lr
From the Parameter Type Violation above, if more than 50 unique violations from 50 or more unique clients occur
within a 12 hour timeframe, the affected URL is switched back into learning.
Al
All Profile learning state changes are logged in the System Events logs. The following shows the switch to protect
c.
Figure 5-18 - System Events Log showing home.asp being set to protect
The interaction between the APU and Sever Group mode may also generate some questions. It helps to remember
that the profile’s activity is focused on the traffic. Initially built the profile by learning from normal client requests,
and then to identify abnormal events and pass those events onto the Web Profile Policy. The server group mode
only impacts the Web Profile Policy and when set to simulation, will prevent blocking actions from taking place.
© 2017 Imperva, Inc. All rights reserved 5-23 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
The following table identifies the responses to client traffic and Automatic Profile Update count.
Server Group’s Profile Page’s Profile Policy Rule: Response to Client Profile
Operation Mode: Current State: Action Enabled Traffic
Active Protect Alert & Block + APU count
Simulate Protect Alert, No Block + APU count
YES
.
Active Learn No Alert, No Block Learn, Update Profile
ed
Block
Simulate Learn No Alert, No Block Learn, Update Profile
Active or Simulate Protect No Alert, No Block Does not affect APU
rv
NO
Active or Simulate Learn No Alert, No Block Not Learned
se
Table 5-13 - Profile Enforcement
re
With a well maintained Web Protocol Policy, the following Web Profile Rules will provide additional profiling
s
Benefits:
ht
Rule Name Rule triggers when: False Positive Likely When: Benefit
ig
Parameter Length A Submitted parameter • Short Learning period Excellent identification of
Violation is shorter/longer than • Low traffic URLs
lr all overflow attacks and
expected. • Application Changes nearly all injection attacks.
Al
Required Parameter A parameter identified • Short Learning period When correct, strongly
Not Found as required is not • Low traffic URLs indicates intentional
c.
Reuse of Expired The Client receives a • Browser issues Can identify cookie replay
Session’s Cookie new session identifier • Application design attacks and session
a,
Unknown Parameter An un-profiled • Short learning period When correct, can indicate
Im
Table 5-14 - Web Profile Policy Rules Suitable for Well-Tuned Profiles
20
©
© 2017 Imperva, Inc. All rights reserved 5-24 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Profile Reports
Each aspect of the profile learning process is logged and available to reporting. The following Web Profile report
types are available:
.
• Web Profile – Learned Hosts
ed
• Web Profile – Susceptible Directories
• Web Profile – Web Application User tracking
rv
se
Generally profile reports will be customized for the environment. The following examples may prove helpful when
working with the SecureSphere Web Profile in active environments.
re
Web Profile URLs Report
s
ht
Web Profile URLs reports are a core report for documenting the learned URLs, the learning status of the URLs as
well as gaining visibility into the parameter learning. The following example report will be limited to newly learned
ig
URLs for the SuperVeda Web Application.
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-25 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
© 2017 Imperva, Inc. All rights reserved 5-26 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 5-20 - Web Profile URLs Report, Data Scope
re
The report is restricted to the SuperVeda Web Application and only displays URLs with at least one parameter,
number of parameters greater than 0, and which have been created within the last 90 days.
s
ht
Notes on the Data Scope configuration:
ig
• The Last 90 Days requirement makes this report only suitable during the initial learning period of the Profile, or
lr
for identifying new URLs learned during Automatic Profile Updates. This would be an important detail to
include in the report description.
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-27 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
The column selection will be highly dependent on local requirement and the provided configuration is specific to
Im
SuperVeda due to the lack of SOAP and XML / JSON data elements.
17
• Sorting by Number of Parameters Descending moves the pages with the most parameters to the top which can
20
o The timestamp of the learning state change, giving visibility into manual and automatic profile updates.
o The expected data type for the parameter plus any additional characters.
• A title for the table is recommended, but missing from the example.
© 2017 Imperva, Inc. All rights reserved 5-28 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
The Data Analysis Views selection is also highly dependent on local requirements. The first graph provides view of
Profile URLs set to Learning or Protected. The second graph showing the Locked vs Unlocked URLs.
© 2017 Imperva, Inc. All rights reserved 5-29 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
• Over time, one would expect the number of URLs Protected to grow as the profile learns the normal client
activities for each parameter.
.
Web Profile Cookies report documents the name and learning state of the learned cookies. The following example
ed
report displays learned cookies for all sites in the training environment.
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-30 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
The selected columns will depend on the local requirements, this example focuses on the cookies for each
application, the learning status and last update time.
17
20
information is particularly helpful for identifying hosts that justify the creation of additional SecureSphere
Applications.
The following example report displays learned cookies for all sites in the training environment and the General
Details tab is configured similarly with the previous two examples.
© 2017 Imperva, Inc. All rights reserved 5-31 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
In this example, the all columns are selected and ordered to display the learned HOST headers by each application.
The Occurrences column provides visibility into the number of client requests seen for each identified HOST.
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-32 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Review Questions
• Name three types of information in a client’s web request that can be profiled.
• What are the possible learning states for a URL?
• What is Automatic Profile Update (APU)?
• Describe at least two ways to control the APU behavior?
• Pick a Web Profile Policy Rule and give an example of bad client behavior that could be identified by the rule.
Refer to the SecureSphere web interface in your lab environment or from the Profile Policy figure in this lesson.
.
ed
Exercises
rv
Prerequisite:
se
Important
re
Before beginning the exercises, you must complete the steps detailed in the following class interactive sections.
1. SuperVeda Lab Preparation.
s
ht
Exercise 1
ig
Use the Use Firefox and Web inspect tool to Identify information from HTTP Requests and Responses to the
lr
SuperVeda Web application.
Al
• How to use Firefox Web Inspect:
o On ClientPC start Firefox and create a New Tab by clicking the + icon to the right of the current tab:
c.
In
a,
rv
pe
o Click the Tools menu, then mouse over Web Developer and click Web Console. The console opens at the
bottom of the Firefox window.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-33 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
o Click the downward pointing arrow on the right side of the Net button, and ensure that Log is checked.
Al
c.
In
a,
rv
pe
o In the URL bar of the new tab, enter http://www.superveda.local and press Enter. The SuperVeda
home page opens, and the Web Console shows the HTTP GET requests.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-34 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
o Click one of the GET requests to view the details in the Inspect Network Request window.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
Exercise 2
Protect and lock the login.asp URL for the SuperVeda – Web Application.
©
View the Login Page Source code to identify the expected length of the username and password values. Configure
the Username and Password parameter size restrictions as follows:
Parameter Minimum Maximum
Username 2 <Number found in page source>
Password 4 <Number found in page source>
Note
© 2017 Imperva, Inc. All rights reserved 5-35 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
The SuperVeda Website uses frames. The simplest way to view the Page Source of a frame is to Right-Click on the
desired frame and select This Frame > View Frame Source.
.
ed
rv
se
re
s
ht
ig
Exercise 3
lr
Configure User Tracking for the SuperVeda – Web Application as follows:
Al
It may be desirable to manually configure the user tracking settings. The following details how this can be done with
c.
1. Verify the application behavior for successful and failed login attempts as follows:
a. Use Internet Explorer to access the SuperVeda Website.
a,
b. Select .
c. At the login prompt enter an incorrect username and password.
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-36 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
e. Note the following:
se
1. The page was not redirected, so matching a Redirect condition will not work for failed logins.
2. The page loaded normally and likely had a standard 200 Response code so the Response code condition
re
will probably not work for failed logins.
3. The page does include text indicated the login failed, so a Pattern condition can work for failed logins.
s
f. Next log in with a valid Username and Password.
ht
Username: bugsb.
Password: carrots.
ig
g. Click and note the application response.
lr
h. Note the following:
Al
1. The successful login was completed with a redirection so a Redirection condition can be used to identify
successful logins.
c.
2. Identifying the resulting URL may take some investigation but in the case of SuperVeda the URL is
home.asp which is will also be identified with sufficient learning.
In
2. Log into SecureSphere and, from the Main workspace, select Profile > Application View.
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-37 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
3. Expand the sites tree and select SuperVeda Web SG, SuperVeda - Http – Service, SuperVeda - Web Application.
.
ed
rv
se
re
s
ht
4. Select the User Tracking view.
ig
lr
Al
c.
In
a,
rv
pe
© 2017 Imperva, Inc. All rights reserved 5-38 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
a. Row 1, Type: Pattern, Value: Invalid Username or Password, Login Result: Failed.
b. Row 2, Type: Redirect, Value: home.asp, Login Result: Succeeded.
.
12. Click to save changes.
ed
Note
rv
Verifying the User Tracking settings will be discussed later in the Alerts & Violations lesson.
se
re
Exercise 4
s
ht
Clone the Web Profile Policy and name the new policy Vedaadmin Profile Policy.
ig
Enable the following rules:
• Severity: High
In
• Action: None
• Followed Action: SV - Violation – Send to VedaDB Syslog
a,
rv
Exercise 5
pe
Report 1: Create a Profile URLs report following the Web Profile URLs Report section earlier in the lesson.
Note, if a suitable keyword is not available this step can be skipped.
17
Report 2: Create a profile report of your choice. If you are pressed for time, consider creating a Cookies or Learned
Hosts profile report with data scope restrictions limiting the report to the SuperVeda site.
20
• Name three types of information in a client’s web request that can be profiled.
o Cookies, Host Header name, Parameters, Methods, XML / JSON / Other data exchange formats, URLs
• What are the possible learning states for a URL?
o Learning, Protected, Protected and Locked
• What is Automatic Profile Update (APU)?
© 2017 Imperva, Inc. All rights reserved 5-39 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
o The Automatic Profile Update is a SecureSphere feature that allows protected profile pages and cookies to
automatically switch back into learning when a specific pattern of profile violations occurs. By Default, the
Automatic Profile Update thresholds for web are: 50 Unique Sources, 50 Occurrences, over 12 hours.
• Describe at least two ways to control the APU behavior?
o Lock URL, Adjust Thresholds, Uncheck Enabled checkbox
• Pick a Web Profile Policy Rule and give an example of bad client behavior that could be identified by the rule.
o Answers vary, discuss with instruction and class.
.
ed
Answers to Exercise
rv
Exercise 1
se
Note: Answers may vary.
re
• How to use Firefox Web Inspect - Explained in Exercise.
• Using Firefox Web Inspect, perform the following actions:
s
o Find an example of Request Headers.
ht
ig
lr
Al
c.
In
a,
rv
o Identify a request URL that includes the Username & Password parameters in the URL
© 2017 Imperva, Inc. All rights reserved 5-40 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
Note lr
The cookie names and values will vary based on Client Activity. Other cookies can be seen by logging in to the
Al
SuperVeda website with different customer accounts.
c.
In
Exercise 2
Protect and lock the login.asp URL for the SuperVeda – Web Application.
a,
Select Main > Profile > Application View, expand the Sites Tree and select the SuperVeda - Web Application.
rv
From the URLs (Tree View) or URLs (List View) locate the login.asp URL.
pe
Right Click the URL again and this time select Lock URL
©
© 2017 Imperva, Inc. All rights reserved 5-41 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
View the Login Page Source code to identify the expected length of the username and password values. Details for
.
ed
viewing the login frame were provided in the exercise. The login source code show the following values for the
Username and Password parameters:
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
With this information the minimum and maximum values are all known:
Parameter Minimum Maximum
Im
Username 2 20
Password 4 22
17
© 2017 Imperva, Inc. All rights reserved 5-42 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
Exercise 3
rv
The individual steps were documented in the exercise itself. The Action URL Details will look similar to the following.
pe
Im
17
20
©
The Response Code type can be with a Login Result of Unknown or the row can be removed.
© 2017 Imperva, Inc. All rights reserved 5-43 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Exercise 4
Clone the Web Profile Policy and name the new policy Vedaadmin Profile Policy.
1. Parameter Length
2. Unknown Parameter
Configure the Parameter Type Violation as follows:
.
ed
• Severity: High
• Action: None
rv
• Followed Action: SV - Violation – Send to VedaDB Syslog
se
• Select Main > Policies > Security.
• Click to create a new Web Application security policy.
re
s
ht
• Configure the Create New Policy window as follows:
ig
Name: Vedaadmin Profile Policy
Select Use Existing > Web Profile Policy lr
Al
c.
In
a,
rv
pe
• Click .
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-44 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
• The following screenshot shows the policy configured based on the requirements.
.
ed
rv
se
re
s
ht
ig
lr
Al
• Click to save changes.
c.
In
Exercise 5
Create two reports.
a,
Report 1: Create a Profile URLs report following the Web Profile URLs Report section earlier in the lesson.
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-45 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-46 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-47 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
© 2017 Imperva, Inc. All rights reserved 5-48 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-49 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
Tabular Results:
.
ed
Report 2: Answers will vary.
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-50 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 5-51 Lesson Chapter 5: Web Application Profiling
SecureSphere 12.0 Web Application Security Course Manual
SecureSphere ThreatRadar
Chapter Overview
ThreatRadar is a premier threat intelligence data feed for SecureSphere Web Application Firewalls. In this lesson we
will discuss the configuration of ThreatRadar data feeds and corresponding white lists, application of predefined
ThreatRadar security policies, creation of custom security policies, configuration controls over data shared in the
.
Intelligence (Community Defense) program and ThreatRadar Bot Protection.
ed
Chapter Objectives
rv
se
• Identify and configure appropriate ThreatRadar feeds to help secure web applications
• Identify when to use and how to configure TR Reputation Services
re
o Anonymous Proxies
o Comment Spam IPs
s
o Geo Location & IP Forensics
ht
o Malicious IPs
o Phishing URLs
ig
o TOR IPs
lr
• Identify when to use and how to configure ThreatRadar Bot Protection
o Identify differences between Bot Protection and Bot Mitigation
Al
• Identify when to use and how to configure Intelligence (Community Defense)
o Remote File Include (RFI)
c.
o Scanner IPs
• Identify environments that may benefits from ThreatRadar Fraud Prevention Services
a,
Threat Landscape
rv
The internet has provided criminals a historically unique opportunity for crime. Attacks can be performed from
pe
anywhere in the world and criminals have proven very effective at hiding their tracks, resulting in few actual
prosecutions for criminal activities. With the large number of vulnerable web applications, the criminals have nearly
Im
unlimited opportunities to learn and improve their attacks and with powerful automation tools, the number of
attacks is also increasing. Altogether, it translates into increasingly spectacular attacks with stunning consequences,
17
The first order of business for attackers is to hide their tracks and multiple strategies are used in this effort. A very
common tool is the Anonymous Proxy. This is a web proxy server that forwards web requests, without including
information on the true origin of the client.
©
Another tool of attackers is the botnet. A botnet is a collection of malware-compromised computers controlled by
the attacker. The attacker manages the infected systems and distributes attack actions for the systems to perform.
Botnets allow attack activity to be distributed, ensuring another system is able to continue the attack any time a
system is blocked. From the target’s perspective, the activity may appear independent and recognizing that that it is
coordinated attack can prove difficult. Botnets also hide the attacker’s tracks behind a veil of infected systems and
the unlucky users who happened to get malware on their systems.
The following common botnet activities are of particular concern when protecting web applications:
• Attack preparation
o Web site reconnaissance
o Vulnerability scans
.
o Web Application Fuzzing
ed
• Attacking Web Applications
o SQL Injection
rv
o Denial of Service
se
o Directory Traversal & Site Scraping
• Attacking Clients
re
o Password brute force attacks
o Phishing Attacks
s
o Comment Spam
ht
o Remote File Inclusion Attacks
ig
Although the attack tools used by hackers are potent and menacing the attacks still originate from specific locations.
lr
Over time the locations will change, but a regularly updated list of attack locations will allow for an aggressive
Al
response against bad actors and, most importantly, combats some of the most powerful attack tools used.
Imperva’s ThreatRadar threat intelligence provides this visibility into the reputation of clients and for some
protections is able to actively challenge the client to identify regular users from bad actors.
c.
In
Imperva ThreatRadar
a,
ThreatRadar is the premier threat intelligence feed that arms the SecureSphere Web Application Firewall.
ThreatRadar is a subscription service which provides the following protections.
rv
• Reputation Service: Filters traffic based upon latest, real-time reputation of source
pe
• Intelligence (Community Defense): Adds unique threat intelligence crowd-sourced from Imperva users
• Bot Protection: Detects botnet clients and application DDoS attacks
Im
• Account Takeover Protection: Protects website user accounts from attack and takeover
• Fraud Prevention: Simplifies deployment of best-in-class partner fraud prevention solutions
17
ThreatRadar Intelligence Services provide visibility into the reputation of clients connecting to SecureSphere
protected web application. Imperva provides the following ThreatRadar Services:
©
difference between the reputation services and Intelligence (Community Defense) feeds is source of data.
Reputation service feeds are assembled from information gathered with server honeypots, active research by the
Imperva Application Defense Center team as well as through data feed partners. The Intelligence (Community
Defense) feeds are built from information provided by existing SecureSphere customers through the Intelligence
(Community Defense) program. Altogether ThreatRadar provides ten unique feeds that provide insight into client
connections.
.
IP Forensics IP Analysis feed that allows geographic location mapping
ed
of client
Malicious IPs Numerous attacks originated from the IP address
rv
Phishing URLs URL or Referrer header is associated with Phishing
se
activities for the protected web application.
TOR IPs IP address belongs to The Onion Router (TOR). TOR is
re
used to obfuscate the client’s real IP address.
Intelligence (Community Defense)
s
Remote File Include Numerous SecureSphere community reports of Remote
ht
File Inclusion attacks
SQL Injection IPs Numerous SecureSphere community reports of SQL
ig
Injection attacks
Scanner IPs lr
Numerous SecureSphere community reports of site or
vulnerability scans
Al
Anti-Automation (Bot Protection)
CAPTCHA Automated BOT activity like comment spam submissions
c.
or website scraping.
In
Blocking Authenticated Sessions Rapidly emerging and high profile vulnerabilities such as
Blocking GET requests Zero-Day attacks and large scale exploit behaviors.
rv
Privileged Account Brute force Brute force credentials guessing attacks targeted at high
privilege accounts.
Fraud Prevention Services
ThreatMetrix TrustDefender Covert attacks due to malware on the client’s system.
iovation ReputationManager 360
Trusteer Pinpoint
Table 6-1 - ThreatRadar Reputation and Intelligence (Community Defense) data feeds
The data feed information is regularly updated by the MX and stored in SecureSphere as a lookup data set - global
object. The lookup data set is then used in security policy’s match criteria.
.
Lookup Data Set is a Global Object that contains a table of key identifiers and is used by the Gateway to identify
ed
traffic that matches a key value. For ThreatRadar Lookup Data Sets, the key values are IP addresses identified by
Imperva’s Application Defense Center team as sources of concerning activity. Each ThreatRadar feed has a
rv
corresponding ThreatRadar Lookup Data Set, allowing the identification of unwanted clients based on previous
behavior.
se
re
The status of each ThreatRadar Data Feed is displayed on the dashboard. Select Main > ThreatRadar > Dashboard.
s
ht
ig
lr
Al
c.
If ThreatRadar is un-licensed, it is still available on an emergency basis. The Emergency Activation option allows one-
time access to the ThreatRadar updates for a period of three days.
a,
rv
pe
Emergency Activation is intended to help address large attack events against the protected web applications in the
event that ThreatRadar was not previously purchased. If Emergency Activation is selected, Imperva technical
support will also contact the organization to ensure the emergency is fully understood and mitigated.
17
20
©
The Dashboard displays each ThreatRadar feed and indicate the status and feeds experiencing problems are clearly
identified.
.
ed
rv
se
re
s
ht
Figure 6-3 - ThreatRadar Data Feeds Status
ig
lr
Selecting a feed displays summary and management options for the feed and feed status details if update problems
Al
were encountered. The following shows an example of the Anonymous Proxies data feed Summary tab:
c.
In
a,
rv
pe
Im
17
For each data feed, the summary tab displays statistics on the number of policy violations based on the feed. The
data feed Manage shows Lookup Data Set, predefined security policies and predefined reports.
©
.
ed
rv
se
re
Figure 6-5 - Anonymous Proxy Manage Tab
s
The pencil icon can be used to quickly review the relevant configuration objects. Scheduling and detailed
ht
configuration of the data feed are configurable through the Lookup Data Sets.
ig
ThreatRadar Lookup Data Sets lr
Al
The lookup data set can be reached from the ThreatRadar Dashboard or directly from Global Objects.
Viewing the ThreatRadar- Malicious IPs Lookup Data Set from the dashboard.
c.
Select Main > ThreatRadar > Dashboard. Select the relevant ThreatRadar Data feed and from the Manage Tab click
the Pencil icon to open the Lookup Data Set. The example below shows the process for the Malicious IPs data feed.
a,
rv
pe
Im
17
20
©
Figure 6-6 - Locating Threat Radar Data Feed Configuration Details From Threat Radar Dashboard
.
ed
rv
se
re
Figure 6-7 - Locating Threat Radar Data Feed Configuration Details From Global Objects
s
ht
The ThreatRadar Lookup Data Set contains the listing of reputation data for use while inspecting web traffic. From
ig
the Data tab, the existing values can be reviewed. In the following screenshot, the Quick Filter, Page Selection and
Malicious IP addresses are identified. lr
Al
c.
In
a,
rv
pe
Im
17
20
©
The ThreatRadar Lookup Data Set is updated regularly. The update frequency is determined by Imperva’s
Application Defense Center based on the rate of changes to the ThreatRadar feeds and are ultimately driven by the
frequency of change in the specific type of concerning behavior. The example below shows the Malicious IP list
scheduled for daily updates.
.
ed
rv
se
re
s
ThreatRadar Phishing URLs
ht
The ThreatRadar Phishing URLs data feed requires manual configuration before it can receive updates. The
ig
configuration limits the update to just the URLs of the protected web assets. The Phishing URLs lookup data set
lr
must be configured with the valid host headers accepted by the protected web applications.
Al
Configuring ThreatRadar Phishing URLs
1. Select Main > ThreatRadar > Dashboard
c.
In
a,
rv
pe
Im
17
20
Note the warning which indicates the Phishing URLs feed is un-configured.
©
2. In the Phishing URLs window, Manage tab, select pencil icon for the ThreatRadar Phishing URLs Lookup Data
Set. The Lookup Data Set: ThreatRadar – Phishing URls window will appear.
.
ed
Select the Configuration tab and click Configure.
rv
se
re
s
ht
ig
3.
4. Under Add Domain Names, click the Create
lr
button to add one or more rows to the table.
Al
5. Add one host header per line. The following screenshot shows the SuperVeda ecommerce website host header
added to the Phishing URLs configuration.
c.
In
a,
rv
pe
Im
17
20
©
6. For the SuperVeda training lab, add www.superveda.local and click Update to save the configuration.
Note
The ThreatRadar Dashboard warning will be cleared during the next Phishing URLs update which can take up to
one hour.
.
• ThreatRadar - SQL Injection IPs
ed
• ThreatRadar - Scanner IPs
• ThreatRadar - TOR IPs
rv
These policies are applied by default with an action of None. However, the full benefit of ThreatRadar are realized
se
when unwanted clients are blocked as early. Typically organizations will set the policy actions to Block after an
appropriate trial period with a reviews of the security logs to rule out any false positive events.
re
The following table identifies possible exceptions to blocking for each ThreatRadar Security Policy:
s
ht
ThreatRadar Policy Action Possible Exceptions
Block unless clients have a compelling reason to hide their source IP address.
ig
For example, a news submission page for war correspondents. In such cases,
Anonymous Proxies Block lr
blocking can be performed with a custom policy that identifies clients both
using Anonymous Proxies and triggering other high severity violations.
Al
Extremely low traffic web applications or web applications without
Comment Spam IPs Block
comments areas.
c.
Malicious IPs Block None - Blocking is recommended for all web applications.
In
Phishing mostly targets user logins. If the protected web application does
Phishing URLs Block
not allow user login, Phishing URLs policy may not be needed.
a,
Block unless clients have a compelling reason to hide their source IP address.
TOR IPs Block
pe
ThreatRadar security policies follow a very similar format and only vary in the Lookup Data Set Match Criteria. The
ThreatRadar - Anonymous Proxies policy shows the basic structure.
17
20
©
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
Each of the policies contains just two match criteria, one matching the data feed and the second excluding whitelist
values. While the ThreatRadar feed is automatically updates, the white list requires manual configuration.
Im
17
20
©
Figure
6-9 -
.
ed
rv
se
re
s
ht
Predefined ThreatRadar Security Policy Match Criteria Logic
ig
For some deployments, directly blocking on the ThreatRadar feeds may touch on concerns about accidentally
lr
blocking legitimate users. In such cases, a custom security policy that correlates the data feed along with other
Al
violations may be appropriate. The following example shows a security policy that may be appropriate for a news
organization with an anonymous tips site. The predefined ThreatRadar - Anonymous Proxies and ThreatRadar - TOR
IPs security policies would be left in the default, non-blocking, configuration.
c.
In
a,
rv
pe
Im
17
20
©
.
ed
rv
se
re
s
ht
ig
lr
Al
Figure 6-10 - Custom Policy for Anonymous Proxies and TOR IPs Data Feeds
c.
In
As configured, the example policy is only looking for fifty serious violations within a minute from an anonymous
proxy or TOR IP address. The policy could be made more aggressive by matching more violations, reducing the
a,
number of occurrences required, or increasing the occurrence time. The policy could be made more permissive by
rv
using less violations, increasing the required occurrences, or by decreasing the occurrence time.
pe
The ThreatRadar Geo Location and IP Forensics data feeds meet a separate goal from the data feeds discussed so
far. Instead of identifying a list of known bad actors, the Geo Location and IP Forensics feeds provide geographical
17
insights into the source of violations. The ThreatRadar IP Forensics feed is responsible for resolving a geographical
location from the clients source IP. The ThreatRadar Geo Location feed resolves the country of origin from the
20
clients IP address.
Initially, these feeds will prove helpful for investigating alerts or violations from the Securesphere security event logs
©
and for use in alerts and violations reports. As patters of unwanted activity become clear, the ThreatRadar Geo
Location and IP Forensics feeds can inform custom security policies through the Source GeoLocation Match Criteria.
The Source GeoLocation Match Criteria allows resolution of source IP address to a country of origin and can prove
immensely useful in highly customized security policies. For example, a government motor vehicles office may use
the Source GeoLocation to block international clients from specific areas of the web application.
The following SuperVeda example shows a policy configuration designed to prevent international login attempts to
the SuperVeda Administration website.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
ThreatRadar Intelligence (Community Defense) feeds are built from data provided by other SecureSphere customers
and comes with different licensing. Imperva customers have full control over the data submitted back to the
Im
Intelligence (Community Defense) system. Licensing fees are waived for customers who are able to contribute data
back to the community. For organizations that cannot provide this information, they can still receive the Intelligence
(Community Defense) data by purchasing the appropriate license.
17
The status of the Intelligence (Community Defense) contributions are visible from the ThreatRadar Dashboard >
20
ThreatRadar Intelligence (Community Defense) is automatically enabled for SecureSphere versions 11.5 and 12.0.
©
For SecureSphere version 12.0, this is enabled during the upgrade process, or during the license upload, for new
deployments. For version 11.5 Community Defenese is enabled by patch (Q1-2017 patch or later).
The ThreatRadar Intelligence (Community Defense) settings can be verified from the ThreatRadar Dashboard as
follows:
From Main > ThreatRadar > Dashboard select Intelligence (Community Defense). On the details pane, select the
Manage tab to display the collection and submission settings.
.
ed
rv
se
re
SecureSphere provides detailed controls over the data collected and the collected data can be reviewed to help
s
ensure sensitive information are not accidentally captured and sent to the Intelligence (Community Defense)
ht
system.
ig
Data Element Types:
• Header
lr
Al
• Parameter
• Cookie
c.
Masking Options:
pe
• Hash
• Hide first 12 chars
Im
• Remove
17
Hashing is irreversible and is used by the Intelligence (Community Defense) system to correlate malicious activity
while preventing exposure of potentially sensitive information. By default, hashing is used for the destination IP,
20
destination Host Name, and the Server Group name. Hide first 12 characters masks the first 12 characters and
allows the remaining information to be sent to the Intelligence (Community Defense) system. This is particularly
©
useful when the expected input is normally rather short, like a user’s login name. Injection and buffer overflow
attempts will be preserved and available for analysis in the Intelligence (Community Defense) system. Remove will
not send the data at all. By default the Referrer, Cookie and Authorization headers use the Remove masking action.
To participate in providing data to the Intelligence (Community Defense) system, several steps are required.
• Review the collected data, looking for potentially sensitive information that should be masked.
• Configure Masking to address collection issues and review results.
o Continue to review and mask until satisfied with the masking rules.
• Select Send Collected Information to begin participating in Intelligence (Community Defense).
.
ed
2. Select the Intelligence (Community Defense) Service, Manage tab.
rv
se
re
s
ht
ig
lr
Al
3. Select Collect Violation Information and save changes to begin Collecting Data.
c.
In
a,
rv
4. In a production environment, wait for a new violation to occur. In a testing environment, generate traffic that
will create a violation.
pe
5. Click the Show button under Data Sample to view the results.
Im
17
20
©
6. The Data Sample for Sharing window will appear with the details for a single violation.
.
ed
rv
se
re
s
ht
ig
lr
Al
7. Review the handling of sensitive values:
c.
a. Are values set the Remove masking operation properly masked? The following example shows a cookie
In
"destAddr":{"ip":"b1a41444e0edda0ab9de3e330d971e2c","port":80,"ipVer":"4","maskingType":"Hash","ori
rv
gLength":14}
pe
Tip
Im
8. If any sensitive values were incorrectly masked, modify the Masking Configuration rules to ensure proper
masking.
©
a. Under Masking Configuration, click the Edit button and the Intelligence (Community Defense) Masking
Configuration window will appear.
9. The Intelligence (Community Defense) Masking Configuration controls the handling of data identified in the
violation.
.
ed
rv
se
re
s
ht
ig
lr
Al
10. Click the New button to add custom masking rules and configure as needed.
c.
In
a,
rv
pe
Im
17
Important
20
When masking web page parameters, create two rules. One rule should match the element
type Parameter, and the second rule should match the element type Header. This will ensure
©
Important
Please do not select the Send Collected Information option in the training environment. All
activity in the training lab are simulated and will not benefit the ThreatRadar Intelligence
(Community Defense) system.
.
ed
Starting in version 11.0 Imperva introduced ThreatRadar Bot Protection, a sophisticated tool to classify clients and
bots. Bot is short for robot and is an automated browsing program. Some bots are desirable, such as the indexing
rv
spiders used by search engines. Allowing search engines is crucial to ensure users can find the organization’s
website. Other bots may be malicious, such as those used in botnets discussed earlier. Classification good bots is
se
general not difficult but malicious bots may be very difficult to identify.
re
Attackers that manage botnets go to great lengths to disguise their bots. They continually adapting connection
information provided by the bots to appear as if the request came from a human using a normal browser. This
s
presents particular challenges for security systems because any standard set of identification tools, like matching
ht
the User-Agent header, quickly becomes outdated.
ig
SecureSphere addresses the challenge with specific ThreatRadar feeds for bot identification and the Bot Protection
lr
policy type. SecureSphere Bot Protection performs a two-stage analysis of clients to ensure accurate classification.
Al
First signature pattern matching is performed on the client request which rapidly identifies most trustworthy bots.
Clients that remain unidentified are then presented with a JavaScript challenge specifically designed to fail when
c.
performed by bots. The ThreatRadar Bot Protection feed regularly updates both the signatures and JavaScript
challenges, ensuring the attackers cannot adapt to the identification process used by SecureSphere and ensuring
In
ThreatRadar Bot Protection is an advanced analysis process and has the following requirements:
rv
Mitigation policy.
20
With ThreatRadar Bot Protection configured and the Server Group active, SecureSphere will identify clients and
build statics on client connections.
©
Bots identified as Bad Bots are further classified by the following malicious activities:
Bad Bot Classification Details
.
ed
Click Bot A bot that visits (clicks on) on a site's ad links.
Comment Spammer Bot A malicious bot that posts comments that include text and graphics.
rv
Crawler A bot that visits sites for various purposes; most of these are not malicious.
se
Feed Fetcher A bot that retrieves a site's RSS feeds; usually not malicious.
Hacking Tool Software that can be used for hacking purposes
re
Masking Proxy A web proxy that masks a request's origin
Search Bot A bot that visits sites in order to index them
s
Spam Bot A bot that posts spam comments and sometimes extracts email addresses; always
ht
malicious.
ig
Vulnerability Scanner A bot that visits sites in order to detect their vulnerabilities
Worm A self-replicating program that injects malicious code into sites or scrapes them;
always malicious.
lr
Al
Site Helper Various management assistance tools
DDos Tool An automatic tool or a botnet that generates Distribute Denial of Service attacks.
c.
Typically malicious.
In
SecureSphere version 11.5 introduces the ThreatRadar Bot Protection CAPTCHA service. CAPTCHA is a service that
rv
protects your website from spam and abuse. CAPTCHA uses an advanced risk analysis engine and adaptive
CAPTCHAs to keep automated software from engaging in abusive activities on your site. It does this while letting
pe
The CAPTCHA service is based on Google reCAPTCHA and requires the Site and Secret keys from the Google admin
console for configuration.
17
until the challenge is passed. The challenge is presented only when the current page
is changed (via page reload or navigation action). When suspicious activity is
detected, the configured action and followed action is applied and an alert is issued.
CAPTCHA Activity Based This policy defines the actions (such as button clicks) and locations in the Web
application that trigger a CAPTCHA challenge that is then presented to the end user.
.
ed
Updates which provide Signatures to identify and block the exploit behavior. However, ADC Updates are released
once every two weeks. While this time is necessary for testing to ensure the signature updates do not create false
rv
positive or performance issues, the delay is problematic with rapidly emerging threats.
se
The Threat Radar Emergency Feed balances the need to rapidly respond to emerging threats with the need to
ensure new signature updates are sufficiently tested and refined before general distribution. The feeds allow an
re
organization vulnerable to a zero-day or rapidly emerging exploit to immediately apply protective signatures which
are provided through ThreatRadar updates. Importantly, the organization can also disable the feed or associated
s
security policy if performance or accuracy issues are suspected. This allows Imperva to make defensive signatures
ht
rapidly available during an emergency without excessive risk for established deployments.
ig
By default, the Emergency Feeds are disabled.
lr
Al
c.
In
a,
Enabling the ThreatRadar Emergency Feeds is a twostep process. First the feed itself is enabled, so the Lookup Data
Im
Sets will be populated with the latest signatures. Second, the corresponding security policy is applied to the relevant
Sites Tree Objects to protect the web application under consideration.
17
b. Use the basic filter to filter by Type – Web – Service Level – HTTP Protocol Signatures.
.
ed
rv
se
re
c. Locate and select the policy corresponding to the feed previously enabled, in this case it is the
ThreatRadar – Emergency – Authenticated Sessions Signatures policy.
s
ht
ig
lr
Al
c.
In
a,
d. From the Apply To tab, assign the policy to the relevant sites tree object and save changes.
rv
pe
Im
17
20
©
4. The security policy is now active, but non-blocking. Allow the security policy to run for a short period of
time to ensure the signatures do not have any performance or accuracy issues. The time will vary based
on the volume of web traffic and the organization’s requirements.
5. Finally, after a sufficient test period has elapsed, the policy action can be set to block.
.
ed
rv
se
re
6. Save changes.
s
7. Periodically review the Alerts and Violations while the Emergency Feed Policy is in place.
ht
ig
ThreatRadar Fraud Prevention Services lr
Al
ThreatRadar provides two forms of Fraud Prevention services that may be appropriate for highly sensitive web
applications. First, SecureSphere Fraud Prevention provides connectors to best-in-class fraud prevention services
c.
allowing seamless integration of fraud prevention without modification of the underlying applications. Second,
SecureSphere version 11.5 introduces ThreatRadar Account Takeover Protection which detects and mitigates
In
unauthorized site access in real time by leveraging credential/device threat intelligence. Additional licensing
required.
a,
rv
ThreatRadar Fraud Prevention Service integration requires site specific information beyond the scope of this course.
Organizations interested in utilizing Fraud Prevention Services are advised to work with Imperva Sales and
pe
Review Questions
17
1. Which ThreatRadar feed requires configuration in order for the lookup data set to be populated? Why?
2. Which predefined ThreatRadar security policies could be safely set to block for most deployments?
20
3. Which predefined ThreatRadar Security Policies may be better left in the default, non-blocking, configuration
for some web applications?
©
4. What recommendation would you give to if an organization wanted to be certain that business partners do not
get blocked by any of the ThreatRadar Security Policies?
Exercises
Prerequisite:
Important
Before beginning the exercises, refer to the steps detailed in the following class interactive sections.
1. ThreatRadar Lookup Data Sets.
2. Configuring ThreatRadar Phishing URLs.
.
ed
Exercise 1
rv
Configure the ThreatRadar Phishing URLs feed with the hostname admin.superveda.local and www.superveda.local
se
(if this was not done during lecture). First identify the relevant hostnames by checking the Learned Hosts in the
Profile.
re
s
ht
ig
(Screenshot on next page) lr
Al
c.
In
a,
rv
pe
Im
17
20
©
.
ed
• Expand the Sites Tree and select SuperVeda - Web Application.
rv
se
re
s
ht
ig
lr
Al
c.
In
Exercise 2
Configure the ThreatRadar Malicious IPs Security Policy to block and SYSLOG the violation to Veda DB.
Im
Exercise 3
20
Create a custom blocking policy that correlates a client from an Anonymous Proxy IP address with 5 or more
significant security violations in under a minute.
©
2. Which predefined ThreatRadar security policies could be safely set to block for most deployments?
a. For most deployments setting the following policies to block is usually safe: Malicous IPs, Phishing URls,
Comment Spam IPs, Remote File Inclusion, SQL Injection IPs and Scanner IPs.
3. Which predefined ThreatRadar Security Policies may be better left in the default, non-blocking, configuration
for some web applications?
a. Blocking with the ThreatRadar Anonymous Proxies and TOR IPs security policies may be overly aggressive for
web applications that allow anonymous clients, such as news sites.
4. What recommendation would you give to if an organization wanted to be certain that business partners do not
.
ed
get blocked by any of the ThreatRadar Security Policies?
a. Create a list of the Partner IP addresses and add the IP addresses to the relevant ThreatRadar Whitelist
rv
Lookup Data Sets. Listing the IP addresses in a text file (one IP per line) and using the CSV upload option can
simplify the data input.
se
Answers to Exercises
re
Exercise 1
s
From the SuperVeda - Web Application profile, and the Vedaadmin – Web Application profile, you should find the
ht
two following hostnames:
ig
• www.superveda.local
• admin.superveda.local lr
Configuring the Phishing URLs ThreatRadar Feed:
Al
1. Select Main > ThreatRadar > Dashboard.
c.
2. Close the ThreatRadar Welcome message. If you want, you may select “Don’t Show this again” to prevent the
welcome from displaying again.
In
a,
rv
pe
Im
17
20
©
3. From the Service table, select the Phishing URLs ThreatRadar Reputation Services feed.
.
ed
rv
se
re
s
4. In the Phishing URLs window, select the Manage Tab and the configuration pencil for the ThreatRadar –
ht
Phishing URLs Lookup Data Set.
ig
lr
Al
c.
The Lookup Data Set: ThreatRadar – Phishing URLs window will appear.
In
Note
©
A GUI bug prevents the configure button from working with some versions of the Firefox
Browser. If so, use the Chrome or Internet Explorer browsers for this lab exercise.
6. Click the plus two times to add two rows to the table. Add one hostname in each row and click Update to save
your changes.
.
ed
rv
se
re
s
ht
ig
lr
Al
7. Close the Lookup Data Set: ThreatRadar – Phishing URLs window.
c.
8. By default ThreatRadar Intelligence Phishing URLs feed is updated once every hour. This can be verified by
selecting the scheduling tab:
In
a,
rv
pe
Im
17
20
©
9. You can wait for the Phishing URLs feed to update automatically or manually run the update from Admin > Job
Status.
.
ed
rv
se
10. Later in the day you should see the Phishing URLs warning change to the green check.
re
Warning:
s
ht
OK:
ig
lr
Exercise 2
Al
Configure the ThreatRadar Malicious IPs Security Policy to block and email the security administrator.
c.
Hint: This policy is grouped under Web Service Custom policies. Filter for policies applied to the SuperVeda Http
rv
Service object.
pe
Configure as follows:
Im
17
20
©
Save changes.
Exercise 3
Create a custom blocking policy that correlates a client from an Anonymous Proxy IP address with 5 or more
significant security violations in under a minute.
.
ed
New Policy: Web Service
SV - TR Anonymous Proxies Correlated Blocking
From Scratch
rv
Type: Web Service Custom
se
Select the following Match Criteria:
re
• Lookup Data Set Search (2x)
• Number of Occurrences
s
• Violations
ht
ig
lr
Al
c.
In
a,
rv
pe
Configure as Follows:
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
Quick-View Tables
Table 6-1 - ThreatRadar Reputation and Intelligence (Community Defense) data feeds ................................................ 4
Table 6-2 - ThreatRadar Policy Recommendations ......................................................................................................... 10
Table 6-3 - Bot Classifications.......................................................................................................................................... 20
Table 6-4 - Bad Bot Classifications .................................................................................................................................. 20
Table 6-5 - CAPTCHA Security Policy Types ..................................................................................................................... 21
.
ed
Table of Figures
rv
Figure 6-1 - ThreatRadar Dashboard Location .................................................................................................................. 4
se
Figure 6-2 - ThreatRadar Emergency Activation ............................................................................................................... 4
Figure 6-3 - ThreatRadar Data Feeds Status ..................................................................................................................... 5
re
Figure 6-4 - ThreatRadar Feed showing update issue ......................................................... Error! Bookmark not defined.
Figure 6-5 - ThreatRadar Anonymous Proxies Summary tab ............................................................................................ 5
s
Figure 6-6 - Anonymous Proxy Manage Tab ..................................................................................................................... 6
ht
Figure 6-7 - Locating Threat Radar Data Feed Configuration Details From Threat Radar Dashboard ............................. 6
Figure 6-8 - Locating Threat Radar Data Feed Configuration Details From Global Objects ............................................. 7
ig
Figure 6-9 - ThreatRadar Anonymous Proxies Security Policy ........................................................................................ 11
lr
Figure 6-10 - Predefined ThreatRadar Security Policy Match Criteria Logic .................................................................. 12
Figure 6-11 - Custom Policy for Anonymous Proxies and TOR IPs Data Feeds............................................................... 13
Al
Figure 6-12 - Security Policy using Source GeoLocation Match Criteria......................................................................... 14
c.
In
a,
rv
pe
Im
17
20
©
.
Analyzing details of client activity with Alerts and Violations, and discuss strategies for differentiating attack activities
ed
versus potential false positive matches.
rv
Chapter Objectives
se
• Use Violations and Alerts to identify false positives, attacks, and tuning opportunities.
•
re
Use the “Add as Exception” and “add to profile” buttons to tune policies and profiles.
• Use SecureSphere’s alert flags (Acknowledged, Dismissed, Important, Unread) to manage alerts.
• Configure appropriate reports to help administrators analyze alerts and violations.
s
• Configure appropriate reports to find opportunities to tune SecureSphere’s configuration and security.
ht
(frequency of high severity violations, “top 10” reports)
ig
SuperVeda Lab Preparation lr
In preparation to work with Alerts and Violations additional simulated web traffic is required.
Al
1. From Client PC, start the Putty SSH tool and connect to the SecureSphere Gateway.
c.
Field Value
In
IP Address 192.168.51.201
Username imperva_user
a,
Password Impuser123
rv
Note
pe
Be certain to connect to the SecureSphere Gateway. The script used is not present on the Management Server.
Im
2. At the command prompt enter the command admin and re-enter the password.
17
SecureSphere> admin
[root@veda-gw ~]#
honeypot_attack.sh; replay_pcap.sh
© 2017 Imperva, Inc. All rights reserved 7-1 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
This will take several minutes to complete and you will see new alerts added to the logs while the scripts are
running.
.
and are located under Main > Monitor > Alerts and Main > Monitor > Violations. Each log provides a slightly different
ed
view into the logged security events and together provide insight into attacks against the protected web
applications. These logs particularly useful when analyzing concerning events, but they are less useful when trying to
rv
gain a top-level overview of the health and operation of the SecureSphere deployment. Fortunately, SecureSphere
se
provides a Dashboard view to give visibility into the overall health and performance of SecureSphere.
re
Dashboard
The Dashboard is the central monitor for the SecureSphere deployment and is located on Main > Monitor >
s
Dashboard and provides visibility into the major components and activities in the SecureSphere deployment.
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
Important:
User idle-time logout is suspended on the Dashboard page. This allows the page to be used in operations centers.
©
SecureSphere users should be aware their sessions will not be automatically ended by SecureSphere when on this
page.
Each section of the dashboard provides visibility into system health, performance or recent activity.
© 2017 Imperva, Inc. All rights reserved 7-2 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Throughput
Alerts per Severity (Filtered) Pie chart graph of alerts by severity
rv
Latest Alerts Listing recent security alerts/violations, filtering available.
Latest System Events Listing of recent System Events.
se
Table 7-1 - Dashboard Sections Explained
re
The Dashboard is particularly useful for daily usage and will be discussed again during the Tuning lesson.
s
Alerts
ht
ig
Alerts are notifications consisting of one or more security policy violations grouped by the type of attack. Attacks can
rapidly generate tens, hundreds, or even thousands of violations over a short period of time and the sheer volume
lr
create significant challenges for analysis and investigation. Viewing events in a sequential order almost guarantees
Al
that critical but infrequent events will be lost in the sea of low-importance ‘noise.’
c.
SecureSphere Alerts address this challenge by grouping multiple violations into a single Alert based on the
underlying attack type. By grouping the Violations by their attack type, Alerts present a broader view of the attack
In
patterns directed at the protected web applications. Alerts allow easy access to the underlying violations, giving
investigators access to full attack details whenever the analysis requires it.
a,
rv
The Alerts also provide visibility into the grouping process, providing details on the underlying attack.
Alerts identify traffic details common to all of the underlying violations as well as the details that have some
pe
Viewing Alerts
To view Alerts, select Main > Monitor > Alerts. The Alerts window shows the Filter Pane, Alerts Table, Details Pane
17
© 2017 Imperva, Inc. All rights reserved 7-3 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Figure 7-2 - Main > Monitor > Alerts - Sections Identified
Selecting the Geographic Alerts Map button displays the Geographic Alerts Map window with the top ten countries
rv
by number of alerts heat map.
se
re
s
ht
ig
lr
Al
c.
In
a,
Note
© 2017 Imperva, Inc. All rights reserved 7-4 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
The Basic and Advanced Filters are overlapping. An applied Basic or Advanced filter will be visible in both. The
Quick Filter, however is independent. The active filter is the most recently applied but if you are unsure, consider
clearing both the Quick Filter and the Basic / Advanced filter and then defining the desired filter.
Alert Table
The Alerts Table provides a filtered list of recent alerts for analysis.
.
ed
rv
se
re
s
ht
Figure 7-5 - Alerts Table Example
ig
Note
lr
The visible alerts in your lab environment are likely to differ from the screenshots.
Al
The Alerts Table columns are selectable and by default the table does not show every column. Adding or removing
c.
columns from the display is managed with Action > Select Columns.
In
a,
rv
pe
Im
17
The Select Columns window will appear. The columns showing on the right side will show in the Alerts Table.
©
© 2017 Imperva, Inc. All rights reserved 7-5 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 7-7 - Alert Table Select Columns Window.
re
The Alerts Table provides the following information:
Column Description
s
No. Alert Number: Alerts are numbered sequentially. This number increments to the next
ht
thousands value on Management server restart.
ig
Blocking Violation. The security policy rule is set to Block.
Severity. This column shows the violation severity for the alert.
lr
Type Icon indicates the type of attack. The possible attack types include:
Al
- Anti Automation - Profile
- Correlation - Protocol
c.
- Firewall - Worm
a,
Updated Time and Date of the most recent violating event in the alert.
# Number of violations aggregated into the alert.
rv
Alert Description A short description of the alert. It may contain the name of the policy, rule or
pe
more than one Source IP address have been aggregated into the alert.
Source Geo Location Geo Location of Source IP by country when possible. If violations from multiple
20
countries have been aggregated, it displays Multiple. IPv4 private addresses are
identified by Internal network.
©
Source of Activity N/A. This column is for SecureSphere Database deployments and does not apply to
Web Application Security.
Table 7-2 - Alert Table Columns
© 2017 Imperva, Inc. All rights reserved 7-6 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
Update the Default Time Frame for Event Filtering (days): with the desired number of days.
se
re
s
ht
ig
lr
Al
c.
In
a,
Alert Details
Im
An Alert may contain one or more underlying violations. Alerts with only one violation are called Individual Alerts,
while Alerts containing more than one violation are called Aggregated Alerts. We will look at Aggregated Alerts first.
17
Aggregated Alerts
Selecting an Aggregated Alert from the Alerts Table displays information on the Alert in the Details Pane.
20
©
© 2017 Imperva, Inc. All rights reserved 7-7 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Figure 7-8 - Selecting an Alert for Display in the Details Pane
The Alert Details Pane provides extensive details on the Alert and underlying violations. The following figure shows
rv
an Alert consisting of multiple violations occurring over the few hours. Each part of the alert will be explained below.
se
Viewing Aggregated Alert Details
re
Select Main > Monitor > Alerts and choose an alert from the Alerts Table.
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
2. Actions: This section displays the Action and Followed Actions. If the action is Immediate Block but the Server
Group mode is set to Simulation the block action did not occur and this is indicated with (Simulation Mode).
In this example the Action is Immediate Block and the Followed Action is SV – Security Event – Email Admin
© 2017 Imperva, Inc. All rights reserved 7-8 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
3. Policy: Indicates the Security Policy that triggered on the concerning event.
.
ed
rv
The graph title indicates the first and last events that have been aggregated into the alert. Clicking the
magnifying glass icon provides information on the conditions applied for aggregation.
se
re
s
ht
ig
5. Alert Aggregated By: This section displays the details common to the underlying violations that have been
lr
aggregated into this alert
Al
c.
In
6. Statistical Information: This section lists the details that have some variability between the underlying
a,
Clicking on the magnifying glass present a chart of the differences in a new window.
20
©
© 2017 Imperva, Inc. All rights reserved 7-9 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
7. Violations: The violations section provides examples of violating events that have been aggregated into this
re
alert. Each listed violation can be expanded for further analysis.
s
ht
ig
The details provided for violations is not affected by aggregation and will be shown in the context of Individual Alerts
discussed shortly. lr
Al
Alert Aggregation Process
c.
Alert aggregation is performed on the MX. The following diagram shows the steps of the aggregation process. For a
In
given Alert, aggregation continues for up to 12 hours as long as new events occur at least once per hour.
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 7-10 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Individual Alerts
When an alert consists of just one violation, no aggregation information is available and the Alert Details only show
the Actions, Policy and violation detail. The following figure shows an example of an Individual Alert:
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
2. Event ID, Name, Quick-Actions and Event Key: The event ID, Name and Quick-Actions are on a single line at the
top. Each event, or violation, is given an unique ID at the time of inspection.
Im
17
a. Event ID
b. Event Name
c. Quick-Actions: The following Quick-Actions are possible
20
Clicking this adds an exception for the current action to the Advanced tab of
Add Exception the Security Policy. Exceptions are added with as much detail as possible and
should be reviewed after adding.
Open the Web Profile for the current URL in a new window. This icon only
Show Profile
appears with profile policy violations.
© 2017 Imperva, Inc. All rights reserved 7-11 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Add the character(s) identified in this violation to the Web Profile so they
Add to Profile will be treated as acceptable characters in the relevant parameter and URL.
This icon only appears with profile policy violations.
d. Event Key:
.
ed
The Event Key displays standardized information about the violation.
3. Event Details
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
a. Event Details – SecureSphere Information: Time of Event, Gateway & Sites Tree information. The Icon
Im
d. Event Details – HTTP Request Headers: The full HTTP Request Headers are displayed, providing visibility into
the client request.
20
4. Parameters: The webpage parameters submitted in the client request are identified here.
©
Note the yellow highlighting. When possible, SecureSphere identifies the characters or strings that matched
the signature or policy rule. In the above example the double-encoded value in the parameter is highlighted.
© 2017 Imperva, Inc. All rights reserved 7-12 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
7. Additional Violations: If additional violations are associated with the current request, they are listed in the
rv
additional violations table.
se
re
s
ht
Alert Table Actions
ig
lr
SecureSphere supports the management of Alerts with Alert Flags. Alert Flags are manually assigned status
indicators that are assigned from the Alerts Table. Assign an Alerts Flag by Right-Clicking on the alert in the Alerts
Al
Table.
c.
In
a,
rv
pe
Im
17
Important Identifies the Alert has been viewed and deemed important by the reviewer.
Acknowledged Identifies the Alert has been viewed, but the importance is not yet established.
Dismissed Identifies the Alert has been viewed and is not important, or the underlying issue is
resolved.
N/A Clear Flag Menu option to clear a flag previously set
Table 7-3 - Alert Flags Explained
© 2017 Imperva, Inc. All rights reserved 7-13 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
When set, the flags appear next to the Alert Number in the No. column.
.
ed
Figure 7-12 - Example Alert Flags in No. Column
rv
se
The Alerts Flags support event review workflows like the following example:
re
2. All new high severity alerts are analyzed and flagged as follows:
a. Important – The Alert identified an attack and additional study or mitigation is required.
b. Acknowledged - The security admin has seen this alert and is determined it requires further analysis.
s
c. Dismissed – The Alert has been determined to be acceptable. This could be because SecureSphere blocked
ht
the request and no further actions are required, or because the Alert was important initially but has been
ig
mitigated.
3. Review of flagged alerts is aided by the following saved Basic Filters:
a. High Severity Alerts that are not flagged.
lr
Al
c.
In
a,
rv
pe
Im
17
© 2017 Imperva, Inc. All rights reserved 7-14 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Violations
Violations in a sequential list, allowing investigations into the order specific Violations occurred in. The Violations
display is particularly helpful when tracking down the activity of a particular user, or for identifying what other users
were doing at the time of a particular violation.
To view Violations, select Main > Monitor > Violations. The Violations window display is very similar to the Alerts
window. The Violations window is composed of a Filter Pane, Violations Table, and Details Pane.
.
ed
rv
se
re
s
ht
ig
Figure 7-13 - Main > Monitor > Violations - Sections Identified
Username Name of the Application User, when identified though the profile Web Application
User Tracking.
Im
Violated Item Identifies Parameter, URL or other detail where the Violation occurred when
applicable.
©
© 2017 Imperva, Inc. All rights reserved 7-15 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
1. Details: Details on the Violation itself. This is the same information provided in the Alerts and discussed earlier
with one exception. In Alerts, Additional Violations are listed in the event details while in Violations, Additional
Violations are a separate tab. For further information on the data presented in the Details tab, see the
rv
Individual Alerts topic discussed previously.
se
2. Additional Violations: Additional Violations are displayed on this tab. The Additional Violations tab provides
some additional detail compared to Alerts.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
3. Response: Some security policies monitor the server response and can be configured to capture the response
page returned to the client. If the policy action is set to block, the response is not delivered to the client. When
©
© 2017 Imperva, Inc. All rights reserved 7-16 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
Note
As a precaution, SecureSphere displays the captured response in plain-text. This is a protection against the
unlikely scenario that an attacker injects malicious code in a way that is then included in the server response. If
this were to happen and SecureSphere displayed the Response HTML format, the administrator’s browser could
inadvertently run the malicious code. By display the response in plaintext, this unlikely but theoretically possible
attack vector is eliminated.
© 2017 Imperva, Inc. All rights reserved 7-17 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
The following scenarios cover some common Alerts and provide visibility into the details used to understand the
.
ed
underlying client activity.
rv
Alert Analysis Scenarios:
Analysis - Alert has a very high number of aggregated events Implies - False Positive
se
Strength of evidence Low. However, it increases with increased event count. Very strong if event
count is notable percentage of total web traffic. (See Exceptions)
re
Reasons Attack activity is usually a very small percentage of total web activity. Alerts
with high event counts are more easily be generated by a false positive match
s
affecting many users, in comparison to all of the activities of an attacker.
ht
Exceptions High volume attacks like Denial of Service (DoS), web site scanning, password
ig
brute-force, etc.
common.
Exceptions All distributed attacks like Distributed Denial of Service (DDoS), distributed
In
Analysis – Aggregation Graph - Events occur steadily over time Implies - False Positive
rv
registration, etc. Some web site scanning or web site fuzzing attacks may also
have steady activity over time.
17
20
© 2017 Imperva, Inc. All rights reserved 7-18 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Reasons Initially during learning no alerts are generated. After sufficient learning takes
place, all URLs are switched to protect and traffic can generate alerts and
violations. If the deployment is new, un-tuned, or the web application is
updated, the alerts are very likely false-positives.
If the profile is established and well-tuned and the web application is not
undergoing changes, the likelihood of a false positive is low.
Exceptions The increase in Profile Alerts matches increases in other attack indicators like
.
ed
ThreatRadar violations, Invalid characters in URL/Parameters/Headers, web
site scanning, etc.
rv
Analysis – Aggregation Graph – Many events initially, but quickly diminish to zero Implies – Attack
se
Strength of evidence Low to Medium
Reasons Most attackers vary the attack as they search for vulnerabilities. Due to Alert
re
Aggregation, the attacker’s activity is grouped by attack types resulting in
many alerts with small numbers of events as the attacker tries different
s
strategies. Alerts with activity concentrated at the start are a common result.
ht
Exceptions DoS and DDoS attacks may simply flood the server with the same attack type
ig
over and over again. Also, some vulnerability scanning attempts may fuzz the
web application. Fuzzing is the process of sending random data into all input
lr
fields in the attempt to find an unknown defect in the target application.
Al
c.
Reasons Most attackers vary the attack as they search for vulnerabilities. Due to Alert
Aggregation, the attacker’s activity is grouped by attack types resulting in
a,
many alerts with small numbers of events as the attacker tries different
rv
strategies. Alerts with activity concentrated at the start are a common result.
Exceptions DoS and DDoS attacks may simply flood the server with the same attack type
pe
over and over again. Also, some vulnerability scanning attempts may fuzz the
web application. Fuzzing is the process of sending random data into all input
Im
Alerts Reports
© 2017 Imperva, Inc. All rights reserved 7-19 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Follow the steps below to create a custom Top 10 WAF Violations report.
.
c. Click
ed
4. The Report Window will show the settings for the new report
5. Select the General Details tab
rv
6. Select Format: PDF and Page Orientation: Landscape
se
re
s
ht
ig
7. In the Keywords section, select the SuperVedaWeb keyword and move it to the Report Keywords column with
the arrow lr
Al
8. Select the Data Scope tab and use the arrow to move Applications report field into the Enabled Fields
section.
9. Expand the Applications Field and select both the SuperVeda and Vedaadmin web applications.
c.
© 2017 Imperva, Inc. All rights reserved 7-20 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Review Questions
Given the following alert scenarios, do you think the underlying events are valid traffic, False Positive, or the events
are attack traffic, meaning the alert correctly identified an attack:
1. An alert with a very high number of aggregated events, reaching approximately 10% of all web activity. The
events arrive consistently throughout the day.
a. Given just this information, how would you classify the alert:
1. False Positive – Likely
.
ed
2. False positive – Possible
3. Cannot say
4. Attack – Possible
rv
5. Attack – Likely
se
b. What reasoning backs up this classification?
2. An HTTP protocol violation alert is generated every four hours. The client is coming from an internal IP address
that is located the server network. Between 100 and 300 events are aggregated within the first 30 minutes and
re
then there is no activity until a new alert is generated 4 hours later.
a. Given just this information, how would you classify the alert:
s
1. False Positive – Likely
ht
2. False positive – Possible
3. Cannot say
ig
4. Attack – Possible
5. Attack – Likely lr
b. What reasoning backs up this classification?
Al
c. What additional information would help make a determination?
3. Many alerts are occurring with Web Profile violations, mostly regarding Parameters like Unknown Parameter,
Parameter Type Violation, and Parameter Size Violation. All of the Alerts are being identified as Distributed in
c.
3. Cannot say
4. Attack – Possible
rv
5. Attack – Likely
pe
4. Attack – Possible
5. Attack – Likely
20
© 2017 Imperva, Inc. All rights reserved 7-21 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Exercises
Prerequisite:
Important
Before beginning the exercises, you must complete the steps detailed in the following class interactive sections.
1. SuperVeda Lab Preparation.
2. Dashboard.
.
3. Viewing Alerts.
ed
4. Alert Table.
5. Viewing Aggregated Alert Details.
rv
6. Analyzing Violation Events within Alerts.
se
7. Alert Table Actions.
8. Violations.
re
Exercise 1:
s
ht
Find a Suspicious Response Code Alert. Review the originating policy, the policy description, and details from the
Violations to better understand this alert.
ig
Which direction is the web traffic going in these alerts? lr
Al
Exercise 2:
c.
Review several of the violations in the Suspicious Response Code violation. Are all of the violations clearly attacks,
In
Exercise 3:
pe
From one of the violations in the Suspicious Response Code Alert, Select the Filter icon to filter the alerts by the IP
address 192.168.55.200.
Im
Can you find clear indications of malicious or attack activity from this IP address in the Alerts or Violations logs?
17
© 2017 Imperva, Inc. All rights reserved 7-22 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
(Excluding possible DoS, DDoS, and scanning attacks is still required).
2. An HTTP protocol violation alert is generated every four hours. The client is coming from an internal IP address
rv
that is located the server network. Between 100 and 300 events are aggregated within the first 30 minutes and
then there is no activity until a new alert is generated 4 hours later.
se
a. Given just this information, how would you classify the alert:
1. False Positive – Likely or False positive – Possible (both good)
re
b. What reasoning backs up this classification?
The consistent nature of these alerts, and the fact they appear to originate from a sever in the server network
imply that this is a regularly scheduled operation. Perhaps it is an API call, or a content update, or an internal
s
security scan. The Alert type of HTTP Protocol Violation, could be consistent with this scenario as well.
ht
c. What additional information would help make a determination?
What Protocol violation are we seeing, if it is a large parameter size, perhaps the application was designed
ig
that way? Looking for additional violations would help as would reviewing the details of the request for invalid
data or attack patterns. lr
3. Many alerts are occurring with Web Profile violations, mostly regarding Parameters like Unknown Parameter,
Al
Parameter Type Violation, and Parameter Size Violation. All of the Alerts are being identified as Distributed in
the Alert Description.
a. Given just this information, how would you classify the alert:
c.
It depends on the accuracy of the profile from learning and tuning. If the profile is well tuned then this is
more likely an attack.
b. If you also noticed the number of Alerts for ThreatRadar Malicious IP increased during the same time, how
a,
1. Attack – Likely
2. What reasoning backs up this classification?
pe
The fact that the activity of known malicious IP addresses increased at the same time the profile violations
increased is strong evidence for a distributed attack. If the attacker was using a botnet, some of the bot IP
addresses may be new and unknown. The web profile policy will still identify any abnormal activity from the
Im
Changes to the web application may require the profile to re-learn the URLs and parameters where the
changes were made.
©
© 2017 Imperva, Inc. All rights reserved 7-23 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
Answers to Exercises
Exercise 1:
Find a Suspicious Response Code Alert. Review the originating policy, the policy description, and details from the
Violations to better understand this alert.
.
Which direction is the web traffic going in these alerts?
ed
A: This is return traffic from the server to the client.
rv
se
Exercise 2:
Review several of the violations in the Suspicious Response Code violation. Are all of the violations clearly attacks,
re
false positives, or a mixture?
A: Almost all are violations.
s
ht
What details helped with this determination?
ig
A: Reviewing violation details within the alerts.
lr
Al
Exercise 3:
c.
From one of the violations in the Suspicious Response Code Alert, Select the Filter icon to filter the alerts by the IP
In
address 192.168.55.200.
a,
Can you find clear indications of malicious or attack activity from this IP address in the Alerts or Violations logs?
rv
A: Yes, however answers will vary. This client is performing a vulnerability scan of the destination server.
pe
© 2017 Imperva, Inc. All rights reserved 7-24 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 7-25 Lesson 7: Alerts, Violations and Monitoring
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Chapter Objectives
rv
• Tune SecureSphere to minimize false positives, streamline profiles, improve policies and reduce non-essential
alerts.
se
o Configure reports in addition to the alert/violation reports, to identify where to tune SecureSphere.
o Explain how the profile optimization wizard can assist in tuning profiles.
re
o Explain the impact and trade-offs of profile tuning options.
“add to profile” button
s
Parameter prefixes
ht
URL Patterns
Plug-ins (advanced)
ig
o Impact of adjusting policies (best practice, using copies of default/built-in policies).
Adjustments to default / built-in policies are very broad in scope; tuning a default policy for 1 application
lr
may have unintended impact on other applications.
Changes / adjustments to custom policies with highly targeted criteria / specific applications have a more
Al
narrow scope, but may need to be manually repeated across many policies.
o Impact of policy adjustments on Correlation Policies
c.
Using Match Criteria other than only regex, to save CPU cycles.
o Missing hostnames in alerts may indicate a need to fix GW DNS settings.
rv
o Web Scanner / Pen Test IPs may need access through SecureSphere, or they may be testing SecureSphere’s
pe
Tuning Overview
Tuning is an essential step for all SecureSphere deployments. Tuning improves both performance and accuracy of
17
the deployment. When tuned, the most critical security events can be quickly identified from the Alerts and
Violations logs or in the corresponding reports. Tuning may require adjustments to the Sites Tree, to the Web
20
Policy Accuracy
When discussing the accuracy of Security Policies, the terms False Positives and False Negatives are often used.
These terms are from statistics and used to describe the four possible results when it is possible that the test itself
came to the incorrect answer.
© 2017 Imperva, Inc. All rights reserved 8-1 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Rule Action Client Browses Web Site (Good Behavior) Hacker Attacks Web Site (Attack Behavior)
Policy Rule Matches False Positive – Valid Traffic is blocked True Positive – Correct Action, Attacker
Blocked
Policy Rule Does Not True Negative False Negative – Attacker Not Blocked
Match Correct Action – Valid Traffic Allowed
Table 8-1 - False Positives and False Negatives Explained
For Web Application Security False Positive events can have significant and obvious impacts because legitimate
activity is being identified as an attack. If the policy rule is set to block, clients may be unable to use the web site.
.
ed
False Negative errors can also very serious impacts because they are attack events that were missed. SecureSphere
tuning is the process of resolving both false positive and false negative events.
rv
Tuning Workflow
se
The following workflow is recommended to address the most common tuning requirements.
re
1. Verify SSL Traffic is being properly decrypted by SecureSphere
2. Exclude Trusted Traffic with Source Restrictions
s
ht
3. Web Application Profile Tuning
a. Review Alerts and Violations for profile tuning opportunities.
ig
b. Use Profile Optimization.
c. Common Profile Tuning Actions lr
1. Parameter Prefixes – password1 and password2 on the registration page
Al
2. Creating URL Patterns for dynamic web applications
3. Options when prefix or suffix matches are insufficient (Plugins)
c.
In order to demonstrate the tuning process, the following preparation steps need to be performed in the SuperVeda
Im
© 2017 Imperva, Inc. All rights reserved 8-2 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
c. In the Gateway Group Details pane, Performance Profiling section, select Enable. This may have been done
ed
during the Administration class.
rv
se
re
s
ht
ig
lr
Al
c.
In
d. Save changes.
a,
b. Use the Select Application window to select the SuperVeda - Web Application.
Note: if an application is automatically displayed, use the Change Application button to bring up the Select
©
Application window.
© 2017 Imperva, Inc. All rights reserved 8-3 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
c. Select URLs (Tree View) and expand the entry SuperVeda Web SG – SuperVeda Http – Service – SuperVeda
Web Application to locate the folder /(root directory).
.
ed
d. Right click on the /(root directory) folder and select Switch Mode.
rv
se
re
s
ht
ig
lr
e. Configure the Switch Directory Status window as follows:
Al
Select: All URLs in This Directory and in all subdirectories
Select: Protect
c.
In
a,
rv
pe
Im
4. Verify all URLS are protected for both the SuperVeda - Web Application and the Vedaadmin - Web Application
a. Select Main > Profile > Overview
20
b. Expand the SuperVeda Web SG and SuperVeda – Http – Service from the Profile Sites tree
c. Verify the numbers in the URLs Total and Protected columns are the same for both the SuperVeda – Web
Application and the Vedaadmin – Web Application.
©
© 2017 Imperva, Inc. All rights reserved 8-4 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
The number of URLs in your environment may differ.
ig
5. Initiate Traffic simulation scripts on the SecureSphere Gateway:
a. Log into the SecureSphere Gateway CLI via the console or SSH.
lr
b. As root, run the following CLI commands:
Al
waf-tuning-1.sh
c.
In
SSL traffic is decrypted by the SecureSphere Gateway at the time of inspection. This process requires the SSL keys
used by the protected web applications and are installed during the initial configuration. Normally verifying the SSL
pe
Keys is performed at the time of installation under Main > Monitor > Dashboard, or Main > Monitor > Alerts. The
Alert or identifying problems with SSL traffic is the Untraceable SSL Sessions and is a rule in the Network Protocol
Im
2. SecureSphere has no access to the server's private key used to establish this session.
3. The SSL cipher method used for this session is not supported by SecureSphere.
©
As mentioned earlier, the first reason generally resolves itself rapidly. It is most commonly associate with a gateway
restart but it can also occur during a gateway High Availability failover, or when a service is first added to the Sites
Tree.
© 2017 Imperva, Inc. All rights reserved 8-5 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
The last two causes of Untraceable SSL Sessions are more concerning because they indicate a problem that could
make all encrypted traffic indecipherable. SecureSphere will be unable to inspect this traffic and unable to protect
against attacks.
.
ed
rv
se
re
s
ht
ig
lr
Al
Figure 8-1 - Untraceable SSL Sessions: Unknown Server Certificate
c.
The missing certificate is identified under the Certificate Column. To further identify the certificate the certificate,
In
this value can be copied from the alert and entered into a certificate decoding program. Alternatively it can be saved
as a CRT text file and viewed from the workstation.
a,
rv
Tip
pe
In windows, you can save the certificate as a CRT file. Copy the full line and paste it into notepad.
Surround the certificate with -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.
Im
17
20
©
Save the file with a CRT extension and open the resulting file.
In windows, once open select the Details tab to view the certificate details.
© 2017 Imperva, Inc. All rights reserved 8-6 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
SSL Cipher Method / Unsupported Cipher
s
The last type of SSL Untraceable event is caused by an unsupported cipher. Unsupported Ciphers are encryption
ht
ciphers that are either weak or are technically incompatible with inline analysis. Weak ciphers are unsafe for use and
ig
should be disabled on the protected servers. Ciphers presenting technical incompatibilities affect SecureSphere
Gateways deployed in the Inline Bridge or the Sniffing network configurations. The primary example of this is the
lr
Diffie-Hellman Cipher. By design, the Diffie-Hellman cipher cannot be analyzed by a device in the middle of the
Al
traffic stream. This is a design feature and affects all inline systems.
c.
Notice that the cipher name contains DHE which indicates the cipher is based on Diffie Hellman.
Note
© 2017 Imperva, Inc. All rights reserved 8-7 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Not all Untraceable SSL Violations are due to missing certificates. Some SSL Based attacks may also generate
Untraceable SSL Alerts. When unsure, filter the alerts or violations by the client IP address. If other violations are
present, in particular network or HTTP Protocol violations, the client was likely testing for a vulnerability on the
protected web application.
.
The general solution for Unsupported Ciphers is to disable the ciphers on the protected web server. This is especially
ed
important for weak ciphers, which do not provide adequate security for the client’s traffic. If strong Diffie-Hellman
ciphers are in use, and disabling them is not an option, there is an alternative. The SecureSphere Gateway can be
rv
deployed in Reverse Proxy mode, which allows the Gateway to terminate the client session. However, this may
se
require network architecture redesign and reconfiguration.
re
Exclude Trusted Traffic with Source Restrictions
In many SecureSphere deployments, traffic from some sources is considered trustworthy and can be ignored. The
s
ht
most common source of trustworthy traffic for Web Application Firewall deployments is from trusted web
vulnerability scanners. Excluding this trusted traffic allows the vulnerability scanner to have an unobstructed view of
ig
the protected web applications. An unobstructed view is important because when SecureSphere is set to Active it
lr
will block the vulnerability exploit patterns used by the scanner to assess the vulnerabilities present on the web
application. While this does provide an accurate view of the effective security provided by SecureSphere, it
Al
interferes with an accurate understanding of the security of the protected web applications.
c.
Having an incomplete view of the vulnerabilities limits the organizations ability to correct the problems in the web
applications. When vulnerabilities are not identified and resolved, the following problems can easily arise:
In
• Web developers may mistakenly believe the underlying code is safe and introduce new vulnerabilities through
a,
code reuse.
• Due to a lack of awareness of vulnerabilities, the web application is perceived to be safe enough go
rv
unprotected for a ‘short’ maintenance period. With automated vulnerability scanning by attackers, this is not a
pe
safe assumption.
• Unidentified vulnerabilities increase the possible impacts of uncommon but damaging attacks. For example, a
Im
malicious insider attacking from an adjacent server could leverage unidentified vulnerability in an attack.
17
© 2017 Imperva, Inc. All rights reserved 8-8 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
5. For the Ignore IP Group option, click the icon to create an IP Group. The Configure IP Groups window will
rv
appear.
6. Click to create a new IP Group, provide an appropriate name and click create.
se
re
s
ht
ig
lr
For this SuperVeda training lab example the name is SV – Web Vulnerability Scanner.
Al
7. Configure the IP Group with the relevant IP addresses to exclude from inspection.
c.
In
a,
rv
9. For the Ignore IP Group option, select the newly created IP Group.
Im
17
For this SuperVeda training lab example select SV – Web Vulnerability Scanner.
20
Note
©
Choose Ignored IP Addresses with care since all traffic from ignored IPs will be allowed without any inspection by
SecureSphere.
© 2017 Imperva, Inc. All rights reserved 8-9 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
The Web Application Profile is incredibly powerful at highlighting abnormal client activity when properly trained.
However, if left unattended during the learning process it can generate significant numbers of false positive Alerts
and Violations.
.
ed
Web Profile False Positive Tuning
rv
A key aspect to tuning is the Web Application Profile. Profile violations can surprise Security Administrators because
no alerts are generated for URLs in learning. Over time, individual pages are switched to protect which causes a few
se
Profile violations to occur. However, the surprise occurs when the global Switch to Protect thresholds are reached
and all remaining pages and cookies are switched to protect.
re
If the profile was unattended during learning, it is very common to have many URLs with incomplete or incorrect
s
learning. When switched to protect, many alerts can be generated daily.
ht
ig
During the initial configuration lesson, the Switch to Protect thresholds were set to very low values to allow the
switch to protect to occur during class and this may have already occurred. However, new learning events restart
lr
the timer and the global Switch to Protect thresholds still may not have been reached. For this reason, we manually
Al
set all URLs to protect before running the waf-tuning-1.sh script.
c.
The following process walks through the analysis of two profile alerts to identify Profile tuning opportunities. The
following workflow will be followed in the analysis and tuning process.
a,
2. Using the Basic Filter locate the Alert – Parameter Type Violation mode in attack.superveda.local/register.asp.
© 2017 Imperva, Inc. All rights reserved 8-10 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
a. Locate and expand the By Alert Type and By URL Basic Filter search fields.
.
ed
rv
se
re
s
ht
ig
lr
Al
b. For the By Alert Type field, select Profile.
c.
In
a,
rv
pe
Im
17
Value: /register.asp
©
© 2017 Imperva, Inc. All rights reserved 8-11 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
number of events.
.
ed
rv
se
a. At this point the alert looks like a good candidate for being a false positive for the following reasons:
re
1. The Alert type is a Profile Violation type, the deployment is new, and the Profile URLs were very recently
switched to protect.
s
2. The Alert has a large number of events in comparison to other events from around the same time.
ht
b. Profile false positive events usually impact many clients and are identified as Distributed during the
aggregation process. If this Alert is description was “Distributed Parameter Type Violation…” instead of just
ig
“Parameter Type Violation…” the case for this being a false positive would be further strengthened.
lr
c. The Alert aggregated by table will also provide insights into commonalities between the underlying
violations grouped in this alert. Note that Source IP is one of the distinct values used for aggregation.
Al
c.
In
a,
rv
pe
d. A single source IP address and is inconsistent with the most common types of Profile false positives.
Im
However, a high volume parameter type violations could occur if a business partner, or remote office was
accessing an infrequently used URL, for example thorough a set of API calls. The SuperVeda organization has
a small office in London England. Next use Geo-IP If this request is from London, then it could still be a false
17
positive.
20
©
© 2017 Imperva, Inc. All rights reserved 8-12 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
e. From the Alert details pane, expand the first Violation shown and click the source IP address link.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
g. The country of origin is China which contradicts the possibility of a business partner, or remote office
©
triggering the alerts. At this point the activity does not look like a false positive, instead it is beginning to
look like an attack.
h. Next look for other concerning activity from the source 117.89.105.98. Uncertainty with the initial Alert can
often be resolved by finding other examples of obviously bad behavior from the client that occurred near
the time of the original Alert. This helps avoid over analysis of the original Alert.
© 2017 Imperva, Inc. All rights reserved 8-13 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
1. From Violations area of the Alert, locate the IP 117.89.105.98 under Connection and click the Funnel icon
to filter the alerts by the Client IP address. Select Change current filter according to this field.
.
ed
2. Briefly review other Alerts from the Alerts List to identify potential attack activity from this client. Pay
attention to Alerts marked as High Severity and especially Alerts with an Action of Immediate Block or
rv
Immediate Block (Simulation Mode).
3. Looking through other alerts from this source IP address shows many different attack patterns:
se
a. Many examples of traversal attempts, for example:
re
b. Many examples of SQL Injection attempts:
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
This example is especially telling, since PG_SLEEP appears to be a command for PostgreSQL databases
but the SuperVeda Web site based on MSSQL.
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-14 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
c. Numerous additional examples of Cross Site Scripting (XSS), Remote Command Execution, and
Directory Traversal can be found under the Multiple Signatures from 117.89.105.98 Alert.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
i. With the quantity and severity of related Alert activity from the source IP, it is safe to conclude the
rv
Parameter Type Violation Alert was correct in Alerting on the client activity.
4. In the SuperVeda environment, the most frequent Parameter Type violations appear to be actual attacks, but it
pe
is possible that other Parameter Type violations contain false positive events. Next us filters to focus on other
Parameter Type Violations to identify potential False Positives:
Im
Selected: Profile
Last Few Days Last: 3 days
Source IP Operation: Not Equals
©
Values: 117.89.105.98
b. Once configured, Apply the filter.
© 2017 Imperva, Inc. All rights reserved 8-15 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
c. Review the resulting Alerts list which will look similar to the following figure.
ig
lr
Al
c.
In
a,
rv
pe
Im
d. The First entry in this list is from the internal web vulnerability scanner on IP 192.168.51.215. This is a false
17
positive and is resolved by Source Restrictions – Ignored IP Group settings, discussed earlier.
e. Review the other Alerts to identify two IP addresses in the 192.168.51.0/24 network range. Which two IP
20
© 2017 Imperva, Inc. All rights reserved 8-16 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
g. The IP address 192.168.51.40 is from a client browsing the SuperVeda Web Application. Review the alert
titled: Parameter Type Violation string in www.superveda.local/dosearch.asp
.
ed
rv
se
h. Analyze the alert details and try to identify if the violations are false positives or attacks.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-17 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
random data to every parameter on the page. Fuzzing attacks generate many Suspicious Response Code
Violations.
3. Review the Alerts or Violations for any Web Protocol or Network Protocol violations from this client. Thje
client could be performing a Web Vulnerability scan, which will also generate numerous protocol
violations.
5. Did you find obvious signs of attack activity for the client at 192.168.51.40? (No).
6. The activity from the client at 192.168.51.40 is legitimate and the Profile Violations for this user are false
positives.
.
ed
Tuning the Web Profile to Eliminate False Positives
When a web profile policy false positive is identified it can be addressed directly from the Alerts or Violations logs,
rv
as well as from the Profile itself.
se
The following Alert shows several Violations due to unexpected characters in the returned parameters.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Figure 8-3 - Web Profile Policy Alert showing parameter values and types
The profile can be updated directly from the Alerts or Violations details. The icon in the Alerts and Violations
Im
details pane adds the missing character types to the profile for the relevant URL and parameter.
17
20
©
Figure 8-4 - Alert Details Pane, Violation details with the Add To Profile icon highlighted.
The changes can be confirmed from Main > Profile > Application View. Select the relevant application, URL and the
parameter Value Type link.
© 2017 Imperva, Inc. All rights reserved 8-18 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
Figure 8-5 - Profile URL, Parameter and Value Type Link identified
lr
The Configure Value Type window will show the acceptable characters. In the following figure, note that both
Al
Comma and Parenthesis characters are now allowed due to clicking the Add to Profile button earlier.
c.
In
a,
rv
pe
Im
17
20
©
Figure 8-6 - Configure Value Type window showing Comma and Parenthesis selected
© 2017 Imperva, Inc. All rights reserved 8-19 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
The Add to Profile Icon works for other Profile Violations like parameter size violations, cookie violations, and more.
.
ed
Number of URLs Causing Recommendation Details
rv
Profile False Positives
Manually tune the profile from false positive events in
se
Small – Less than Twenty
Manual Tuning the Alerts or Violations logs. Make use of reports to
URLs (approx.)
ensure all URLs are identified and to track progress.
re
Option 1: Restart Learning When sufficient URLs require several adjustments to
(Select URLs Only) eliminate false positives, it can be faster to switch the
s
select URLs into learning manually.
ht
Medium – less than one The Automatic Profile Update (APU) thresholts can
Option 2: Adjust APU
ig
hundred URLs automate the switching of URLs into learning.
Thresholds
Lowering the threshold values may be appropriate.
lr The overhead of identifying and switching URLs back
Al
Option 3: Restart Learning to learning can be significant. If so, consider manually
(All URLs) switching all URLs to learning to address significant
false positive events across many URLs.
c.
Option 1: Restart Learning positives, consider switching all URLs into learning.
(All URLs) and Adjust APU The APU thresholds should be also lowered to allow
a,
Thousands own.
For large web applications with many false positives
pe
Table 8-2 - Web Profile False Positive tuning strategies for small, medium and large numbers of URLs
Note
17
Do not empty the profile in your SuperVeda lab environment at this time. If you would like to see the process, it
20
Emptying the profile and restarting learning should be avoided if possible. However, when a large number of
profiled URLs generate numerous false positive violations, it can be the most efficient option. It is done by first
selecting the relevant application under Main > Profile > Application View and then selecting the URLs (Tree View).
© 2017 Imperva, Inc. All rights reserved 8-20 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Expand the URLs tree, right click the /(root directory) folder and select Empty Directory from the menu.
.
ed
rv
se
Figure 8-7 - Emptying /(root directory) to clear all learned URLs to restart learning
re
Web Profile Learning Problems
s
ht
Modern web applications are complex collections of software and can present challenges to the learning process.
ig
The SecureSphere Web Profile has a URL centric view of the protected application. This URL centric view can run
lr
into problems with Dynamic Web Applications or with very large applications containing many hundreds of URLs. A
Dynamic Web Application is a web application is built from web page templates that are dynamically populated with
Al
data at the time of the request. For example, a news site may appear to have a unique URL for each news day.
However, the web server may use a single page and populate the day’s news based on the URL requested by the
c.
client.
In
SecureSphere includes an automatic Profile Optimization process which can help identify such learning problems
and provides recommended solutions.
a,
rv
Profile Optimization
pe
Profile Optimization automatically analyzes the profile for potential learning problems and suggests solutions. The
Im
Optimization analysis runs automatically when sufficient learning has occurred in SecureSphere. It can also be run
manually.
17
Select Main > Profile > Application View and select the relevant application.
©
© 2017 Imperva, Inc. All rights reserved 8-21 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Select Optimization then the Detect Optimization Issues button. Click through the confirmation windows.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
The optimization process depends on the profile size and may take some time to complete.
In
When complete potential issues are listed. Selecting an issue highlights recommended adjustments that could
a,
In the above example, the potential profile optimization issue of Large Number of Similar Alerts was detected from
the Alerts log. In this case the parameters can be directly adjusted from the recommended Adjustments window by
© 2017 Imperva, Inc. All rights reserved 8-22 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
If the recommended changes are appropriate click the Save button to update the profile accordingly.
ig
Incomplete learning due to profile size limits
lr
The Profile Size Limits can be viewed under Admin > System Definitions in the Dynamic Profiling folder.
Al
c.
In
a,
rv
pe
Im
17
20
©
Figure 8-8 - Admin > System Definitions, Profile Size Limits, WAF Size Limits Highlighted
© 2017 Imperva, Inc. All rights reserved 8-23 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Although the size limits can be increased, this rarely solves the problem of hitting the size limits. In a dynamic web
application, additional dynamic pages rapidly fill up the additional space. In very large web applications the total
number of URLs remaining to be profiled likely exceeds any reasonable threshold. However, profile tuning can
address these challenges.
.
ed
SecureSphere Web Profile analyzes client submissions to web page parameters looking for inconsistencies in the
data type, size, required or read only status. In a dynamic web application, the data type and structure are defined
by webpage page templates. The number of templates is a tiny fraction of the apparent pages seen by users. When
rv
a template is protected, all of the pages based on it are also protected. Another benefit is an increase in the speed
se
and accuracy of the learning process due to the volume of unique client requests all associated with the template.
re
Dynamic web pages appear in the Web Profile as many URLs that appear to follow a consistent pattern. In the
following example shows dynamic pages in the customers directory.
s
ht
ig
lr
Al
c.
In
a,
The following options are available for profile tuning with dynamic web applications
pe
• URL Patterns
Im
o URL Prefix - Treat all URLs starting with the pattern as a single URL
o URL Suffix – Treat all URLs ending with the pattern as a single URL
• Web Plugins
17
From the Above case, the customer home pages can be consolidated the following URL Pattern:
20
© 2017 Imperva, Inc. All rights reserved 8-24 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
Figure 8-10 - Create New URL Pattern for URL Prefix /customers/c_home
ed
After creating, the URL Pattern shows in the URL Patterns list.
rv
se
re
Figure 8-11 - URL Patterns List
s
After creating the URL pattern, the previously learned URLs matching the pattern are consolidated into the URL
ht
pattern and cleared from the cleaned from URL tree and list views.
ig
lr
Al
c.
In
a,
rv
pe
URL Patterns work well when the dynamic patter occurs at the beginning or ending of the URL. If the dynamic web
application URLs are more complex, more advanced manipulation of the URLs and parameters is available with
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-25 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Plugins. The following example shows a collection of dynamic web pages that are best resolved with plugins.
.
ed
rv
se
re
s
ht
ig
Figure 8-13 - Dynamic URLs best resolved with Plugins.
lr
Using a prefix filter of /customers/ would consolidate two unrelated web pages, home.html and mail.html.
Consolidating unrelated pages should be avoided when possible. Plugins can resolve many dynamic URLs problems.
Al
Plugins are included in SecureSphere and do not need to be uploaded or installed but do need to be configured to
work.
c.
In
The configuration of plugins is application specific and is beyond the scope of this class. However, detailed
information on plugins is available in the Imperva SecureSphere v11.5 Web Security Users Guide. Imperva
a,
Professional Services can also assist with plugin configuration and tuning for complex web applications.
rv
pe
Profile tuning for very large web applications quickly exceed profile size limits. Identification and resolution of any
dynamic URLs is a critical first step, and in most cases resolves the profile size limit issues.
17
• Disabling We Profiling
© 2017 Imperva, Inc. All rights reserved 8-26 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Benefit The Profile only learns pages that contain parameters. Static content like static HTML pages and
style sheets, and images are not learned by the profile.
All except static URLs with no parameters: Learn all URLs, except for static URLs (files) in GET and
HEAD requests that have no parameters.
Only URLs with parameters: If a URL in a GET or HEAD request has no parameters, do not learn it
in the profile.
Consideration HTML pages without parameters are typically static content and presents fewer attack
opportunities compared to URLs accepting user supplied content. However, static pages are
.
ed
implicated in some attack strategies such as Cross Site Scripting. Configuring SecureSphere to
only profile URLs that contain parameters may be appropriate choice if the application exceed
rv
the capacity of the profile. Alternatively, large and critical web applications can be protected
with multiple applications in the site tree. For details see: Mapping large applications to multiple
se
Web Application objects
re
Table 8-3 - Configuring URL Learning Settings
s
The URL Learning Settings are configured in the Web Application Object as follows:
ht
1. Select Main > Setup > Sites, expand the Sites Tree and select the relevant Web Application object.
ig
2. With the application selected locate the Advanced settings on the Definitions tab.
lr
Al
c.
In
a,
rv
pe
© 2017 Imperva, Inc. All rights reserved 8-27 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Steps:
1. Identify logical segments of the protected web application
rv
2. Define URL Groups Global Objects based on those segments
3. Create additional Web Application Objects in SecureSphere
se
4. Configure Application Mapping with URL Groups to direct traffic to the relevant Web
Application Sites Tree objects.
re
Benefit Allows profiling of large web applications that could not be profiled otherwise.
s
Consideration Configuration requires research and planning. This may require additional ongoing maintenance
ht
for the SecureSphere deployment.
ig
Table 8-4 - Mapping Large Web Applications
lr
The process for mapping large applications to multiple SecureSphere Web Application objects can be demonstrated
in the SuperVeda lab. Although the SuperVeda Web Application is not large by any measure, it does have the
Al
unfortunate design flaw of hosting both the E-commerce application as well as the site administration pages on the
same server. This is a bad security practice because an attacker who successfully compromises the public facing
c.
Profiling can further improve the security position of SuperVeda if all E-commerce traffic and site administration
a,
traffic can be profiled separately. However, the basic Application Mapping performed earlier, Lesson 3, is not
sufficient.
rv
pe
The issue with the original mapping can be seen by attempting to go to the URL: www.superveda.local/vedaadmin/.
This request works and brings up the SuperVeda website administration page.
Im
Since the requested host was www.superveda.local the traffic will be directed to the SuperVeda – Web Application
instead of VedaAdmin – Web Application.
© 2017 Imperva, Inc. All rights reserved 8-28 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
3. Create a new URL Prefix / Directory Group, providing a relevant name.
Al
c.
In
a,
rv
4. In the URL Prefix / Directory Groups window, click create to add rows to the URL Prefix table and configure the
pe
rows as needed.
Im
17
5. Save Changes.
20
2. Expand and select the relevant Service Object from the Sites Tree and on select the Applications tab from the
HTTP Service pane.
© 2017 Imperva, Inc. All rights reserved 8-29 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
3. Configure the Host/URL Application Mapping as needed. In the case of SuperVeda, the following will correctly
map all administrative activities to the Vedaadmin – Web Application.
4. Save changes.
.
ed
Alerts and Violations Tuning
rv
We’ve already seen a sneak preview of tuning while looking at the profile alerts. However, with profiling, we were
se
using the alerts and violations to identify false positive events. The number of events aggregated into an alert was
merely evidence to help identify potential false positives.
re
When tuning Alerts and Violations in general, the focus still starts with the number of events. However, in this case
s
our concern is to reduce the total number of alerts and violations so critical events are easily identified in the logs.
ht
ig
While it is possible to tune SecureSphere by reviewing events in the Alerts and Violations logs, tuning from the alerts
and violations logs can distract from addressing the most critical alerts and violations first. Instead, it is better to
lr
begin the tuning process with Top Ten Alerts reports. The top ten violations reports provides an unbiased view of
Al
the most frequent violations and allows focusing your tuning efforts on the most frequent issues.
c.
When working from the top ten report, your tuning efforts will focus on the biggest issues first and provide the
biggest positive impacts when tuned.
In
a,
3. Analyze the single most frequent Alert type and classify as:
a. False Positive
b. Attack Activity
c. Mix of False Positives and Attack Activity
4. Resolve the alert as follows:
a. False positives: Use the Alerts and Violations logs to identify a tuning option to eliminate the false positives.
© 2017 Imperva, Inc. All rights reserved 8-30 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
b. Attack activity: If the number of alerts is high, consider a short or long IP block policy. This will essentially
quarantine bad actors. If the number of alerts is sufficiently low, acknowledged the alert and move on.
c. Mixed False Positive and Attack Activity: Analyze the alerts and violations logs to identify commonalities
between the false positive events. Add an exception to the Security policy based on those commonalities.
5. Repeat steps 2 and 3 on the remaining nine alert types, from highest to lowest frequency.
6. Work through the top 10 report each day for two weeks or for a total of ten days.
7. After two weeks, schedule the Top Ten WAF Alerts report to run weekly. Maintenance tuning can be
performed weekly.
.
ed
Questions
rv
se
1. Why is the Untraceable SSL Session: Unknown Server Certificate Alert cause for concern if the severity is only
Informative?
re
2. How are Untraceable SSL Session: Unsupported Cipher Alerts resolved?
3. Give a possible consequence of having an incorrect IP address in the Source Restrictions - Ignored IP group
s
settings?
ht
4. What advantage does a Long Session Block Followed Action have over a Long IP Block Followed Action? (Hint –
Think about possible problems with blocking all traffic from an IP address)
ig
5. What advantage does a Long IP Block Followed Action have over a Long Session Block Followed Action? (Hint –
Think of how an attacker will respond to being blocked)
lr
6. If a new application quickly hits the web profile size limits, why is it a bad idea to just adjust the profile size
Al
limits under Admin > System Definitions?
c.
In
Exercises
a,
Prerequisite:
rv
Important
pe
Before beginning the exercises, you must complete the steps detailed in the following class interactive sections.
1. SuperVeda Lab Preparation.
Im
Exercise 1:
©
Locate the Parameter type Violations in www… Alert generated by the client from IP 192.168.51.40.
Tune the alert for this client, being certain to correct all character classes identified as Unexpected Groups (This will
require tuning several underlying violations within the alert).
© 2017 Imperva, Inc. All rights reserved 8-31 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Exercise 2:
Select one issue from the list of optimization issues and review the Alerts and Violations for the issue.
.
ed
Exercise 3:
rv
Review activity coming from the malicious IP Address 117.89.105.98 in China. Create a security policy that identifies
se
numerous Violations from this client. Set the policy to block and assign a Short IP Block Followed Action to the policy.
re
Policy Level: Web Application
Name: SV - Short IP Block Persistent Attacks
s
Type: Web application Custom
ht
ig
Apply the policy to both SuperVeda - Web Application and Vedaadmin - Web Application.
Exercise 4:
lr
Al
Re-run the waf-tuning-1.sh from the Gateway CLI to see how traffic is handled.
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-32 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Answers to Questions
1. Why is the Untraceable SSL Session: Unknown Server Certificate Alert cause for concern if the severity is only
Informative?
A: The Untraceable SSL Session: Unknown Server Certificate Alert indicates that SecureSphere is unable to
decrypt some or all encrypted traffic directed to the protected server. Without decrypting the traffic,
SecureSphere is blind to any activity, including attacks.
.
ed
2. How are Untraceable SSL Session: Unsupported Cipher Alerts resolved?
A: Untraceable SSL Session: Unsupported Cipher Alerts are resolved by disabling the unsupported ciphers on
rv
the protected application servers. This prevents the unsupported ciphers from being used by clients.
se
3. Give a possible consequence of having an incorrect IP address in the Source Restrictions - Ignored IP group
re
settings?
A: All traffic from the Ignored IP group IP addresses is ignored. If an attacker gained access to a system on the
s
‘incorrect’ IP address the attack activity would be unmonitored and unprotected.
ht
ig
4. What advantage does a Long Session Block Followed Action have over a Long IP Block Followed Action? (Hint –
Think about possible problems with blocking all traffic from an IP address)
lr
A: If multiple users are behind a single IP address and one user triggers the IP block, all clients behind the IP
Al
address are affected. This can occur with employees connecting from the company network, all employees
appear to come from the network firewall IP address. The Session Block Followed Action blocks traffic based
on the client’s Session ID, which allows blocking the bad actor even though other clients may share the same IP
c.
address.
In
5. What advantage does a Long IP Block Followed Action have over a Long Session Block Followed Action? (Hint –
a,
can modify. Followed Action Blocks by Session will target individuals more accurately but may be easier to
pe
evade by attackers. Modifying the source IP address is virtually impossible. This is one reason attackers
attempt to distribute attacks via Anonymous Proxies and Botnets
Im
6. If a new application quickly hits the web profile size limits, why is it a bad idea to just adjust the profile size
limits under Admin > System Definitions?
17
A: If the application quickly hit the limit, this indicates that the application has dynamic content, or is very
large. In both cases, any increase in the size limits is likely to be quickly filled.
20
©
Answers to exercises
Exercise 1:
Locate the Parameter type Violations in www… Alert generated by the client from IP 192.168.51.40.
© 2017 Imperva, Inc. All rights reserved 8-33 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Tune the alert for this client, being certain to correct all character classes identified as Unexpected Groups (This will
require tuning several underlying violations within the alert).
Use the Quick Filter or Basic Filter to filter alerts based on the IP address 192.168.51.40.
Quick Filter:
.
ed
Basic filter:
rv
se
From the Policies List, select the Parameter type Violations in www… Alert.
re
s
Review the underlying Violations in the Alert Details window. Make an exception for each distinct Unexpected
ht
Group.
ig
lr
Al
c.
In
a,
rv
pe
Im
For each violation with a distinct group, expand the Violation and then use the button to add the character type
to the profile.
17
20
©
Exercise 2:
Run the Profile Optimization for the www.superveda.local application.
© 2017 Imperva, Inc. All rights reserved 8-34 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Select one issue from the list of optimization issues and review the Alerts and Violations for the issue.
Select Main > Profile > Application View and select the relevant application.
.
ed
rv
se
re
s
Select Optimization from the views pane.
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
Select an issue:
© 2017 Imperva, Inc. All rights reserved 8-35 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Select Main > Monitor > Alerts and use the Quick Filter for the URL.
.
Review Alerts to determine if the traffic is an attack or not. In the case of login.asp, the following violations can be
ed
found in the alerts:
rv
se
re
Note the user name is invalid. This is an OS injection pattern and it provides strong evidence the client activity is
s
malicious or at least unwanted.
ht
ig
Returning to the Profile Optimization Recommendations, the first recommendation seems more appropriate here.
lr
Al
c.
In
a,
rv
pe
Recommendation: Create custom policy to correlate repeated activity from an IP address for blocking, (see exercise
3).
Im
Exercise 3:
17
Review activity coming from the malicious IP Address 117.89.105.98 in China. Create a security policy that blocks
repeated bad activity from this client. Set the policy action to Block and assign a Short IP Block Followed Action to
20
Filter the alerts by the concerning IP address. Estimate the approximate rate of activity from this IP address. This will
be later used to help with the Number of Occurrences match criteria thresholds.
© 2017 Imperva, Inc. All rights reserved 8-36 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
Approximately 420 violations have occurred within the first 30 minutes, this averages to about 14 violations per
minute. However, the alert description begins with Distributed, meaning that the count of events may not be limited
s
to the source IP address in question. For SuperVeda, however, taking ½ of this value is a reasonable starting point
ht
for the policy being created.
ig
lr
client activity were desired, It would be possible to use reporting to get a more accurate measure of the rate of
Al
activity. take a lower value than calculated. In this example, we will take a value ½ the rate of observed violations.
© 2017 Imperva, Inc. All rights reserved 8-37 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
Match Criteria:
• Number of Occurrences
s
• Source GeoLocation
ht
• Violations
ig
Use the speed calculation from before to identify the speed of activity of the attacker.
lr
Use the country or countries seen in the attack behavior in the Source GeoLocation Match Criteria.
Al
Locate available Violations from the common violation types seen in the alerts log.
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-38 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
Apply the policy to both SuperVeda - Web Application and Vedaadmin - Web Application.
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-39 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Note:
If a more accurate measure of the rate of bad behavior was necessary, reports would be an excellent tool for the
job. The following example provides some general ideas for designing the policy based on information from an ad-
hock report.
Example report:
Data Scope – Limit’s report to the last day & source of concern.
.
ed
rv
se
re
s
ht
ig
lr
Al
Tabular – Number of columns selected is limited to minimize the rows returned and ensure useful totals are
provided by the Num. of Events column.
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-40 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Data Analysis View – In this particular example, the data analysis view will be helpful for getting a quick
understanding of the relative magnitude of different activities from the same source of concern.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
Report Result:
In
The Data analysis view identifies HTTP Signature Violations as the primary activity for this client. Using HTTP
a,
Signature Violations.
rv
pe
Im
17
20
©
The Tabular Results provide visibility into the number of attempts for each Alert, and because of the inclusion of
Session ID, it also indicates how many times the client used a new connection to the web server during the attack.
© 2017 Imperva, Inc. All rights reserved 8-41 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
If all, or nearly all the Alerts were tied to just a few Session IDs, then using a followed action of Short Session Block
would also be an alternative to the Short IP Block recommended in this exercise.
.
ed
rv
se
From the example report, three unique sessions were used during the HTTP Signature Violation activities and the
re
bulk of concerning behavior did have a Session ID associated with it. Under these circumstances, using a Short
Session Block would also be an option for the followed action. However, since the exercise specified a short IP
Block, that will be used for the custom policy.
s
ht
From the report, the most effective thing to correlate on would be the Signature Violations. Unfortunately the
ig
Signatures Match Criteria requires manually selecting the relevant signatures, which can be time consuming
lr
depending on how many unique signatures need to be included.
Al
With a little more investigation, either through the Alerts log or with reports, the most common type of signature
violation from 117.89.105.98 can be identified as Directory Traversal. Fortunately, locating and adding the full
c.
group of Directory Traversal Signatures to the custom security policy will be relatively easy.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-42 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Creating a custom policy from the following investigation may result in Match Criteria looking similar to the
following:
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
Exercise 4:
17
Re-run the waf-tuning-1.sh from the Gateway CLI to see how traffic is handled.
20
The following shows a mistake with tuning the traffic from 192.168.51.40. Several violations continued to occur.
©
This could be further resolved by reviewing the additional violations and excluding the remaining unexpected groups
© 2017 Imperva, Inc. All rights reserved 8-43 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
The following shows the custom policy triggering on the test traffic.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-44 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 8-45 Lesson 8: WAF Tuning
SecureSphere 12.0 Web Application Security Course Manual
Active Blocking
Chapter Overview
Active Blocking can be enabled once a full configuration and at least only tuning cycle is complete. This allows
SecureSphere to intercept and block malicious requests, preventing attackers from doing damage. In this lesson we
will cover the process of enabling active blocking, verifying the error page presented to blocked clients, and the
.
configuration off error page policies to present different error pages for specific situations.
ed
Chapter Objectives
rv
se
• Configure SecureSphere to enforce the tuned configuration.
o Move SecureSphere from Simulation to Active Blocking mode.
re
o Verify the non-default error page is working.
o Identify and manage Followed Action Block events.
o Configure additional Web Error Page Groups as needed.
s
ht
Preparing for Active Blocking
ig
The following preparation will help ensure the switch to active blocking is uneventful.
lr
1. Verify the Web Error Page has been modified from the from default value.
Al
2. Determine the acceptable accuracy for blocking policy rules.
For example, a web application receiving around 10 K requests per day. Blocking Alerts with less than ten
c.
events may be acceptable to ignore. Even if every block was a false positive, the effective hit rate would be
In
0.1% or less.
3. Determine the number of error free days required to be sure Active Blocking will be safe for all normal client
a,
traffic.
For example, an organization may require accurate traffic handling for one or two weeks before enabling
rv
active blocking.
pe
4. If the number of alerts is hard to manage, focus only on Alerts that have an action of Block.
5. If false positive events are identified, tune them and restart the error free days count.
Im
6. When the error free day count is reached without errors, enable Active Blocking.
© 2017 Imperva, Inc. All rights reserved 9-1 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
.
ed
5. Save Changes.
rv
6. Verify SecureSphere is actively blocking by navigating to the protected web application and trigging a block.
se
a. In the SuperVeda lab, blocking can be verified by searching for cmd.exe in the SuperVeda search page.
b. The block page should look similar to the following figure:
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
time. This is particularly helpful for blocking malicious activity and can help with small denial of service attacks.
©
SecureSphere is preconfigured with six blocking Action Sets for use as Followed Actions.
1. Short IP Block.
2. Short Session Block
3. Short User Block
4. Long IP Block
5. Long Session Block
© 2017 Imperva, Inc. All rights reserved 9-2 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
Blocking Followed Actions are a powerful tool for thwarting attacks and is especially helpful with attacker
reconnaissance activities as well as with all types of automated attacks. However, if the security policy happens to
generate a false-positive, the blocking Followed Action will extend a single blocked request into a complete ban for
.
the originating client. If the offending activity happens to be part of normal maintenance operation the impacts can
ed
be especially painful. For example, a caching server may periodically synchronize data with the protected web
application. If a Long IP Block were accidentally applying to this maintenance operation the overall web service
rv
would likely experience significant degradation.
se
With IP Block Followed Actions, false positives can be prevented with the Trusted IPs setting. This relies on a
re
previously defined IP Group Global Object.
s
ht
ig
lr
Al
c.
Figure 9-1 - Trusted IPs Setting for Short IP Block Selected Action
In
For User and Session Followed Action blocks, critical false positives can be avoided by excluding service accounts or
a,
content networks, as seen in the following two examples. These exclusions should be limited to specific policies
because general usage could leave an opening for attacks from a compromised system.
rv
pe
Im
17
Figure 9-2 - Security Policy service account exclusion with Application User Match Criteria.
20
©
© 2017 Imperva, Inc. All rights reserved 9-3 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Figure 9-3 - Security Policy Content Development Network Exclusion with Source IP Match Criteria.
rv
Identify and Managing Followed Action Block events
se
Followed Action block events are identified in the Alert details, Actions area.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Current and recent Followed Action block events are also visible on Main > Monitor > Blocked Sources.
Im
17
20
©
If it is necessary to unblock a source before the block duration is reached, this can be done by selecting the blocked
client(s) from the Blocked Sources list and then selecting Action\> Release Blocked Sources.
© 2017 Imperva, Inc. All rights reserved 9-4 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
.
ed
SecureSphere supports the conditional application of block pages based on details in the client request. For
example, an organization may provide employees additional information the block event as an opportunity to
rv
troubleshoot possible false-positive events.
se
re
Configuring an Error Page for SuperVeda Employees:
s
2. Set Scope Selection to: Web error page groups
ht
3. Select the Web error Page folder and click to create a new Web Error Page.
ig
4. Configure the Create Error Page window as follows:
Name: SV – Employees Error Page.
Select: From Scratch.
lr
Al
c.
In
a,
rv
pe
a. Click .
5. Select the SV – Employees Error Page and customize the employee error page.
Im
17
20
a. Replace:
©
This page can't be displayed. Contact support for additional information.<br/>The incident ID is:
$(SESSION_ID).
© 2017 Imperva, Inc. All rights reserved 9-5 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
b. With:
Your request was blocked. Please contact support: <br/>
.
ed
Requested Host: $(HOST)<br/>
Session ID: $(SESSION_ID)<br/>
rv
Event ID: $(EVENT_ID).
se
re
s
c. Click to Save Changes.
ht
6. Select the Web Error Page Policies folder and click to create a new Error Page Policy.
ig
a. Configure the Create Web Error Page Policy window as follows:
lr
Al
c.
In
a,
b. Click .
c. Click to add a rule to the SV – Employee Error Page Policy and configure as follows:
Im
17
20
Priority: 1
Error Page: SV – Employee Error Page
d. Click to Save Changes.
© 2017 Imperva, Inc. All rights reserved 9-6 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
f. Locate the Source IP Addresses Match Criteria and click the arrow to select it and configure as follows:
g. Configure the Source IP Addresses Match Criteria as follows:
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
8. From Main > Setup > Sites, expand the sites tree and select SuperVeda – Http – Service.
17
20
©
© 2017 Imperva, Inc. All rights reserved 9-7 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
9. From the Service Definitions tab, expand the Error Page section to locate the Web Error Page Polices list.
.
ed
rv
se
re
10. Click to add a row to the Web Error Page Policies list and select the SV – Employee Error Page Policy.
s
ht
ig
11. Save changes.
lr
Al
Questions
c.
In
Exercises
pe
Prerequisite:
Im
Important
Before beginning the exercises, refer to the steps detailed in the following class interactive sections.
1. Enabling and Verifying Active Blocking.
17
Exercise 1
©
Verify the custom Web Error Page by generating a block page and verifying the SV – Employee Error Page is
displayed.
© 2017 Imperva, Inc. All rights reserved 9-8 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
Exercise 2
Modify the SV - Short IP Block Persistent Attacks policy for local testing and observe the impact of IP Block followed
actions.
Policy Adjustments:
.
ed
3. Set the Number of Occurances to match at 5 or more events.
4. Add the following Violations to the Violations Match Criteria:
SQL Injection
rv
Parameter Type Violation
se
Using Internet Explorer, attempt to attack the SuperVeda web application with any of the following following attack
re
patterns.
s
ht
‘or 123=123--
ig
‘or “a”=”a”--
cmd.exe!
Clear the IP Block on Veda Client from Main > Monitor > Blocked Sources.
In
a,
Exercise 4
rv
Add the SuperVeda Network range to the Trusted IPs setting for both the Short IP Block Action Set and the Long IP
Block Action Set.
pe
Repeat the attacks from exercise 1 to verify the Long IP block is no longer applied to Veda Client’s activity.
Im
Answers to Questions
17
a. Generally no. Without active blocking, SecureSphere only logs activity but does not block attacks.
2. Should Active Blocking be postponed until you can be certain blocking rules never trigger on false positives?
Probably not. This is a case of balancing benefits and considerations. The amount of time and effort to
©
eliminate all possible false positives generally outweighs the benefits. Also, you always know what could be a
false positive. It’ is better to decide on acceptable thresholds of accuracy early in the process and switch to
active when the thresholds are reached.
Answers to Exercises
© 2017 Imperva, Inc. All rights reserved 9-9 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
Exercise 1
Verify the custom Web Error Page by generating a block page and verifying the SV – Employee Error Page is
displayed.
Using Internet Explorer, open the SuperVeda website and select the Search page.
Enter a search term that will be blocked, like cmd.exe.
.
Verify the Error message matches the custom SV – Employee Error Page Policy.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Exercise 2
Im
Modify the SV - Short IP Block Persistent Attacks policy for local testing and observe the impact of IP Block Followed
Actions.
17
2. Quckly locate the SV - Short IP Block Persistent Attacks with the following Basic Filter:
a. Filter Criteria: Policy Origin
©
© 2017 Imperva, Inc. All rights reserved 9-10 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
c. Click Apply
ht
3. Locate and select the SV - Short IP Block Persistent Attacks Security Policy.
ig
4. Update the policy based on the reqiurements:
a. Change the Followed Action from Short IP Block to Long IP Block.
lr
b. Remove the Source Geolocation Match Criteria.
Al
c. Expand the Number Of Occurances Match Critera and set the Occurred More Than value to 5.
5. Expand the Violations Match Criteria
c.
a. Move Paramter Type Violation and SQL injection to the Selected area.
6. Add the following Violations to the Violations Match Criteria:
In
SQL Injection
Parameter Type Violation
a,
7. Save changes.
rv
pe
Using Internet Explorer, attempt to attack the SuperVeda web application with any of the following following attack
patterns.
Im
‘or 123=123--
17
‘or “a”=”a”--
cmd.exe!
20
The Long IP Block can be verified when the browser times out on the web request. This indicates that SecureSphere
©
© 2017 Imperva, Inc. All rights reserved 9-11 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
Exercise 3 lr
Clear the IP Block on Veda Client from Main > Monitor > Blocked Sources.
Al
c.
3. On the Blocked Sources Window, locate and select the row showing the Veda Client IP address 192.168.51.31.
17
20
© 2017 Imperva, Inc. All rights reserved 9-12 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
Exercise 4
Add the SuperVeda Network range to the Trusted IPs setting for both the Short IP Block Action Set and the Long IP
Block Action Set.
.
ed
4. Under Trusted IPs, select SuperVeda Networks.
rv
se
re
s
ht
ig
5. Click to Save Changes
6. Repeat Steps 2 – 5 for the Long IP Block Action Set. lr
Al
Repeat the attacks from exercise 1 to verify the Long IP block is no longer applied to Veda Client’s activity.
c.
Perform 6 test attacks to verify Veda Client no longer receives a Long IP Block.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 9-13 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 9-14 Lesson 9: Active Blocking
SecureSphere 12.0 Web Application Security Course Manual
.
to create a mitigation policy. Upload the vulnerability report, manage vulnerabilities through the SecureSphere web
ed
interface, and virtually patch vulnerabilities with the mitigate tool.
rv
Chapter Objectives
se
• Integrate external web scanner data with SecureSphere and manage identified vulnerabilities.
o Import 3rd party vulnerability scans
re
o Manage identified vulnerabilities
Configure Virtual Patching where possible
s
o Compare newer scan results against previous scans to confirm vulnerabilities have been mitigated and/or
ht
identify new potential issues as web applications change over time.
ig
Web Scanner Integration lr
A critical element in any network security strategy must include a regular vulnerability scan of all potentially
Al
vulnerable areas of an enterprise. Custom web applications, and third party add-ons are often insufficiently tested,
which increases the likelihood of undiscovered vulnerabilities. Dynamic web technologies like AJAX and application
c.
communication delivered by SOAP or similar web services are also particularly vulnerable to malicious manipulation.
In
Identifying web application vulnerabilities changes as web application technologies change and Imperva web
scanning technical partners provide sophisticated analysis of web applications identifying weaknesses available to
a,
attackers.
rv
Many regulatory compliance requirements, like PCI, require periodic vulnerability scans and prioritized mitigation of
identified vulnerabilities based on severity or risk. SecureSphere supports the overall vulnerability management
pe
process with reportable tracking of vulnerability identification, analysis, and mitigation. Additionally, with mitigation
policies, SecureSphere provides the ability to virtually patch identified vulnerabilities providing immediate
Im
© 2017 Imperva, Inc. All rights reserved 10-1 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
2. From the Scanner Integration Policies list, click to create a new web scanner integration policy.
.
ed
rv
se
re
s
ht
ig
3. Configure the Create New Policy window as follows:
a. Name: SV – Vulnerability Scan lr
b. Description: <Optional>
Al
c. Module: New Web Vulnerability Management
d. Followed Action: <Optional>
c.
In
a,
rv
pe
Im
17
e. Click .
4. From the SV – Vulnerability Scan window, select the Details tab.
20
©
© 2017 Imperva, Inc. All rights reserved 10-2 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
5. Locate and click the Upload File button under Policy Parameters.
.
ed
rv
se
re
6. From the Upload File window, select Browse…
s
ht
ig
lr
Al
7. Select \\vedafile\Imperva-lab-files\Tools-v11.5\Training Classes\scanner\superveda_2010_appscan.xml
c.
In
a,
rv
pe
Im
17
20
©
8. Select Open.
9. Select Upload
© 2017 Imperva, Inc. All rights reserved 10-3 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
11. Apply the Scanner Integration Policy to the SuperVeda Web Application.
ed
rv
se
re
s
ht
ig
12. Save and select Action > Run Now to being the vulnerability analysis process.
lr
Al
c.
In
a,
13. The Run Now window will appear, showing the import progress.
rv
14. If present, review any warnings found during the import process.
pe
Im
17
a. Vulnerabilities that cannot be imported may require review on the scanning system.
20
Vulnerability Management
Web Vulnerabilities are managed under Main > Risk Management > Risk Console and the Vulnerability Management
Scope Selection.
© 2017 Imperva, Inc. All rights reserved 10-4 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Figure 10-1 - Main > Risk Management > Risk Console, Scope - Vulnerability Management
rv
The Vulnerability Management Scope facilitates review and management of the vulnerabilities identified in the
imported scan report.
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Figure 10-2 - Risk Console > Vulnerability Management Scope – Sections Identified
Im
Vulnerability Views
17
Vulnerability analysis and mitigation is handled with the Vulnerability Management Views. Graphical Vulnerability
views provide insight into the current and past vulnerabilities while the Workbench tabular view allows
20
© 2017 Imperva, Inc. All rights reserved 10-5 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
of your system. It shows a list of vulnerabilities by age, by service type and by most vulnerable services.
.
ed
rv
se
re
s
ht
ig
Figure 10-3 - Vulnerability Management Summary View
Severity Distribution
lr
Al
Displays vulnerabilities in a number of charts by severity including by service type, status and priority.
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-6 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Figure 10-5 - Vulnerability Management Common Vulnerability Types
Al
Mitigated Vulnerabilities View
Displays mitigated vulnerabilities in a number of charts including by service type, severity, and vulnerability type
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-7 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
Vulnerability Workbench
The Vulnerability Management Scope > Workbench view allows for review and management of individual
vulnerabilities.
.
ed
rv
se
re
Figure 10-7 - Vulnerability Management Scope > Workbench View
The Vulnerabilities Workbench displays the list of the vulnerabilities identified by the scan. Selecting a vulnerability
s
from the workbench displays the information for the vulnerability in the Details pane.
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
Vulnerabilities Workbench
The Vulnerabilities Workbench presents the relevant vulnerabilities for review. Filtering of vulnerabilities is available
if needed.
© 2017 Imperva, Inc. All rights reserved 10-8 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
Priority of the vulnerability. Manually assigned by clicking the priority button in the
ed
Priority vulnerability toolbar. Possible priorities include Low, Medium and High. Default:
Medium.
rv
Severity of the vulnerability. Automatically assigned by SecureSphere using CVE scoring.
se
Severity Possible severities include Low, Medium and High.
Tracking Whether the vulnerability is new or assigned, been accepted or rejected
re
Creation Date Date the vulnerability was initially detected.
Updated Date some aspect of the vulnerability was last updated, for example status or tracking.
s
Date vulnerability management is due to be completed.
ht
Due Date
Number of times this vulnerability was observed. Identical vulnerabilities in
ig
# SecureSphere are aggregated into a single vulnerability in the Vulnerabilities window. For
lr
more information regarding Vulnerability aggregation, see Vulnerability Aggregation.
Asset The server on which the vulnerability was discovered.
Al
Table 10-1 - Vulnerability List Columns
c.
Vulnerability Details
In
Overview:
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-9 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
Recommended Fix:
.
ed
Figure 10-10 - Vulnerability Details – Recommended Fix
rv
Activity Log:
se
re
s
ht
ig
lr
Figure 10-11 - Vulnerability Details - Activity Log
Al
Vulnerability status changes are tracked by SecureSphere and can be viewed in the Activity Log as well as in
c.
vulnerability reports.
In
Advanced:
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-10 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
Details on the vulnerability observation dates and assigned keywords are available on the Advanced tab.
Vulnerability Mitigation
Vulnerability mitigation is performed using the icons across the top of the Vulnerabilities Workbench.
.
ed
rv
se
Figure 10-13 - Vulnerability Management Buttons
re
Vulnerability Management Buttons
s
Icon Description
ht
Manual Status Indication.
Values: Opened, Closed, Excluded
ig
Deletes the Vulnerability
Assign a priority to the vulnerability
lr
Al
Assign the vulnerability to a SecureSphere User
Mitigate the vulnerability
c.
Options:
In
affected system.
Provides management workflow tracking.
rv
Adds a comment to the vulnerability management history. Comments are visible under the
vulnerability Activity Log tab as well as in reports.
17
Mitigation Methods
©
Create Mitigation:
© 2017 Imperva, Inc. All rights reserved 10-11 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Figure 10-14 - Create Mitigation Window
re
Immediate Action Options:
s
• Block
ht
• None
ig
Mitigating a vulnerability through SecureSphere creates a mitigation security policy that is able to block client traffic
lr
that could exploit the vulnerability. For the Mitigation Policy to protect the application vulnerability the Immediate
Action must be Block and the Server Group must be in Active mode. However, in some environments it may be
Al
appropriate to create the mitigation policy with an action of None to be certain the policy will not generate false
positive events. After a short period of time, the policy Immediate Action can be set to block in order to protect the
c.
application vulnerability.
In
Once mitigated, the mitigation policies are visible in the Vulnerability Overview – Mitigation table. The mitigation
a,
© 2017 Imperva, Inc. All rights reserved 10-12 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
Mitigation Policies
Mitigation Policies can be seen from the Vulnerability Overview – Mitigation table. The link opens the Mitigation
Policy window.
.
ed
rv
Figure 10-16 - Vulnerability Mitigation Close-up
Mitigation Policies can also be accessed from Main > Security > Policies. Mitigation Policies can be quickly identified
se
by filtering.
re
s
ht
ig
lr
Al
c.
In
a,
rv
© 2017 Imperva, Inc. All rights reserved 10-13 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
Figure 10-18 - Example of Mitigation Policy
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-14 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
Questions
1. Will mitigating a vulnerability in SecureSphere protect the Web Application when the Server Group Mode is set
to Simulation?
2. What benefits are provided by importing vulnerability scan results into SecureSphere?
3. Describe a scenario that would be best to use Mitigation Policies to virtually patch a vulnerable web
application:
4. Describe a scenario that would be best to fix vulnerabilities on the application server instead of creating a
.
ed
virtual patch:
Exercises
rv
se
Prerequisite:
Important
re
Before beginning the exercises, refer to the steps detailed in the following class interactive sections.
s
1. Creating Web Scanner Integration Policy.
ht
ig
Exercise 1
lr
Following the lecture instructions, import the superveda_2010_appscan.xml vulnerability scan for the SuperVeda
Al
Web Application and review the vulnerabilities.
c.
Exercise 2
In
Locate a high severity vulnerability (score of 9 or higher) and mitigate the vulnerability.
Exercise 3
a,
Verify the Mitigation policy with the Mitigation Policy link and from Main > Policies > Security.
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-15 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
Answers to Questions
1. Will mitigating a vulnerability in SecureSphere protect the Web Application when the Server Group Mode is set
to Simulation?
A: No. The Mitigation Policy will identify the event but simulation mode prevents the gateway from interfering
with traffic directed to the relevant Web servers.
2. What benefits are provided by importing vulnerability scan results into SecureSphere?
A: The vulnerability management process can be tracked and reported on in SecureSphere. If a vulnerability
.
ed
will be difficult to fix, virtually patching with a Mitigation Policy can reduce the risk of an attack while the
vulnerability is addressed on the application server.
rv
3. Describe a scenario where it would be best to create a Mitigation Policy to virtually patch a vulnerable web
application:
se
A: Many scenarios apply. One example would be an organization that recently acquired another company and
a legacy web application riddled with vulnerabilities. Using virtual patching addresses all of the vulnerabilities
re
immediately and frees developers to focus on a fresh build of the application based on current company
standards. Without virtual patching, significant developer time would be spent on an application that may be
s
targeted for decommissioning.
ht
4. Describe a scenario that would be best to fix vulnerabilities on the application server instead of creating a
ig
virtual patch:
A1: Some Vulnerabilities identify issues that are not well protected by blocking access. A basic example of this
lr
would be a vulnerability identifying missing patches or updates to the web server. Knowing that a patch should
Al
be applied is not helpful at separating attacks or normal users. Blocking all traffic to a web server that has not
been patched clearly will not help. In such cases, it is best to fix the vulnerabilities directly.
c.
A2: Another possible example is in strict change control environments. In such cases, low severity
In
vulnerabilities may be best addressed directly by the web developers due to the overhead change control adds
to all activities. However, even in change control environments, some vulnerabilities may still be appropriate to
a,
Answers to Exercises
pe
Exercise 1
Im
Following the lecture instructions, import the superveda_2010_appscan.xml vulnerability scan for the SuperVeda
17
© 2017 Imperva, Inc. All rights reserved 10-16 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
4. Select \\vedafile\Imperva-lab-files\Tools-v11.5\Training Classes\scanner\superveda_2010_appscan.xml
5. Upload the file.
s
ht
ig
lr
Al
c.
7. Save and select Action > Run Now to being the vulnerability analysis process.
20
©
8. When the import process completes select Main > Risk Management > Risk Console.
© 2017 Imperva, Inc. All rights reserved 10-17 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
Exercise 2
s
ht
Locate a high severity vulnerability (score of 9 or higher) and mitigate the vulnerability.
ig
1. Select Main > Risk Management > Risk Console – Vulnerability Management Scope Selection.
lr
2. Locate and select Vulnerability with 9 or greater in the Severity column.
Al
c.
3. Note the URL in the vulnerability details window, Overview tab. In this example the URL is /getstates.jsp.
© 2017 Imperva, Inc. All rights reserved 10-18 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
4. Click the button and the Create Mitigation window will appear.
.
ed
Immediate Action: Block
Comment: Mitigating High Severity Vulnerabilities.
rv
se
re
s
ht
ig
lr
Al
6. Click OK.
c.
In
Exercise 3
a,
Verify the Mitigation policy with the Mitigation Policy Link and from Main > Policies > Security.
rv
1. Select Main > Risk Management > Risk Console – Vulnerability Management Scope Selection.
pe
© 2017 Imperva, Inc. All rights reserved 10-19 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
6. Review the created Policy settings.
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
7. Close the Policy Details window and select Main > Policies > Security.
©
© 2017 Imperva, Inc. All rights reserved 10-20 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
c. Click .
d. From the Policies List pane, review the mitigation policies.
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-21 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 10-22 Lesson 10: Web Scanner Integration
SecureSphere 12.0 Web Application Security Course Manual
Slide 1
.
Lesson 11:
ed
rv
SecureSphere Web Application Security 12.0
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
Slide 2
c.
In
a,
© 2017 Imperva, Inc. All rights reserved 11-1 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 3
.
ed
• Replacement for legacy reverse proxy appliances
• Header / content modification features
rv
– URL rewriting Data Center
se
– Cookie signing SecureSphere
– SSL termination
re
– Response rewriting (ARP only)
Switch
s
ht
SecureSphere
ig
lr • Reverse Proxy Deployment
Al
c.
A reverse-proxy is a "backwards" proxy-cache server; it is a proxy server that allows Internet users to
indirectly access certain internal servers. The reverse-proxy server is used as an intermediary by Internet
users who want to access an internal website, by sending it requests indirectly. With a reverse-proxy, the
a,
web server is protected from direct outside attacks, which increases the internal network's strength. A
rv
reverse-proxy's cache function can lower the workload of the server it is assigned to, and for this reason
is sometimes called a server accelerator. Finally, the reverse-proxy can distribute the workload by
pe
redirecting requests to other, similar servers; this process is called load balancing.
SecureSphere is often deployed as a direct replacement for legacy reverse proxy appliances. In most
Im
cases, customers choose to configure SecureSphere as a bridge because it fits into the existing
architecture and reduces the operational burden associated with Web proxies. However, in some cases,
customers deploy SecureSphere as in proxy mode to meet architectural requirements or for content
17
modification. Proxy configurations offer content modification, including cookie signing and URL rewriting.
20
©
© 2017 Imperva, Inc. All rights reserved 11-2 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 4
.
ed
– Transparent Reverse Proxy (TRP): mix of inline bridge with selective kernel reverse proxy
functionality.
– Kernel Reverse Proxy (KRP): Imperva’s reverse proxy using a higher-performance kernel
rv
inspection and packet manipulation.
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Note: The KRP modes is non-transparent. The Hybrid mode combines the best KRP performance
In
for general web traffic, plus ARP added inspection for specific traffic as configured by the
SecureSphere administrator.
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-3 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 5
• In bridge mode
.
ed
but functions
as reverse
rv
proxy
• Can be
se
used for all
Web servers
re
or selected
server
s
groups
ht
ig
lr
Al
c.
In Transparent Reverse Proxy mode, the client is unaware of the reverse proxy, and connects directly
In
to the server. The SecureSphere gateway is not visible to the client or to the server, which see each
others’ real IP addresses.
a,
The SecureSphere gateway is in bridge mode, but additionally functions as a reverse proxy for the
rv
servers specified in the SecureSphere web interface. All other traffic is still bridged. In this way, the same
SecureSphere gateway protecting many web and database server groups can act as a reverse proxy for
pe
some or all of the web server groups it protects, and as a bridge for the other server groups.
The client begins the session by sending packets to the server’s IP address (12.1.1.10). The
Im
SecureSphere gateway intercepts connections destined for the server, inspects them and forwards them
on to the server. The server sees the connections as coming from the client’s IP address (70.1.1.50) and
replies to that address. The return connection passes through the SecureSphere gateway, which inspects
17
© 2017 Imperva, Inc. All rights reserved 11-4 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 6
.
ed
• Clients connect to IP of SecureSphere Gateway
– Advantages:
rv
• SSL off loading
• Terminate SSL Sessions
se
• Reduce Web server load
• Cookie signing and encryption
re
• Protect web servers located in multiple subnets
s
ht
ig
lr
Al
c.
In non-Transparent Reverse Proxy modes, clients connect to the IP address of the SecureSphere
In
gateway, which acts as a reverse proxy for the web servers it protects. In contrast to transparent
deployments, in non-transparent deployments the SecureSphere gateway is visible to both client and
server, while the client and server are not directly visible to each other. The SecureSphere gateway does
a,
not act as a bridge; rather, the non-Transparent Reverse Proxy listens on the specified ports and ignores
rv
•the ability to protect web servers located in multiple subnets, not necessarily close to each other
or to the gateway
17
© 2017 Imperva, Inc. All rights reserved 11-5 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 7
.
ed
• Improved proxy functionality
– Improved Performance
rv
– Connection termination
– SSL termination
se
• From client’s view, server is SecureSphere gateway’s inbound IP
re
• From server’s view, client is the gateway’s outbound IP
s
ht
ig
lr
Al
c.
In a Kernel Reverse Proxy deployment, the client begins the session by sending packets to the
In
SecureSphere gateway’s inbound IP address. The SecureSphere gateway inspects the packets and, based
on the rules, opens a second connection to the server, changing the packet’s source IP address to the
SecureSphere gateway’s outbound IP address and the destination IP address to the real IP address of the
a,
server. The server sends the return packets to the SecureSphere gateway, which inspects the packets
rv
and forwards them to the client, changing the source IP address to the SecureSphere gateway’s inbound
IP addresses, and the destination IP address to that of the client. From the client’s point of view, the
pe
server is the SecureSphere gateway’s inbound IP address. From the server’s point-of-view, the client is
the gateway’s outbound IP address.
Im
A “one arm” Kernel Reverse Proxy deployment is one where the inbound and outbound interfaces
are the same. This configuration simplifies routing.
17
© 2017 Imperva, Inc. All rights reserved 11-6 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 8
• If the gateway is not already in bridge mode, then in impcfg, configure the
.
ed
gateway as a bridge.
• In the SecureSphere web interface, go to Main > Setup > Sites.
rv
• In the Sites Tree pane, select a server group and then a Web service.
se
• In the HTTP Service pane, in the Transparent Reverse Proxy section of the
Reverse Proxy tab, select Enable Transparent Reverse Proxy.
re
• Next, create a decision rule which defines how to handle incoming Web traffic
by clicking the Create New icon to the right of the words Server IP.
s
• Enter the parameters (listed below).
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Parameter Definitions:
In
Server IP - The IP address of the Web server for which this SecureSphere gateway acts as a
Transparent Reverse Proxy.
a,
Ports - A comma-separated list of port numbers on which the Transparent Reverse Proxy listens.
Certificate Select the certificate which SecureSphere should present to the client from the list of
rv
the certificates uploaded for the gateway. For more information, see Adding SSL Keys on page
pe
80.
Server Side Port - The port on the Web server to which to direct Web traffic.
Im
Notes:
• All traffic not directed to one of the specified Ports on Server IP address is bridged and
20
inspected according to the server group, service and application applied rules.
• In the event of a conflict between a Transparent Reverse Proxy rule and another service’s
port configuration, the Transparent Reverse Proxy rule takes precedence.
©
• Ignore IP Group and Limit monitoring to IP group are ignored for Reverse Proxy.
Slide 9
© 2017 Imperva, Inc. All rights reserved 11-7 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
.
• Configure the Gateway:
ed
– Configure External and Internal IP addresses on the Gateway
– Configure Alias on Gateway – (mapping of external & internal IP addresses)
rv
• Configure the Sites Tree:
se
– Do not assign protected IP address
– Create new entry in Reverse Proxy table
re
• Enter the Decision Rule parameters (listed below).
– Expand the Reverse Proxy Entry and create a Reverse Proxy Decision rule.
• Enter the Decision Rule parameters (listed below).
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
Aliases:
An alias represents the inbound IP address and the outbound IP address for the KRP. Since networks tend to be
c.
dynamic, IP address allocation may change from time to time. Aliases eliminate the need to configure changes in
two places (on the Gateway and on the Management Server). For multiple end points (servers), you can use port
In
mapping (one Gateway IP address with multiple ports). Alternatively, use an alias representing a Reverse Proxy IP
address per server so that whenever an alias is addressed, the communication will be forwarded to the
a,
corresponding server.
rv
Note:
pe
• For information on how to configure aliases and routing for KRP, see the "Gateways" chapter in the
SecureSphere Administration Guide.
Im
If the Kernel Reverse Proxy listens on more than one port, and they are all encrypted or all not encrypted, then you
can enter a comma-separated list of the ports. Otherwise, you must define a separate row for each port. You can
20
use the same Gateway IP Alias name for more than one port.
Server Certificate - Select the certificate which SecureSphere should present to the client from the list of the
certificates uploaded for the gateway.
©
Client Authentication Authorities - Select a Certificate Authority Group to associate with this web server. In order
you do this, you need to have imported Public Certificate Authority certificates and assigned them in a Certificate
Authority Group.
Report forwarded client IP in HTTP header - If selected, traffic forwarded to the Web server will include the client
IP address in the header specified in Header Name. If not selected, the Web server will see this Reverse Proxy as
the client.
© 2017 Imperva, Inc. All rights reserved 11-8 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Note:
• Connections that do not match the specified parameters are ignored by the Gateway.
• For more information regarding Server Certificates, see Adding SSL Keys in the Web Security User Guide.
• For more information regarding Client Authentication Authorities, see Associating Client Certificate Validation in the
Web Security User Guide.
.
ed
avoid ambiguity in the order of their application. Also, it is recommended that you assign priorities in multiples of
ten, that is, 10, 20, 30 and so on, so that you can insert additional decision rules between the original decision rules
at a later date, if required.
rv
External Hostname - Specify the host name for which this rule will be applied, or select Any for all hosts.
Note: This field is understood by SecureSphere as a regular expression. So to specify "www.site.com" you should
se
enter "www\.site\.com". "www\.site\.(org|co)\.uk" means "www.site.co.uk" or "www.site.org.uk". Wildcards (for
example, "*" and "?") cannot be used in this field.
re
URL prefix - Specify the prefix of URLs (for example, /login/) for which traffic is to be directed to Server IP, or select
Any for all URLs.
s
Internal IP / Hostname - The IP address or the hostname of the Web server to which traffic that meets the Host
ht
and URL prefix conditions is forwarded. If you specify the hostname you must configure the DNS service on the
Gateway (see Name Resolution).
ig
Server port - The port number on the Web server to which traffic that meets the Host and URL prefix conditions is
forwarded. lr
Encrypt - Select Encrypt to encrypt the connection between the SecureSphere gateway and the backend (the real)
Web server.
Al
Client Authentication Rules - When working with client certificate authentication, select the Client Authentication
Rules that determine the course of action taken when certificate validation succeeds or fails.
c.
Notes:
In
• For more information regarding Regular Expressions, see Regular Expressions in the Web Security User Guide.
• For more information regarding Client Authentication Rules, see Configuring Client Authentication Rules in the Web
a,
© 2017 Imperva, Inc. All rights reserved 11-9 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 10
.
ed
• On Gateway Details Click IP Addresses
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Slide 11
In
a,
11
© 2017 Imperva, Inc. All rights reserved 11-10 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 12
• The Alias defines the relation between the External and Internal IP addresses.
.
ed
rv
se
re
s
ht
ig
12
lr
Al
c.
Slide 13
In
a,
© 2017 Imperva, Inc. All rights reserved 11-11 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 14
.
ed
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Slide 15
In
a,
• After Configuring KRP on the Service Object, the settings are summarized on
the Server Group > Definitions tab.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-12 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 16
.
ed
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-13 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 17
URL Rewrite
.
• Redirect Web traffic to another server
ed
• Uses
rv
• Web site name change
• Hide web servers and site structure
se
re
s
ht
ig
lr
Al
c.
URL Rewrite
SecureSphere’s URL Rewrite feature can be used in two situations:
In
• To rewrite host name and/or path in web traffic URLs and headers. In this case the web client is
unaware that the traffic is being diverted.
a,
• To redirect web traffic to another server. In this case, response code 302 is sent to the web client,
which then accesses the new URL in a new request.
rv
With URL rewrite, the web client remains unaware of the redirection. This feature can be used for several
pe
© 2017 Imperva, Inc. All rights reserved 11-14 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 18
.
ed
– Create URL Rewrite Group, Add URL Rewrite Rules
rv
se
• Applied in Main > Setup > Sites
re
– Sites Tree > HTTP Service object > Reverse Proxy tab
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
The SecureSphere administrator defines URL Rewrite rules that define how to rewrite or redirect
In
responses and/or requests. URL Rewrite rules are organized in groups, and these groups are applied to
web services.
a,
Rules in a group are evaluated sequentially in order of their priorities. All matching rules are applied, but
rv
there is significance to priorities because each rule operates on the output of the previously applied rule.
pe
Rule 20 does not hide Rule 30. Rule 30 is applied to Rule 20’s output, if it matches. So www.X.com/forms
would become www.Z.com.
17
If more than one URL Rewrite Group is applied to a web service, then the highest priority rules among all
20
the groups are applied first, followed by the second highest priority rules among the groups, and so on.
©
© 2017 Imperva, Inc. All rights reserved 11-15 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 19
.
ed
– URL Rewrite Group
rv
se
re
s
ht
ig
lr
Al
c.
Rewrite rules come in pairs, one rule for incoming traffic and an inverse rule for outgoing traffic so that
In
In the Create URL Rewrite Rule window, enter the following data:
a,
Rules in a group are evaluated sequentially in order of their priorities. All matching rules are
applied, but there is significance to priorities because each rule operates on the output of the
previously applied rule.
Im
Tip: It is highly recommended to assign different priorities to each rule in the group, in order to
avoid ambiguity in the order of their application. Also, it is recommended that you assign
priorities in multiples of ten, that is, 10, 20, 30 and so on, so that you can insert additional rules
17
Note: In the Path, you can specify a regular expression. So to match “default”, write “default$”,
otherwise “default/xxx” will also be matched.
Replace with: Enter Host and Path strings with which to replace the Host and Path under Find what.
©
© 2017 Imperva, Inc. All rights reserved 11-16 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Note: Whether the rule is a Replace or Redirect rule, always specify the protocol below Redirection.
You can leave the connection as the original protocol or force HTTP or HTTPS as needed. For example,
financial institutions may want to ensure the connections are forced to HTTPS protocol.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-17 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 20
URL Redirection
• Intercepts Web client requests and returns a 302 response, redirecting the
.
ed
Web client to another URL
• Uses
rv
• Web site reorganized
se
• Force clients to use https
re
s
ht
ig
lr
Al
c.
With URL redirection, when the SecureSphere gateway is configured in Reverse Proxy mode, intercepts
In
Web client requests and returns a 302 response, redirecting the Web client to another URL.
• When a Web site has been reorganized, but Web users may still be accessing the now obsolete URLs
rv
• When Web site administrators want to force Web clients to use HTTPS, even if they access a HTTP URL
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-18 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 21
.
ed
in the same way
• Only single parameter being different
rv
se
re
s
ht
ig
lr
Al
c.
Both URL Rewrite and URL Redirection are configured in the same way, with only a single parameter in
In
the Create URL Rewrite Rule window being different. Because URL Rewrite and URL Redirection intercept
and modify Web traffic, they are available only when the SecureSphere gateway is configured in the
Reverse Proxy modes.
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-19 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 22
.
ed
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-20 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 23
.
ed
rv
Certificate
se
re
s
SSL Tighter
Login
ht
Certificate Security
ig
lr
Al
c.
In
Two factor authentication (2FA) is a security process in which the user provides two means of
identification, one of which is typically a physical token, such as a card, and the other of which is typically
a,
something memorized, such as a security code. In this context, the two factors involved are sometimes
spoken of as something you have and something you know. According to proponents, two-factor
rv
authentication could drastically reduce the incidence of online identity theft, phishing expeditions, and
other online fraud, because the victim's password would no longer be enough to give a thief access to
pe
their information.
Im
Client authentication lets you authenticate users who are accessing the server by exchanging a client
certificate and entering a password. The client certificate is vouched for by either an external Certification
Authority (CA), such as VeriSign, or by you as an internal CA, so you can be assured that the person
17
© 2017 Imperva, Inc. All rights reserved 11-21 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 24
.
ed
• Configure global objects.
– Go to Main > Setup > Global Objects.
rv
– Certificate Authorities.
– CA Groups (optional).
se
– CRLs (optional).
– Client Certificate Parameter Set.
re
• Complete configuration on HTTP service object.
– Go to Main > Setup > Sites Tree > Server Group > HTTP Service
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
SecureSphere enables you to validate client certificates in Kernel Reverse Proxy mode, which
In
To configure client certificate validation, a number of objects need to be prepared. Once all the objects
a,
have been created, you complete configuration on the SecureSphere web service that is hosting the
rv
traffic you want to validate. Global objects that may need to be configured include:
Certificate Authorities
pe
CA Group
Certificate Revocation Lists (CRLs)
Client Certificate Parameter Set
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-22 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 25
ClientHello
.
ServerHello
ed
Certificate
CertificateRequest
rv
ServerhelloDone
se
Certificate
ClientKeyExchange
User
re
CertificateVerify SecureSphere
ChangeCipherSpec
s
Finished (encrypted)
ht
ChangeCipherSpec
Finished (encrypted)
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
• Client Hello. The client initiates a session by sending a Client Hello message to the server. The
Client Hello message contains: Version Number, Randomly Generated Data, Session Identification (if
any), Cipher Suite, Compression Algorithm
a,
rv
includes: Version Number, Randomly Generated Data, Session Identification (if any), Cipher Suite,
Compression Algorithm
• Server Certificate. The server sends its certificate to the client. The server certificate contains the
Im
server’s public key. The client will use this key to authenticate the server and to encrypt the
premaster secret. The client also checks the name of the server in the certificate to verify that it
matches the name the client used to connect. If the user typed www.contoso.com as the URL in the
17
• Server Key Exchange. This is an optional step in which the server creates and sends a temporary
key to the client. This key can be used by the client to encrypt the Client Key Exchange message
later in the process. The step is only required when the public key algorithm does not provide the
©
key material necessary to encrypt the Client Key Exchange message, such as when the server’s
certificate does not contain a public key.
• Client Certificate Request. This is an optional step in which the server requests authentication of
the client. This step might be used for Web sites (such as a banking Web site) where the server must
confirm the identity of the client before providing sensitive information.
• Server Hello Done. This message indicates that the server is finished and awaiting a response from
the client
© 2017 Imperva, Inc. All rights reserved 11-23 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
.
the authenticity of the server. Only the server with the private key that matches the public key in the
ed
certificate can decrypt this data and continue the protocol negotiation. This message will also include
the protocol version. The server will verify that it matches the original value sent in the client hello
rv
message. This measure guards against rollback attacks. Rollback attacks work by manipulating the
message in order to cause the server and the client to use a less secure, earlier version of the
se
protocol.
• Certificate Verify. This message is sent only if the client previously sent a Client Certificate message.
re
The client is authenticated by using its private key to sign a hash of all the messages up to this point.
The recipient verifies the signature using the public key of the signer, thus ensuring it was signed with
s
the client’s private key.
• Change Cipher Spec. This message notifies the server that all messages that follow the Client
ht
Finished message will be encrypted using the keys and algorithms just negotiated.
ig
• Client Finished. This message is a hash of the entire conversation to provide further authentication
of the client. This message is the first message that the record layer encrypts and hashes.
• Server Finished Message. This message is a hash of the entire exchange to this point using the
session key and the MAC secret. If the client is able to successfully decrypt this message and validate
In
the contained hashes, it is assured that the SSL/TLS handshake was successful, and the keys
computed on the client machine match those computed on the server.
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-24 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 26
.
ed
X-Client-Cert: FAIL
rv
Failure: Block
se
Failure: Block & Send Error Page
X-Client-Cert: PASS
User SecureSphere
re
Data Center
s
• Failure = Missing, Invalid or Expired certificate
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
In
The alert sub-protocol is a component of the Handshake protocol that includes event-driven alert
messages that can be sent from either party. Following an alert message the session is either ended or
rv
the recipient is given the choice of whether or not to end the session. The alerts are defined in the TLS
specification in RFC 2246, located at https://www.ietf.org/rfc/rfc2246.txt.
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-25 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 27
.
ed
• Enable Client Certificate Validation in User Tracking
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
In
Enable Client Certificate Validation in User Tracking by selecting the Client Certificate check box. This
a,
enables the import of certificates from a certificate authority (such as Verisign), which are then used for
validation.
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-26 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 28
.
ed
authority
• Create Certificate Authorities Global object
rv
• Add certificates
se
re
• Upload PEM file
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
In
Certificate Authorities enable users to download certificates containing a public key from valid certificate
authorities and then use this public key to validate traffic. The first step in this process is downloading
rv
the required public keys into the Certificate Authorities global object.
pe
From the Setup > Global Objects window, select Certificate Authorities > Certificate Authorities.
Click the plus icon to add a new CA certificate. The upload new certificate window is displayed. Click
17
browse and navigate to the location where you downloaded the relevant certificates. Click Upload.
Note: SecureSphere supports the .pem (privacy enhanced mail) certificate format. The PEM format is the
20
most common format that Certificate Authorities issue certificates in. PEM certificates usually have
extensions such as .pem, .crt, .cer, and .key.
©
© 2017 Imperva, Inc. All rights reserved 11-27 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 29
.
ed
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
If you want to overwrite an existing certificate, select the Overwrite Existing Certificate From Same Issuer
In
© 2017 Imperva, Inc. All rights reserved 11-28 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 30
– Lists of certificates that have been revoked which are used to check the validity of a
.
certificate
ed
– Go to Main > Setup > Global Objects.
– Scope Selection > Certificate Authorities.
rv
– Globals Tree > Certificate Revocation Lists.
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Certificate Revocation Lists (CRL) are lists of certificates that have been revoked which are used to check
the validity of a certificate. SecureSphere allows you to download CRLs from Certificate Authorities in the
form of .crl files, which are then used by SecureSphere during the process of validation.
a,
rv
• From the Setup > Global Objects window select Certificate Authorities > Certificate Revocation Lists.
Existing Certificate Revocation Lists are displayed.
• In the heading of the Details pane, click New. The Upload New CRL window opens.
Im
© 2017 Imperva, Inc. All rights reserved 11-29 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 31
.
ed
• Go to Main > Setup > Global Objects.
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Note: CRLs contain a list of revoked certificates associated with a certificate authority. If no certificate
In
© 2017 Imperva, Inc. All rights reserved 11-30 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 32
.
ed
• Create CA Group if your application accepts traffic from more than one CA.
rv
se
re
• Groups security certificates together which then can be selected via Reverse
Proxy settings.
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
CA Group
In
If your application accepts traffic from more than one CA, you can add these certificates to a certificate
group. This object groups a number of security certificates together which then can be selected in a Web
service’s Reverse Proxy settings.
a,
rv
If you configure more than one Certificate Authority, you can group them for use in a Certificate
Authority Group. Certificate Authorities Groups enable you to group related certificates to be used in a
pe
specific environment. Once group has been configured, you associate it with a Web Service under its
Reverse Proxy settings.
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-31 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 33
Creating CA Groups
.
ed
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
• From the Setup > Global Objects window select Certificate Authorities > Certificate Authority Groups.
Existing Certificate Authority Groups are displayed.
• From the upper right-hand corner of the Globals pane, click New. The Create Certificate Authority
a,
• Move the desired certificates to the Group Members pane by clicking the right arrow.
Note: Certificate Authority Public Certificates are assigned to the default group if no groups are manually
Im
configured.
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-32 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 34
.
ed
has succeeded and failed.
• When successful, determines information passed on to web server.
rv
• Go to Main > Setup > Global Objects.
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
A Client Authentication Rule determines various factors regarding how SecureSphere will handle traffic
when a certificate validation has succeeded, and failed. And when successful, determines what
information is passed on to the web server.
a,
rv
• Type a Name for the client authentication rule, then click Create. The new rule is created and its
options are displayed. Select the action to be taken On Failure. Options include:
Block: Blocks the connection
17
Block and Send Error Page: Blocks the connection and displays the selected error page to users.
Select an error page to use by clicking the dropdown list, or create a new one by clicking the edit
20
button
Don’t Block and send in header: Does not block the connection and sends the configured information
in the header. Select an item to be sent in the header On Success. Options include:
©
Nothing: Doesn’t send anything to the web server if authentication was successful.
Subject CN: Sends the Common Name (CN) in the subject field to the web server.
Subject Email: Sends the e-mail of the in the subject field to the web server.
Entire Certificate: Sends the entire certificate to the web server.
• If required, modify HTTP Header Name: by default, the HTTP Header name is: X-Client-Cert.
• Click Save. You can now use the Client Authentication Rule to configure client certificate validation.
© 2017 Imperva, Inc. All rights reserved 11-33 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 35
.
ed
• Select CA Group.
• Select Client Authentication Rules.
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
CONFIDENTI
c.
Once all the required global objects containing information regarding Certificate Authorities, Client
Authentication Rules, and if relevant Certificate Revocation lists have been configured, you need to
associate them with the desired web service in order to activate client certificate validation.
a,
Notes:
rv
connection for the rule always requires the client to present a certificate.
• Configure the Certificate Authority, Certificate Authority Group, Certificate Revocation List (if desired),
and Client Authentication Rules global objects
• Configure the desired web service for Reverse Proxy support.
17
• In the Go to Main workspace, select Setup > Sites. The Sites window appears.
• In the Sites window, select Server Group, and Web Service you want to configure to support client
20
Authenticating Authorities, select the Client Authority Group you previously configured.
• If you are assigning priority, under Client Authentication Rules, select the Rules you previously
created.
• Click Save.
© 2017 Imperva, Inc. All rights reserved 11-34 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 36
IP Ignore on XFF
.
ed
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Slide 37
In
a,
What is XFF?
rv
pe
© 2017 Imperva, Inc. All rights reserved 11-35 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 38
Handling XFF
.
ed
• Re-evaluate source IP rules after parsing XFF header
• Delaying packets is done only in required cases
rv
• Address identified as the source IP is first client that appears after one or
se
more proxies
re
s
ht
ig
lr
Al
c.
Slide 39
In
a,
© 2017 Imperva, Inc. All rights reserved 11-36 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
Slide 40
Questions?
.
ed
rv
se
re
s
ht
ig
© 2017 Imperva, Inc. All rights reserved.
lr
Al
c.
Slide 41
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved 11-37 Lesson 11: Reverse Proxy
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Objectives
rv
• Become familiar with the presentation of the training materials.
se
• Learn to use the Imperva training portal to find supplemental course materials.
• Become familiar with the lab environment, topology, and user accounts.
re
• Become familiar with the SecureSphere Web UI’s major components and navigating the Web UI.
• Learn how to use SecureSphere’s Basic, Advanced, and Quick Filters in the Web UI.
s
• Become familiar with setting Criteria in Policies.
ht
Presentation of Training Materials
ig
lr
The order in which information is presented throughout the Courseware is modeled after an enterprise workflow
that incorporates a separation of duties between System Administrators and Security Administrators.
Al
With this workflow, System Administrators are responsible for tasks such as configuring and maintaining the
c.
SecureSphere Operating System, ensuring proper network connectivity and monitoring, and building objects that
In
require accounts to external systems, such as Windows Domain objects, to which a Security Administrator may not
have access.
a,
Once SecureSphere is initially built and configured, the System Administrator continues to monitor and ensure the
rv
availability of the SecureSphere appliances while Security Administrators become the primary users, creating
policies, monitoring and securing traffic to protected applications, and generating reports for business owners.
pe
The SecureSphere Administration Course corresponds to the System Administrator role, and the Web Application
Im
Security and Database Security and Compliance Courses primarily correspond to the Security Administrator role;
however, Security Administrators also need to know many of the topics covered in the Administration Course.
17
Supplemental Videos
20
Occasionally, the training materials refer to Supplemental Videos that further illustrate a concept or process
described in the Course Manual. Where supplemental videos are available, they are marked with the movie reel
©
image in the left margin, and a caption in the format Video ch#--video # - Title of Video, as shown here:
Video 0-1 – Example of Supplemental Video Nomenclature
Students can find these videos in the LMS system and watch them at their convenience.
1. Enter http://www.imperva.com/login into your Web browser and select the Log In link.
© 2017 Imperva, Inc. All rights reserved A-1 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
2. Sign in to either the Customer or Partner Portal.
se
a. If you are an Imperva customer, enter your username and password into fields below the
Customer Support Portal portion of the page. Click the Log In button.
re
b. If you are an Imperva partner, enter your username and password into fields below the Partner
Portal portion of the page. Click the Log In button.
s
3. If you experience trouble signing into the site, please contact [email protected].
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
© 2017 Imperva, Inc. All rights reserved A-2 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
5. Find the class in which you are enrolled. Classes in which you have enrolled will appear in green. If you have
not yet registered or enrolled for class, please contact [email protected] if you need assistance or
instructions. You must be enrolled before accessing the documents.
.
ed
rv
se
re
s
ht
ig
7.
lr
On the details tab of the course, you will see links to lessons and lab materials associated with the course.
Al
Click the link to open the resource.
c.
In
a,
rv
pe
Im
17
20
©
8. Some resources may prompt for a password. Enter the password, SecureSphere120.
© 2017 Imperva, Inc. All rights reserved A-3 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
It is very important for students to complete the lab exercises at the end of a lesson. Hands-on implementation
rv
greatly enhances understanding and retention of the materials, and brings out nuances of the material and Web UI
that may not be expressly stated in the lecture material. Additionally, as the class progresses, many exercises
se
depend on successful completion of prior exercises.
re
The Cloud-Based Lab Environment
s
At the beginning of class, students receive an email that includes links to a speed test, connectivity checker, access
ht
troubleshooting guide, and their unique lab environment. Click the link to launch the lab environment. If you
experience problems accessing or using the environment, verify your network speed, and use the connectivity
ig
checker and troubleshooting guide as needed. If you are unable to successfully connect to your lab environment, let
the instructor know. lr
Al
After clicking the link to your lab environment, the browser displays the environment:
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved A-4 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
The page shows several sets of controls to pause or stop the VMs. During the class day, if your environment idles for
more than an hour, it will suspend. Use the Whole Environment controls at the top right of the page to start your
environment. You can also use these controls to suspend your environment, when you are done with it for the day.
17
If needed, you can use the checkboxes to select or un-select individual VMs, and use the Controls for Selected VMs
20
to suspend or reboot the selected VMs, or use the Controls for Individual VMs to work with a single VM.
©
Click the VM’s monitor icon to access it. After selecting a VM, the browser displays the VM, and a toolbar at the top
of the VM:
© 2017 Imperva, Inc. All rights reserved A-5 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
In your environment, select the Help icon (?) on the right side of the toolbar, to get detailed assistance with the
ed
controls. At the time of writing, the help button open this link: http://help.skytap.com/SmartClient_Help_Page.html,
which includes a link to get further details about the toolbar: http://help.skytap.com/VMClient.html#SRDC.
rv
se
Local Workstation Lab Environment
re
When participating in a training class that offers local VMWare Workstation VMs, the background image of the host
PC displays the network topology. When first using the host PC, start VMWare Workstation and each of the VMs.
s
To start VMWare Workstation, double-click the VMWare Workstation icon on the desktop.
ht
Once VMWare Workstation is started, start each VM listed in the Library. To start a VM:
ig
1. Click the VM in the Library. The VM’s tab opens.
2.
lr
In the VM’s tab, click Power on this virtual machine.
Al
c.
In
a,
rv
When powering on the Virtual Machines for the first time, VMWare Workstation asks whether the VMs were moved
or copied. For each VM, select the I moved it button:
pe
Im
17
20
©
Warning
When starting the virtual machines in VMWare Workstation, it is CRITICAL that you select I moved it. Selecting I
copied it will break the lab network.
© 2017 Imperva, Inc. All rights reserved A-6 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
When using VMWare Workstation, click the tab of the VM you wish to access, to select the VM.
To use one of the VMs, click in the display area of the VM. Clicking the display area of a VM captures the keyboard
and mouse input to that VM. Press CTRL + ALT to release the keyboard and mouse back to the host workstation.
.
ed
Start Your Lab Environment Now
rv
• If your class uses the cloud-based environment, click the link provided to start the lab environment.
se
• If your class uses the VMWare Workstation environment, launch VMWare Workstation and start all of the
lab machines now.
re
• If you need assistance, please ask the instructor.
s
Introduction to SuperVeda
ht
SuperVeda is a fictitious company and network environment that is used throughout the training materials. The
ig
word “Veda” is actually an acronym for: Vulnerable E-commerce Database Application. The next few sections
lr
introduce you to the network’s topology, application servers, and account credentials.
Al
SuperVeda Lab Topology
c.
© 2017 Imperva, Inc. All rights reserved A-7 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
Unless specified otherwise in the text, students connect to SecureSphere and the SuperVeda web application from
rv
The Veda DB server contains the back end database for the SuperVeda web application, and also runs an FTP server
and syslog server for use in the labs.
Im
The Veda File server is SuperVeda’s AD domain controller, DNS server (superveda.local domain), and file server.
17
Additionally, the firewall (shown at the top of the diagram) connects to the Internet, routes between the internal
networks, runs a secondary DNS server, and runs a mail server for the lab environment. The firewall is not student
20
accessible.
© 2017 Imperva, Inc. All rights reserved A-8 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
The SecureSphere MX, SecureSphere Gateway, and Veda Client all connect to a non-bridged management network,
along with an interface from the Firewall.
.
against attacks.
ed
To help understand the network topology, here is the network path when accessing the SuperVeda web site from
rv
the Veda Client system:
se
• On Veda Client, a browser initiates a connection to http://www.superveda.local.
• Packets travel from Veda Client to the Management NIC of the Firewall.
re
• The Firewall routes packets out it’s DMZ NIC to one interfaces of SecureSphere’s br0 bridge.
• SecureSphere’s br0 bridges the packet out it’s other interface to the Veda Web server.
s
• The SuperVeda Web application initiates a new connection to the Veda DB server.
ht
• Packets travel from Veda Web to one interface of SecureSphere’s br0 bridge.
ig
• SecureSphere’s br0 bridges the packet out it’s other interface to the Firewall’s DMZ NIC.
•
•
lr
The Firewall routes the packet out its Secure Network NIC to one interface of SecureSphere’s br1 bridge.
SecureSphere’s br1 bridges the packet it’s other interface to the Veda DB server.
Al
SuperVeda User Accounts
c.
The following table displays the user account credentials for the lab systems:
In
MsSQL Accounts
SuperVeda MsSQL DB admin sa sa12
Im
© 2017 Imperva, Inc. All rights reserved A-9 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
Note
SecureSphere has been hardened so that the root account can only login directly on the appliance’s console.
When connecting via SSH, login using the imperva_user account, then run the admin command to obtain root
.
privileges.
ed
rv
The SecureSphere Web User Interface
se
Administrators manage SecureSphere by accessing the MX’s Web User Interface (Web UI) from a web browser,
using the HTTPS protocol to connect to port 8083 of the MX’s IP address or hostname, for example:
re
https://192.168.51.200:8083 or https://vedamx.superveda.local:8083
s
After logging in, SecureSphere displays the Sites menu. The image on the next page shows the Sites menu and
ht
enumerates the major components of the SecureSphere Web UI. Details of the enumerated Web UI components
follow the image.
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
1. Workspaces
SecureSphere’s Web UI is organized into four Workspaces. The following table provides an overview of the
Workspaces:
Workspace Description
Main The primary Workspace, where users configure sites, policies and supporting objects to secure
applications and monitor alerts.
© 2017 Imperva, Inc. All rights reserved A-10 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
2. Tabs
.
ed
Workspaces are subdivided into Tabs which further categorize the components of the Workspace. In
Figure 5 above, the Setup Tab of the Main Workspace is selected.
rv
3. Menus
se
Tabs are subdivided into Menus which further categorize the components of the Tab. In Figure 5 above, the
Sites Menu of the Setup Tab is selected.
4. User drop-down menu
re
The User drop-down menu provides a short-cut to the User Details menu located in
the Preferences Workspace, and the option for the user to Log out.
s
ht
5. Action drop-down menu
ig
The Action drop-down menu provides context-sensitive actions for the selected
object. For example, when working within the Sites sub-menu, the available actions
lr
are to Export or Import. When a report is selected in the Reports menu, the action is
Run Report.
Al
6. Help Button
c.
The Help button launches SecureSphere’s online help. The online help contains
the content of SecureSphere’s user’s guides in an easily searchable format.
In
7. Object Pane
a,
As a general design principle throughout the Web UI, the left-hand window pane contains a list of objects
relevant to the current Tab and Menu.
rv
pe
In Figure 5 above, the Sites Tree, containing the Sites, Server Groups, Services, and Applications, displays in
the Object Pane, and the Unidentified – Servers SG server group is selected.
Im
In Figure 5 above, the Unidentified – Servers SG server group’s details display in the Object Details Pane,
and its Definitions Tab is selected.
©
Note
Some objects, such as objects in the Site Tree contain many configuration options. For such objects, the Details
Pane contains multiple Tabs to help organize all of the configuration options.
9. Save Button /
© 2017 Imperva, Inc. All rights reserved A-11 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
As a general design principle throughout the Web UI, when an editable object is selected, the Save button
appears in the top-right corner of the relevant window pane.
When changes are pending and a user attempts to navigate away from the current page in the web UI,
SecureSphere presents the following window to confirm the user’s intent:
.
ed
rv
Figure 0-5 - The Confirm Window
se
The following table lists how SecureSphere responds to each of the Confirm window’s options:
Option SecureSphere’s Response
re
Yes SecureSphere saves the pending changes to the MX’s database then continues to the web UI page
that the user selected.
No SecureSphere discards pending changes then continues to the web UI page that the user selected.
s
ht
Cancel SecureSphere maintains the changes in a pending state, and then returns the user to the original
web UI page.
ig
Table 0-3 -SecureSphere’s responses to the Confirm window options
lr
Navigating in the Web UI
Al
This training uses the following convention when providing directions to a location in the Web UI:
c.
For example, the instruction to navigate to the default Web UI page, the Sites Tree, is written as:
Select Main > Setup > Sites.
a,
rv
Note
20
For the Admin and Preferences Workspaces, there are no Tabs. These interface pages are identified by Workspace
> Menu. For example, Admin > Users & Permissions represents the Admin Workspace, Users & Permissions Menu.
©
© 2017 Imperva, Inc. All rights reserved A-12 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
Tip
re
Different user roles may benefit from setting different SecureSphere Web UI default pages. Consider your
s
organization’s roles and responsibilities and try to answer the following questions for your production
ht
environment. If needed, review the list in the Default Home Page drop-down menu when answering.
ig
What default page might an Auditor prefer? (Main workspace is assumed)
lr
What default page might the Security Operations team prefer?
Al
What default page might the SecureSphere project leader prefer?
Global Objects
c.
In
Global Objects are objects created once and maintained in a central location that are used globally with a number of
SecureSphere features. Global objects provide an additional level of granularity that assists in focusing on a specific
a,
set of IP addresses, or advanced functionality such as rules that guide the rewriting of URLs for use with load
balancers.
rv
Web server. You decided that traffic from a specific group of hosts in
internal-only company networks is not a threat (Pen-Test machines
Im
that need full access through SecureSphere to the end web server).
The traffic between these source IPs and the protected Web Server
does not need to be monitored.
17
you can later use this IP group when configuring a Server Group, to
tell SecureSphere to ignore traffic from this IP Group to the
protected server, reducing the number of false-positive alerts, and
©
© 2017 Imperva, Inc. All rights reserved A-13 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
Some configurations require multiple steps or have dependencies upon other objects. Throughout the Web UI the
Edit Object button provides a shortcut to simplify the process. In the image below, clicking the Edit Object
button opens the Windows Domain Global Objects, which can also be accessed by selecting Setup > Global Objects
and then setting the Scope to Windows Domains:
.
ed
rv
se
re
s
ht
Hanging Tabs
ig
In some menus, such as Monitor > Alerts, and Policies > Security, there are additional, vertical, Hanging Tabs on the
lr
left and right side of the web interface. The Hanging Tabs allow users to toggle between showing and hiding certain
window panes in the Web UI. When a window pane is hidden, it provides the user more space on the monitor to
Al
display the window pane(s) that are still visible.
The Main > Monitor > Alerts, Main > Monitor > Violations, and Main > Monitor > System Events Web UI pages have a
c.
Filter Pane on the left side, the Item List Pane in the middle, and the Details Pane on the right side. The Filter and
In
Details Panes can be toggled on or off by clicking Filter Hanging Tab (1), or Details Hanging Tab (2), respectively:
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved A-14 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
SecureSphere generates large amounts of alert data. Filtering the alerts helps to quickly find specific alert data of
interest. SecureSphere provides a Quick Filter, and the Basic and Advanced filters.
When viewing events (Main > Monitor > System Events) in your lab, most of the current events in the log will pertain
to updating Threat Radar and user logins and logouts, as shown in the following image:
.
ed
rv
se
re
s
ht
Figure 0-7 - The System Events log
ig
Use the navigation buttons lr
above the log to scroll through different pages of logs.
Optionally, enter a page number in the navigation area, and press Enter, instead of moving one page at a time.
Al
The lab does not have a significant amount of System Events; however, production environments generate
c.
thousands of events every day. Finding specific events by manually scrolling through the logs and viewing the
In
Messages column is inefficient. SecureSphere provides three different methods to filter the logs, to help find specific
logs: The Basic filter, the Advanced filter, and the Quick filter. The filters work similarly when viewing Violations and
a,
Alerts, though offering significantly more criteria, as violations and alerts log more complex conditions and
messages.
rv
The Basic Filter provides several categories of criteria, each containing several specific, individual criteria that toggle
Im
on and off to filter events. To apply a filter, expand the categories as to view the individual criteria, and check the
checkbox next to the criteria to enable it. Multiple criteria across multiple categories may be selected. System
17
Events that match all the selected criteria will display when the filter is applied.
20
Once all the desired criteria are set, at the bottom of the Basic Filter, click the Apply button to filter the System
Event logs according to the selected criteria. Click the Clear button to remove the filter and display all System
Events. Administrators can also save filters for quick recall and application at a future time. With the filter applied,
©
click the Save button and provide a name for the saved filter.
The image below shows a Basic Filter applied with the criteria High Severity and Config Subsystem selected. The By
Subsystem category is collapsed; however, the icon appears, indicating that the category contains selected
© 2017 Imperva, Inc. All rights reserved A-15 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
criteria. Additionally note the Subsystem and Severity columns in the log only display events that match both
selected criteria, High Severity and the Config Subsystem.
.
ed
rv
se
Figure 0-8 - The System Events log, with a Basic Filter applied
re
The Advanced Filter
s
When selecting criteria to build a Basic Filter, SecureSphere adds the criteria to the Advanced Filter. The Basic Filter
ht
is really the same filter as the Advanced Filter, but selections made in the Basic Filter are not as granular. In the
ig
Advanced Filter, search criteria are called Fields. Click the Advanced button at the bottom of the Basic
Filter to open the Advanced Filter. lr
Al
The image on the following page shows the Advanced Filter that is built when selecting criteria in the Basic Filter:
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved A-16 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
Figure 0-9 - The High-sev Config events filter, shown in the Advanced Filter window
In
The Advanced Filter contains a list of Enabled Fields and Available Fields. Use the Up and Down buttons to
move the fields between enabled and available lists. Use the Left and Right buttons to select and de-
a,
The following table describes the components of the Advanced Filter Fields:
pe
• Context-specific data, such as entering a date range in the Time Frame field
When selecting multiple values within a Field, the filter matches System Events when the event contains ANY of the
values entered in the Field (a logical OR operation between values). When building a filter with multiple Fields, the
filter matches System Events that match ALL Fields (a logical AND operation between fields).
© 2017 Imperva, Inc. All rights reserved A-17 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
For example, if an administrator wants to review Medium and High severity events, except items from the Config
subsystem, configure the Advanced Filter like the following image:
.
ed
rv
se
re
s
ht
ig
Figure 0-10 - An Advanced Filter with logic: (Severity = Medium OR High) AND (Subsystem != Config)
lr
You can save a filter before or after it is applied, by clicking the Save button at the bottom of the Edit Filter window.
Al
Note
c.
When you save filters, they are available to all SecureSphere users with permissions to user interface page where
In
the filter was created. As a best practice, Imperva recommends implementing a naming convention for saved
filters. For example, Team name – Filter name.
a,
Note
rv
The Basic and Advanced Filters are available throughout most of SecureSphere’s Web UI to help users find specific
pe
Alerts, Policies, Audit Data, Reports, etc. In each of SecureSphere’s menus, the Basic Filter provides context-
specific categories and the Advanced Filter provides context-specific Match Criteria; however, the filters are
configured and applied in the same manner described for filtering System Events.
Im
In the System Events Menu, the Quick Filter is located at the top of the System Events list.
20
©
Figure 0-11 - The Quick Filter, located above the System Events
© 2017 Imperva, Inc. All rights reserved A-18 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
Use the Quick Filter to perform simple, literal, text matching searches on the Message column by entering the text in
the Quick Filter and then pressing Enter, or clicking the Search button.
Tip
Many search engines allow user to specify exact phrases by enclosing them in quote marks, for example, “search
this exact phrase”. However, SecureSphere’s Quick Search performs these exact, literal searches by default. When
users enter a space or a quote mark in the Quick Search, SecureSphere looks for those to literally appear exactly
.
as entered in the Quick Search field, within the Message itself.
ed
To remove the filter, click the Remove Filter button. Either the standard Basic/Advanced Filter, or the Quick
rv
Filter is active; SecureSphere does not apply both filters at the same time.
se
Note
re
The Quick Filter is only present in some of SecureSphere’s menus.
s
ht
When using the Quick Filter from either the Alerts or Violations menus, you can also limit the Quick Filter to search
specific criteria, such as a Source IP or User. The following table shows the syntax to use for the criteria supported
ig
by the Quick Search:
Criteria
Number
Syntax
number:xyz
Description lr
Number assigned to the alert.
Al
Session ID session:xyz Session ID that generated the alert.
Source IP ip:w.x.y.z IP address that was the source of the generated alert
c.
Alert type type:xyz Type of alert: Firewall, Signature, Protocol, Correlation, Custom.
Server Group server group:xyz Any server groups configured in SecureSphere and to which the
a,
For example, if you want to see all alerts generated by IP address 192.168.51.31, enter ip:192.168.51.31 in the
Quick Filter text box, and click the Search button.
17
When working with SecureSphere’s policies of any type, the policy’s Available Match Criteria functionally equates to
the Available Fields in SecureSphere’s Advanced Filter, showing the list of Criteria that can be used in the policy. To
©
make any of the Criteria active, move the Criteria from Available Match Criteria up to Match Criteria, in the same
manner that you would move a Filter field from Available Fields up to Enabled Fields. The following image shows the
Alert Filter on the left, compared against policy Match Criteria on the right:
© 2017 Imperva, Inc. All rights reserved A-19 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
Figure 0-12 - Similarity of selecting Filter Fields and Policy Match Criteria
rv
When selecting multiple Match Criteria, the same logic applies as when selecting multiple Filter Fields. When
selecting multiple values within a Criteria, the Criteria matches when the data contains ANY of the values entered in
se
the Criteria (a logical OR operation between values). When building Match Criteria with multiple Criteria, the policy
matches data that matches ALL selected Match Criteria (a logical AND operation between fields).
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved A-20 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
Exercises
Exercise 1 – Login to the SecureSphere Web UI
In the SuperVeda lab environment, from the Veda Client VM, open Firefox (Click the Firefox icon in
Windows’ Taskbar). When Firefox opens, it connects to the MX’s Web UI by default.
Note
.
ed
If Firefox’s default home page was not set to the MX’s Web UI, you would manually enter one of the URLs:
https://192.168.51.200:8083 or https://vedamx.superveda.local:8083 to access the Web UI.
rv
se
In the lab environment, login now, using the admin credentials, user: admin; password: Impuser123.
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Users can set their default home page as desired. While setting up the site, the default Setup > Sites home page is
probably the best choice; however, perform the following steps in the lab environment to see additional choices:
17
20
1. Select Preferences > Preferences. (Click the Preferences Workspace, then click the Preferences Menu.)
2. In the Customize User Interface Settings section, click the Default Home Page drop-down menu and review
©
the list of possible default pages. After reviewing the list, leave the Default Home Page set to Sites.
© 2017 Imperva, Inc. All rights reserved A-21 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
Tip
lr
Al
Different user roles may benefit from setting different SecureSphere Web UI default pages. Consider your
organization’s roles and responsibilities and try to answer the following questions for your production
c.
environment. If needed, review the list in the Default Home Page drop-down menu when answering.
In
3. Set the Default Time Frame for Event Filtering (Days) to 365. This will be helpful for reviewing older, pre-
configured example alerts in the training environment.
Im
17
20
© 2017 Imperva, Inc. All rights reserved A-22 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
7. Click the Save button.
re
Note
s
ht
In the lab environment, traffic is not continually generated; instead the labs contain traffic that was generated at
the time of their development. In your production environment, if you do not set the Default Time Frame for
ig
Event Filtering (days) far enough back, you may not see the oldest alerts when just clicking the Alerts Menu.
lr
Al
Exercise 3 – Create an IP Group Global Object
Create an IP Group Global Object that contains SuperVeda’s networks. You will use this IP Group in later labs:
c.
3. Click the Create New button in the Globals Tree pane. The Create IP Group window opens.
© 2017 Imperva, Inc. All rights reserved A-23 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
The newly created IP Group is created and selected in the Globals Tree,
rv
pane, as shown to the right:
se
5. In the IP Group details pane, add 3 new rows to the table by clicking the Create New button3 times.
re
In the Type column for all rows, set the drop-down to Network.
s
6. Enter the Network (CIDR Notation) columns as follows:
192.168.51.0 / 24
ht
192.168.53.0 / 24
ig
192.168.54.0 / 24
lr
Al
c.
In
a,
Note
Im
The Create New and Delete buttons appear throughout SecureSphere’s Web UI. In general, when you’re
instructed to create or delete an object, or to add or remove a row from a table, use the Create or Delete buttons.
When deleting items, you must first select the item or row, then click the Delete button.
17
20
1. In the Basic Filter, Expand the By Severity category and select High.
2. Expand the By SubSystem category and select Config.
3. Click the Save button at the bottom of the filter.
4. When prompted, enter the name, High-sevb Config events.
© 2017 Imperva, Inc. All rights reserved A-24 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
Saved filters are stored in the Saved Filters tab, next to the Basic Filter tab. Click
the Saved Filter to apply it.
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved A-25 Appendix A: Lab Environment and Web UI
SecureSphere 12.0 Web Application Security Course Manual
.
ed
rv
se
re
s
ht
ig
lr
Al
c.
In
a,
rv
pe
Im
17
20
©
© 2017 Imperva, Inc. All rights reserved A-26 Appendix A: Lab Environment and Web UI