Guidelines for Web applications protection with dedicated Web Application Firewall



Similar documents
Where every interaction matters.

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

Mingyu Web Application Firewall (DAS- WAF) All transparent deployment for Web application gateway

Using Free Tools To Test Web Application Security

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Web Application Penetration Testing

Information Technology Policy

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

WHITE PAPER FORTIWEB WEB APPLICATION FIREWALL. Ensuring Compliance for PCI DSS 6.5 and 6.6

WHITE PAPER. FortiWeb Web Application Firewall Ensuring Compliance for PCI DSS 6.5 and 6.6

Sitefinity Security and Best Practices

How To Protect A Web Application From Attack From A Trusted Environment

Information Supplement: Requirement 6.6 Code Reviews and Application Firewalls Clarified

(WAPT) Web Application Penetration Testing

FortiWeb 5.0, Web Application Firewall Course #251

FINAL DoIT v.8 APPLICATION SECURITY PROCEDURE

Web Application Attacks and Countermeasures: Case Studies from Financial Systems

WEB ATTACKS AND COUNTERMEASURES

IJMIE Volume 2, Issue 9 ISSN:

Essential IT Security Testing

Barracuda Web Site Firewall Ensures PCI DSS Compliance

Web App Security Audit Services

White Paper Secure Reverse Proxy Server and Web Application Firewall

10 Things Every Web Application Firewall Should Provide Share this ebook

From Rivals to BFF: WAF & VA Unite OWASP The OWASP Foundation

STOPPING LAYER 7 ATTACKS with F5 ASM. Sven Müller Security Solution Architect

Check list for web developers

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

Web Application Security 101

Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

IndusGuard Web Application Firewall Test Drive User Registration

The New PCI Requirement: Application Firewall vs. Code Review

Penta Security 3rd Generation Web Application Firewall No Signature Required.

Are you fighting new threats with old weapons? Secure your Web applications with Web Application Firewalls.

Adobe Systems Incorporated

Web Application Vulnerability Testing with Nessus

Web Application Firewall (WAF) Guide. Web Application Firewall を 理 解 するための 手 引 き A Handbook to Understand Web Application Firewall

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

How to complete the Secure Internet Site Declaration (SISD) form

A Decision Maker s Guide to Securing an IT Infrastructure

Secure Web Development Teaching Modules 1. Security Testing. 1.1 Security Practices for Software Verification

Intrusion detection for web applications

Web Application Hacking (Penetration Testing) 5-day Hands-On Course

OWASP Top Ten Tools and Tactics

Arrow ECS University 2015 Radware Hybrid Cloud WAF Service. 9 Ottobre 2015

Semantic based Web Application Firewall (SWAF V 1.6) Operations and User Manual. Document Version 1.0

Web Application Attacks And WAF Evasion

NSFOCUS Web Application Firewall White Paper

How DataSunrise Helps to Comply with SOX, PCI DSS and HIPAA Requirements

Security+ Guide to Network Security Fundamentals, Fourth Edition. Chapter 6 Network Security

Hack Proof Your Webapps

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

Protect the data that drives our customers business. Data Security. Imperva s mission is simple:

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

Advanced Administration for Citrix NetScaler 9.0 Platinum Edition

Application Layer Encryption: Protecting against Application Logic and Session Theft Attacks. Whitepaper

Recommended Practice Case Study: Cross-Site Scripting. February 2007

PROFESSIONAL SECURITY SYSTEMS

Imperva s Response to Information Supplement to PCI DSS Requirement Section 6.6

Global Partner Management Notice

CS 558 Internet Systems and Technologies

Cloud Security:Threats & Mitgations

Web Application Security. Vulnerabilities, Weakness and Countermeasures. Massimo Cotelli CISSP. Secure

The Top Web Application Attacks: Are you vulnerable?

Rational AppScan & Ounce Products

ETHICAL HACKING APPLICATIO WIRELESS110 00NETWORK APPLICATION MOBILE MOBILE0001

CS 356 Lecture 17 and 18 Intrusion Detection. Spring 2013

Table of Contents. Page 2/13

SERENA SOFTWARE Serena Service Manager Security

Barracuda Web Application Firewall vs. Intrusion Prevention Systems (IPS) Whitepaper

Magento Security and Vulnerabilities. Roman Stepanov

Bug Report. Date: March 19, 2011 Reporter: Chris Jarabek

Importance of Web Application Firewall Technology for Protecting Web-based Resources

