AUTOMATED DISCOVERY OF PARAMETER POLLUTION VULNERABILITIES IN WEB APPLICATIONS Marco Balduzzi, Carmen Torrano Gimenez, Davide Balzarotti, and Engin Kirda,

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Closing the Gap: Analyzing the Limitations of Web Application Vulnerability Scanners David Shelly Randy Marchany Joseph Tront Virginia Polytechnic Institute.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
Bypassing Client-Side Protection CSE 591 – Security and Vulnerability Analysis Spring 2015 Adam Doupé Arizona State University
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
WebGoat & WebScarab “What is computer security for $1000 Alex?”
Attacking Session Management Juliette Lessing
A Crawler-based Study of Spyware on the Web Author: Alexander Moshchuk, Tanya Bragin, Steven D.Gribble, Henry M.Levy Presented At: NDSS, 2006 Prepared.
Chapter 12: Web Usage Mining - An introduction
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
Leveraging User Interactions for In-Depth Testing of Web Applications Sean McAllister, Engin Kirda, and Christopher Kruegel RAID ’08 1 Seoyeon Kang November.
Leveraging User Interactions for In-Depth Testing of Web Application Sean McAllister Secure System Lab, Technical University Vienna, Austria Engin Kirda.
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP does not maintain state. State Information can be passed using: HTTP Headers.
WEB SECURITY WORKSHOP TEXSAW 2013 Presented by Joshua Hammond Prepared by Scott Hand.
Presenter Deddie Tjahjono.  Introduction  Website Application Layer  Why Web Application Security  Web Apps Security Scanner  About  Feature  How.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
W3af LUCA ALEXANDRA ADELA – MISS 1. w3af  Web Application Attack and Audit Framework  Secures web applications by finding and exploiting web application.
CHAPTER 12 COOKIES AND SESSIONS. INTRO HTTP is a stateless technology Each page rendered by a browser is unrelated to other pages – even if they are from.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
Hamdi Yesilyurt, MA Student in MSDF & PhD-Public Affaris SQL Riji Jacob MS Student in Computer Science.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
Preventing SQL Injection Attacks in Stored Procedures Alex Hertz Chris Daiello CAP6135Dr. Cliff Zou University of Central Florida March 19, 2009.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
JavaScript, Fourth Edition
Optimizing Traditional and Advocating New Prevention Methods Mark Jenne Tatiana Alexenko Cross-Site-Request-Forgery.
Chapter 7 Web Content Mining Xxxxxx. Introduction Web-content mining techniques are used to discover useful information from content on the web – textual.
A Crawler-based Study of Spyware on the Web A.Moshchuk, T.Bragin, D.Gribble, M.Levy NDSS, 2006 * Presented by Justin Miller on 3/6/07.
©2008 Gotham Digital Science Secure Parameter Filter (SPF) (AKA Protecting Vulnerable Applications with IIS7) Justin Clarke, Andrew Carey Nairn.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
A Crawler-based Study of Spyware on the Web Authors: Alexander Moshchuk, Tanya Bragin, Steven D.Gribble, and Henry M. Levy University of Washington 13.
Cloak and Dagger: Dynamics of Web Search Cloaking David Y. Wang, Stefan Savage, and Geoffrey M. Voelker University of California, San Diego 左昌國 Seminar.
COMP3121 E-Commerce Technologies Richard Henson University of Worcester November 2011.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Analysis of SQL injection prevention using a filtering proxy server By: David Rowe Supervisor: Barry Irwin.
SEC835 Runtime authentication Secure session management Secure use of cryptomaterials.
1 Swaddler: An Approach for the Anomaly-based Detection of State Violations in Web Application Marco Cova, Davide Balzarotti, Viktoria Felmetsger, and.
Week 10-11c Attacks and Malware III. Remote Control Facility distinguishes a bot from a worm distinguishes a bot from a worm worm propagates itself and.
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
Unix Security Assessing vulnerabilities. Classifying vulnerability types Several models have been proposed to classify vulnerabilities in UNIX-type Oses.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Search Engine using Web Mining COMS E Web Enhanced Information Mgmt Prof. Gail Kaiser Presented By: Rupal Shah (UNI: rrs2146)
Xinyu Xing, Wei Meng, Dan Doozan, Georgia Institute of Technology Alex C. Snoeren, UC San Diego Nick Feamster, and Wenke Lee, Georgia Institute of Technology.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
Introduction of XSS:-- Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted.
By Collin Donaldson. Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you own. 2.You gain explicit,
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
1 UNIT 13 The World Wide Web. Introduction 2 Agenda The World Wide Web Search Engines Video Streaming 3.
1 UNIT 13 The World Wide Web. Introduction 2 The World Wide Web: ▫ Commonly referred to as WWW or the Web. ▫ Is a service on the Internet. It consists.
Heat-seeking Honeypots: Design and Experience John P. John, Fang Yu, Yinglian Xie, Arvind Krishnamurthy and Martin Abadi WWW 2011 Presented by Elias P.
Database and Cloud Security
Module: Software Engineering of Web Applications
TMG Client Protection 6NPS – Session 7.
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
Algorithms Problem: Write pseudocode for a program that keeps asking the user to input integers until the user enters zero, and then determines and outputs.
Cross-Site Request Forgeries: Exploitation and Prevention
Lecture 2 - SQL Injection
WEB SERVICES From Chapter 19, Distributed Systems
Recitation on AdFisher
Exploring DOM-Based Cross Site Attacks
Cross Site Request Forgery (CSRF)
Presentation transcript:

AUTOMATED DISCOVERY OF PARAMETER POLLUTION VULNERABILITIES IN WEB APPLICATIONS Marco Balduzzi, Carmen Torrano Gimenez, Davide Balzarotti, and Engin Kirda, NDSS (2011)

OUTLINE  Introduction  HTTP Parameter Pollution Attacks  Automated HPP Vulnerability Detection with PAPAS  Evaluation  Conclusion

Introduction  According to SANS, attacks against web applications constitute more than 60% of the total attack attempts observed on the Internet  HTTP Parameter Pollution (HPP)  HPP was first presented in 2009 at the OWASP conference

Introduction  HPP attacks consist of injecting encoded query string delimiters into other existing parameters  HPP attacks can potentially override existing hard coded HTTP parameters to modify the behavior of an application, bypass input validation checkpoints, and access and possibly exploit variables that may be out of direct reach

Introduction  The most effective means of discovering HPP vulnerabilities in web-sites is via manual inspection  PArameter Pollution Analysis System (PAPAS), uses a black-box scanning techniquePAPAS

HTTP Parameter Pollution Attacks  Even though injecting a new parameter can sometimes be enough to exploit an application, the attacker is usually more interested in overriding the value of an already existing parameter  Achieved by masking the old parameter by introducing a new one with the same name  It’s necessary for the web application to misbehave in the presence of duplicated parameters