ICSA Labs Web Application Firewall Certification Testing Report Web Application Firewall - Version 2.1 (Corrected) Radware Inc. AppWall V5.6.4.

PCI-DSS and Application Security Achieving PCI DSS Compliance with Seeker

Testing Web Applications for SQL Injection Sam Shober

Implementation of Web Application Firewall

WEB APPLICATION FIREWALLS: DO WE NEED THEM?

What is Web Security? Motivation

For more information on SQL injection, please refer to the Visa Data Security Alert, SQL Injection Attacks, available at

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

Cross Site Scripting in Joomla Acajoom Component

TEST METHODOLOGY. Web Application Firewall. v6.2

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Web Application Security

STABLE & SECURE BANK lab writeup. Page 1 of 21

INDUSTRIAL CONTROL SYSTEMS CYBER SECURITY DEMONSTRATION

2. From a control perspective, the PRIMARY objective of classifying information assets is to:

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Codes of Connection for Devices Connected to Newcastle University ICT Network

Web Application Security. Radovan Gibala Senior Field Systems Engineer F5 Networks

Overview of the Penetration Test Implementation and Service. Peter Kanters

Citrix Access on SonicWALL SSL VPN

CS5008: Internet Computing

REAL-TIME WEB APPLICATION PROTECTION. AWF SERIES DATASHEET WEB APPLICATION FIREWALL

Acunetix Web Vulnerability Scanner. Getting Started. By Acunetix Ltd.

McAfee Web Gateway Administration Intel Security Education Services Administration Course Training

Web Application Firewall on SonicWALL SSL VPN

Transcription:

Guidelines for Web applications protection with dedicated Web Application Firewall Prepared by: dr inŝ. Mariusz Stawowski, CISSP Bartosz Kryński, Imperva Certified Security Engineer INTRODUCTION Security incident statistics and Web applications penetration tests prove that over 70% of Web applications around the world suffer from serious vulnerabilities which may compromise the company s data and reputation. Unsecure websites are commonly used by the criminals to distribute malware (so called drive-by download s). Most companies are unaware of this fact and fall victim to criminal and malware s. Web applications are developed mainly to fulfill the company s specific business requirements. Very often the developers have limited resources and time, as well as insufficient competencies in the field of IT security. The developers main focus is to fulfill the functional requirements of an application, not to ensure its security. As a consequence, deployed application might contain vulnerabilities. In such a case the application can be secured by implementing a dedicated security solution in the form of Web Application Firewall, as well as by employing a competent auditor 1 who can identify the application s vulnerabilities, which can be then corrected by the developer according to the audit results. These recommendations for Web applications have been included in the PCI DSS 2 standard, which underlines the necessity to implement Web Application Firewall protections. The following part of the study describes in detail the guidelines for protecting Web applications. WHY CONVENTIONAL SAFEGUARDS ARE INSUFFICIENT? Network firewalls and Intrusion Prevention Systems (IPS) are foundations for developing the network security architecture (among other the security zones), as well as preventing against numerous network s (e.g. exploits of the network services and operating systems, network worms distribution, etc.). In reality it is impossible to ensure the security of Web applications using the conventional firewall and IPS protections (including UTM). These methods deploy techniques based on the signatures (i.e. the s patterns). Web applications, which are usually developed on business request, contain unique vulnerabilities not known to the authors of IPS protections. For this reason they are unable to create adequate signatures. Moreover, other techniques used in conventional IPS solutions, such as heuristics and protocol anomaly detection are also ineffective for Web applications protection as most of the s are conducted in legitimate HTTP traffic. 1 More information about security audits performed by CLICO Professional Services is available at: http://www.clico.pl/services/clico_audit.pdf 2 PCI Data Security Standard (PCI DSS), security standard published by PCI Security Standards Council, more information available at: https://www.pcisecuritystandards.org

HOW DOES DEDICATED WEB APPLICATION FIREWALL WORK? An effective protection for Web applications is provided by Web Application Firewall (WAF), that is dedicated security solution. One of the most advanced WAF solutions is IMPERVA SecureSphere. The IMPERVA WAF is mainly based on the automatically created and updated profile of the protected Web application. WAF learns the application s structure, URLs, parameters, cookies, etc. The purpose for creating the profile is to define the expected and proper users activity as observed when a Web application is accessed. Figure 1 presents a fragment of the Web application profile managed by WAF. Figure 1. Web application protection profile built by IMPERVA WAF. Main difference between the IPS and WAF is the approach to the network traffic control. IPS uses the blacklist approach, accepting whole network traffic except the packets identified as illegitimate. As a consequence all s not identified by IPS reach the Web application. WAF uses the whitelist approach, accepting the network traffic identified as legitimate, based on the created Web application profile. Thus the traffic not identified as legitimate is blocked by WAF and s cannot reach the Web application. Selection of the adequate strategy for Web application protection is conditioned by specific requirements of the project (e.g. network and application structure, other deployed protections). IMPERVA SecureSphere WAF is deployed as a dedicated protection layer for Web application. In case of numerous business portals and other Web applications (e.g. e- commerce, e-banking) not only the Web application, but also the database require the same level of protection. IMPERVA SecureSphere WAF system is a single-platform solution providing complete WAF functionality as well as Database Firewall (DBF). All of the Web application and database safeguards are managed by a dedicated management system, provisioned with adequate monitoring and reporting tools. Figure 2 presents the structure of IMPERVA WAF deployment in such an architecture. 2

Figure 2. IMPERVA WAF as a dedicated protection layer for Web application. HOW IS WEB APPLICATION SECURED? In order to verify in details the effectiveness of IPS and WAF solutions in the scope Web application protection, the tests were carried out. Web application was targeted with s consisted of real exploits against existing application s vulnerabilities. The tests were performed on the IMPERVA WAF solution and an IPS solution from one of the world leading vendors (IPS tested with all available detection techniques and signatures activated). During the tests the Web application was targeted with the following s: 1. Simple Reflected XSS. 2. Reflected XSS with character encoding. 3. Simple Stored XSS. 4. Stored XSS with character encoding. 5. Simple SQL-Injection. 6. SQL-Injection with SQL query combination. 7. Web application cookie manipulation. 8. Forceful Browsing. 9. Information Leakage. 3

Test 1. Simple Reflected XSS -- XSS code is part of URL address (e.g. link sent in email or presented on Web page): http://192.168.53.90/dosearch.asp?string=<script>alert("test")</script> 1a. IPS reaction -- IPS detects script elements in URL parameter, detailed data is unavailable. 1b. WAF reaction -- WAF detects and displays illegitimate content and the size of parameter within URL Having access to accurate information about the, such as the name of authenticated user and other user information (e.g. obtained from Active Directory, LDAP, databases or Human Resources system), telephone number, department, etc. The company s security administrator can thoroughly analyze the incident. 4

-- WAF administrator can thoroughly analyze the underlying reasons for blocking a URL query. ---- violation of the size of the entry data, 5

---- violation of the type of the entry data, ---- identification of the using signatures, If required, WAF administrator can customize learned profile, either from the log console or within the profile itself. 6

Test 2. Reflected XSS with character encoding -- Using intercepting Proxy (e.g. Burp, Paros), XSS code is encoded within URL and inserted to the Web application. Note: The configuration of Burp Proxy is presented in appendix 1. 2a. IPS reaction -- Does not detect the. 2b. WAF reaction -- Detects the and displays used encoding. 7

Test 3. Simple Stored XSS -- First Name field in Web registration form is filled with XSS code <script>alert(document.cookie)</script> which is then displayed on each instance of the user authentication. 8

-- As the result, the users are prompted with the value of their Cookie immediately after logging on to the Web application. 3a. IPS reaction -- Does not detect the. 3b. WAF reaction -- WAF detects the violation of the value of the URL query. Note: Additionally WAF offers the functionality of concealing the client data, therefore user names, passwords, etc. can be masked within logs. 9

Test 4. Reflected XSS with character encoding -- The script (XSS code) is encoded as URL, and using intercepting Proxy (e.g. Burp, Paros) inserted in First Name field in Web application form: 4a. IPS reaction -- Does not detect the. 4b. WAF reaction -- Detects the and displays used encoding (as in the case of previous ) additionally pointing to other suspicious activities, such as using an unexpected http method (through an intercepting Proxy) and suspicious server response. 10

Test 5. Simple SQL-Injection -- SQL query ' OR ''=' is typed into the Web application logon field, granting unauthorized access to the application. 5a. IPS reaction -- IPS detects SQL-Injection within URL, detailed information on the is unavailable. 5b. WAF reaction -- Detects the and displays detailed information (as in the case of previous s). 11