Parameter Precedence in Web Applications  The HTTP protocol allows the user’s browser to transfer information inside the - URI itself (i.e., GET parameters) - HTTP headers (e.g., in the Cookie field - Request body (i.e., POST parameters)

Parameter Precedence in Web Applications  The term Query String is commonly used to refer to the part between the “?” and the end of the URI  The query string is passed unmodified to the application, and consists of one or more field=value pairs, separated by either an ampersand(&) or a semicolon(;) character

Parameter Precedence in Web Applications

 However, the problem arises when the developer expects to receive a single item and, invokes methods (such as getParameter in JSP) that only return a single value

Parameter Precedence in Web Applications

Parameter Pollution

HPP to bypass CSRF tokens  Use HPP attacks to bypass the protection mechanism used to prevent cross-site request forgery  Using a secret request token to protect web applications against CSRF attacks is a common technique  A HPP vulnerability can be used to inject parameters inside the existing links generated by the application (include a valid secret token)

HPP to bypass CSRF tokens  A CSRF bypassing attack using HPP was demonstrated in 2009 against Yahoo Mail demonstrated

Automated HPP Vulnerability Detection with PAPAS Fetching the web pages Rendering the content Extracting all the links and form URLs Communicates with the browser through a bidirectional channel Precedence Scanner Vulnerability Scanner

Browser and Crawler Components  Extracts the content, the list of links, and the forms in the page  Instrumented browser in PAPAS uses a number of simple heuristics to automatically fill forms  When inputs fail occur, the crawler can be assisted by manually logging into the application using the browser

P-Scan : Analysis of the Parameter Precedence  For URLs that contain several parameters, each one is analyzed until the page’s precedence has been determined or all available parameters have been tested  Step 1 : taking the first parameter of the URL (in the form par1=val1), and generates a new parameter value val2 that is similar to the existing one  Step 2 : the scanner asks the browser to generate two new requests

P-Scan : Analysis of the Parameter Precedence

 P-Scan component resolves the dynamic content problem in two stages  Step 1 : pre-processes the page and eliminate all dynamic content that does not depend on the values of the application parameters  Step 2 : removing all the URLs that reference the page itself

P-Scan : Analysis of the Parameter Precedence  Identity Test  Checks whether the parameter has any impact on the content of the page  If P0’ == P1’ == P2’, the parameter is considered to be ineffective

P-Scan : Analysis of the Parameter Precedence  Base Test  Based on the assumption that the dynamic components is perfectly remove from the page that is under analysis  If P1’ == P2’, the second (last) parameter has precedence over the first  If P2’ == P0’, the first parameter has precedence over the second

P-Scan : Analysis of the Parameter Precedence  Join Test  Checks the pages for indications that show that the two values of the homonym parameters are somehow combined together by the application

P-Scan : Analysis of the Parameter Precedence  Fuzzy Test  Cope with pages whose dynamic components have not been perfectly sanitized  The similarity algorithm is based on the Ratcliff/Obershelp pattern recognition algorithm

P-Scan : Analysis of the Parameter Precedence  Error Test  Checks if the application crashes, or returns an ”internal” error when an identical parameter is injected multiple times

P-Scan : Analysis of the Parameter Precedence  If none of these five tests succeed, the parameter is discarded from the analysis

V-Scan: Testing for HPP vulnerabilities  For every page that V-Scan receives from the crawler, it tries to inject a URL-encoded version of an innocuous parameter into each existing parameter of the query string  Then, for each injection, verifies the presence of the parameter in links, action fields and hidden fields of forms in the answer page.

V-Scan: Testing for HPP vulnerabilities  P URL = [P U1, P U2,... P Un ], means the parameters present in the page URL  P Body = [P B1, P B2,... P Bm ], means the parameters present in the links or forms contained in the page body  Then computes the P A, P B and P C sets

V-Scan: Testing for HPP vulnerabilities  V-Scan starts by injecting the new parameter in the P A set, then P B set, and finally P C set par1=var1&language=en%26foo%3Dbar

Implementation  The browser component of PAPAS is implemented as a Firefox extension  The others is written in Python  Using a black-box approach to test for HPP vulnerabilities

Limitation  PAPAS does not support the crawling of links embedded in active content such as Flash  PAPAS focuses only on HPP vulnerabilities that can be exploited via client-side attacks

Evaluation – HPP Prevalence in Popular Websites  Collected 5,000 unique URLs from the public database of AlexaAlexa  The crawler to start from the homepage and visit the sub-pages up to a distance of three  Limited the analysis to 5 instances per page

Evaluation – HPP Prevalence in Popular Websites  Scanned 5,016 websites, corresponding to a total of 149,806 unique pages in 13 days

Evaluation – Parameter Precedence

Evaluation - HPP Vulnerabilities  PAPAS discovered that 1499 web-sites (29.88%) contained at least one page vulnerable to HTTP Parameter Injection.  Splitting the vulnerable set into two separate groups  In 872 websites (17.39%), the injection was on a link or a form’s action field.  Remaining 627 cases (12.5%), the injection was on a form’s hidden field.

Evaluation - HPP Vulnerabilities  The final result was that at least 702 out of the 872 applications of the first group were exploitable  At least 702 out of the 1499 vulnerable websites (46.8%) would have been possible to exploit the HPP vulnerability to override one of the hard-coded parameters, or to inject another malicious parameter that would affect the behavior of the application

Evaluation - HPP Vulnerabilities

Evaluation - False Positives  False positives rate was 1.12% (10 applications)  Due to parameters that were used by the application as an entire target for one of the links  11% of the vulnerable pages were directly linked from the home-page, while the remaining 89% were equally distributed between the distance of 2 and 3

Examples of Discovered Vulnerabilities  Facebook Share  Facebook, Twitter, Digg and other social networking sites offer a share component to easily share the content of a webpage over a user profile

Examples of Discovered Vulnerabilities  Shopping Carts  Some online shopping websites that allow the attacker to tamper with the user interaction with the shopping cart component

Conclusion  Present the first automated approach for the discovery of HPP vulnerabilities in web applications  PAPAS is able to crawl websites and discover HPP vulnerabilities by parameter injection  Results show that about 30% of the sites we analyzed contain vulnerable parameters and that at least 14% of them can be exploited using HPP