Test 6. SQL-Injection with SQL query combination -- SQL query is provided in a modified form (e.g. ' OR 'a'='a, ' OR '1000'='1000, ' OR '1000'>'100, etc). 6a. IPS reaction -- Does not detect the. 6b. WAF reaction -- Detects the and displays detailed information (as in the case of previous s) utilizing many security policy rules. Test 7. Manipulation of the Web application cookie Response directed to the Web application is intercepted and the user role is modified. -- Using intercepting Proxy, Cookie value is modified from None to Discount. -- As a result, the user received an additional 10% discount. An application vulnerability could be analogically exploited if the application does not verify the values transmitted within the Discount parameter concealed from the browser. Using an intercepting proxy the intruder can replace the parameter value, so that he is granted the desired discounts. 12

7a. IPS reaction -- Does not detect the. 7b. WAF reaction -- Detects the Cookie Tampering and displays detailed information (as in the case of previous s). 13

Test 8. Forceful Browsing URL of the application configuration page /includes/config.inc.php.old is directly accessed without logging to the application. 8a. IPS reaction -- Does not detect the. 8b. WAF reaction -- Detects the and displays detailed information (as in the case of previous s). Test 9. Sensitive Information Leakage Credit card numbers are read from the database by employing an SQL Injection within the search field: ' UNION SELECT 1,1,CCNumber,'1',1,1,'1' from users where '%'=' Apart from the products the search results also list credit card numbers of all registered users. 9a. IPS reaction -- Does not detect the. 9b. WAF reaction -- WAF identifies credit card numbers using defined regular expressions, optionally enabling verification with the Luhn algorithm. 14

WAF detects the and displays detailed information (as in the case of previous s). Moreover, if WAF has been deployed in the reverse proxy mode it offers the ability to mask sensitive information. 15

The table below summarizes the results of basic tests of the effectiveness of IPS and WAF safeguards in the scope of Web application protection. No. Attack on Web application IPS 1. Simple Reflected XSS Attack detected as a script within URL parameter Detailed information about the is unavailable 2. Reflected XSS with character encoding 3. Simple Stored XSS Does not detect the 4. Stored XSS with character encoding WAF Detection of an violation of HTTP GET parameter value Provides detailed information about the Does not detect the Detection of an violation of HTTP GET 3 parameter value Provides detailed information about the, including used encoding Does not detect the. 5. Simple SQL-Injection SQL-Injection detected within URL Detailed information about the is unavailable 6. SQL-Injection with SQL query combination 7. Manipulation of the Web application cookie Does not detect the Does not detect the Detection of violation of HTTP POST query value Provides detailed information about the Detection of violation of HTTP POST query value Provides detailed information about the, including used encoding Detection of an violation of HTTP GET parameter value Provides detailed information about the Detection of an violation of HTTP GET parameter value Provides detailed information about the Detection of an violation of cookie value Provides detailed information about the 8. Forceful Browsing Does not detect the 9. Information Leakage Does not detect the Detection of the access to an unknown URL Identifies the and conceals sensitive data The s launched during the tests belong to the most popular, basic and easiest to perform. Web applications may be targeted by numerous other s which cannot be prevented by deploying conventional protections (FW, IPS, UTM). Such s include Cross Site Request Forgery (CSRF), unauthorized file and Web server access (file enumeration), cookie poisoning, manipulation of masked fields and others. 3 This and other Web s included in the table could have been detected by IPS, if appropriate signatures had been formatted corresponding to specific s. Writing such signatures would require information about the method used to perform the. Gathering such data is practically impossible as IPS vendors have no knowledge about existing vulnerabilities of Web applications developed for the companies. Neither do they know the ways in which the vulnerabilities could be exploited. Various methods can be employed to conduct XSS, SQL-Injection and other s. It is not possible to provide a set of IPS signatures covering them all. Therefore, by means of using so called universal signatures, IPS can detect only basic Web s. 16

Appendix 1. How to configure Burp Proxy Burp is a suite of tools (like intercepting proxy, spider, scanner, sequencer, repeater, encoder etc.), helpful in performing security testing of web applications. BurpSuite Free Edition can be downloaded from: http://portswigger.net/burp/downloadfree.html Burp Suite is a portable application, so there is no need to install it, to run we need to execute suite.bat file. To configure proxy communication port we need to go to proxy -> options tab, and verify if proxy listener port is correct. 17

In the next step we need to redirect browser (Internet Explorer, Firefox or other) to direct analized traffic through proxy. In case of Internet Explorer we need to get to Tools -> Internet Options - > Connections -> Lan Settings -> Proxy Server and turn on option Use a proxy server for your LAN. For this setting address and port should be left in default (127.0.0.1/loopback, port: 8080). From now on all communication between client browser and web application can be analized and modified by intercepting proxy. 18