Automated Discovery of Parameter Pollution Vulnerabilities in Web Applications

Automated Discovery of Parameter Pollution Vulnerabilities in Web Applications

Automated Discovery of Parameter Pollution Vulnerabilities in Web Applications Marco Balduzzi∗, Carmen Torrano Gimenez ‡, Davide Balzarotti∗, and Engin Kirda∗§ ∗ Institute Eurecom, Sophia Antipolis {balduzzi,balzarotti,kirda}@eurecom.fr ‡ Spanish National Research Council, Madrid [email protected] § Northeastern University, Boston [email protected] Abstract 1 Introduction In the last twenty years, web applications have grown In the last twenty years, web applications have grown from simple, static pages to complex, full-fledged dynamic from simple, static pages to complex, full-fledged dynamic applications. Typically, these applications are built using applications. Typically, these applications are built using heterogeneous technologies and consist of code that runs heterogeneous technologies and consist of code that runs both on the client and on the server. Even simple web ap- on the client (e.g., Javascript) and code that runs on the plications today may accept and process hundreds of dif- server (e.g., Java servlets). Even simple web applications ferent HTTP parameters to be able to provide users with today may accept and process hundreds of different HTTP interactive services. While injection vulnerabilities such as parameters to be able to provide users with rich, interactive SQL injection and cross-site scripting are well-known and services. As a result, dynamic web applications may con- have been intensively studied by the research community, a tain a wide range of input validation vulnerabilities such new class of injection vulnerabilities called HTTP Parame- as cross site scripting (e.g., [4, 5, 34]) and SQL injec- ter Pollution (HPP) has not received as much attention. If tion (e.g., [15, 17]). a web application does not properly sanitize the user input Unfortunately, because of their high popularity and a for parameter delimiters, exploiting an HPP vulnerability, user base that consists of millions of Internet users, web an attacker can compromise the logic of the application to applications have become prime targets for attackers. In perform either client-side or server-side attacks. fact, according to SANS [19], attacks against web applica- In this paper, we present the first automated approach for tions constitute more than 60% of the total attack attempts the discovery of HTTP Parameter Pollution vulnerabilities observed on the Internet. While flaws such as SQL injec- in web applications. Using our prototype implementation tion and cross-site scripting may be used by attackers to called PAPAS (PArameter Pollution Analysis System), we steal sensitive information from application databases and conducted a large-scale analysis of more than 5,000 pop- to launch authentic-looking phishing attacks on vulnerable ular websites. Our experimental results show that about servers, many web applications are being exploited to con- 30% of the websites that we analyzed contain vulnerable vert trusted websites into malicious servers serving content parameters and that 46.8% of the vulnerabilities we discov- that contains client-side exploits. According to SANS, most ered (i.e., 14% of the total websites) can be exploited via website owners fail to scan their application for common HPP attacks. The fact that PAPAS was able to find vulnera- flaws. In contrast, from the attacker’s point of view, auto- bilities in many high-profile, well-known websites suggests mated tools, designed to target specific web application vul- that many developers are not aware of the HPP problem. nerabilities simplify the discovery and infection of several We informed a number of major websites about the vulner- thousand websites. abilities we identified, and our findings were confirmed. While injection vulnerabilities such as SQL injection and cross-site scripting are well-known and have been inten- sively studied, a new class of injection vulnerabilities called can put in the document root of her website. HTTP Parameter Pollution (HPP) has not received as much attention. HPP was first presented in 2009 by di Paola and In summary, the paper makes the following contribu- Carettoni at the OWASP conference [27]. HPP attacks con- tions: sist of injecting encoded query string delimiters into other existing parameters. If a web application does not prop- • We present the first automated approach for the detec- erly sanitize the user input, a malicious user can compro- tion of HPP vulnerabilities in web applications. Our mise the logic of the application to perform either client- approach consists of a component to inject parameters side or server-side attacks. One consequence of HPP attacks into web applications and a set of tests and heuristics to is that the attacker can potentially override existing hard- determine if the pages that are generated contain HPP coded HTTP parameters to modify the behavior of an appli- vulnerabilities. cation, bypass input validation checkpoints, and access and • We describe the architecture and implementation of the possibly exploit variables that may be out of direct reach. prototype of our approach that we call PAPAS (PA- In this paper, we present the first automated approach for rameter Pollution Analysis System). PAPAS is able to the discovery of HTTP Parameter Pollution vulnerabilities crawl websites and generate a list of HPP vulnerable in web applications. Our prototype implementation, that we URLs. call PArameter Pollution Analysis System (PAPAS), uses a black-box scanning technique to inject parameters into web • We present and discuss the large-scale, real-world ex- applications and analyze the generated output to identify periments we conducted with more than 5,000 popu- HPP vulnerabilities. We have designed a novel approach lar websites. Our experiments show that HPP vulner- and a set of heuristics to determine if the injected parame- abilities are prevalent on the web and that many well- ters are not sanitized correctly by the web application under known, major websites are affected. We verified that at analysis. least 46.8% of the vulnerabilities we discovered could To the best of our knowledge, no tools have been pre- be exploited on the client-side. Our empirical results sented to date for the detection of HPP vulnerabilities in suggest that, just like in the early days of cross site web applications, and no studies have been published on scripting and cross site request forgery [1], many de- the topic. At the time of the writing of this paper, the most velopers are not aware of the HPP problem, or that they effective means of discovering HPP vulnerabilities in web- do not take it seriously. sites is via manual inspection. At the same time, it is unclear how common and significant a threat HPP vulnerabilities The paper is structured as follows: The next section give are in existing web applications. an explanation of parameter pollution attacks and provides In order to show the feasibility of our approach, we used examples. Section 3 describes our approach and presents PAPAS to conduct a large-scale analysis of more than 5,000 the main components of PAPAS. Section 4 presents and popular websites. Our experimental results demonstrate discusses the evaluation of PAPAS. Section 5 lists related that there is reason for concern as about 30% of the websites work, and Section 6 briefly concludes the paper. that we analyzed contained vulnerable parameters. Further- more, we verified that 14% of the websites could be ex- 2 HTTP Parameter Pollution Attacks ploited via client-side HPP attacks. The fact that PAPAS was able to find vulnerabilities in many high-profile, well- HTTP Parameter Pollution attacks (HPP) have only re- known websites such as Google, Paypal, Symantec, and Mi- cently been presented and discussed [27], and have not re- crosoft suggests that many developers are not aware of the ceived much attention so far. An HPP vulnerability allows HPP problem. an attacker to inject a parameter inside the URLs generated When we were able to obtain contact information, we by a web application. The consequences of the attack de- informed the vulnerable websites of the vulnerabilities we pend on the application’s logic, and may vary from a simple discovered. In the cases where the security officers of the annoyance to a complete corruption of the application’s be- concerned websites wrote back to us, our findings were con- havior. Because this class of web vulnerability is not widely firmed. known and well-understood yet, in this section, we first ex- We have created an online service based on PAPAS1 plain and discuss the problem. (currently in beta version) that allows website maintainers Even though injecting a new parameter can sometimes to scan their sites. As proof of ownership of a site, the web- be enough to exploit an application, the attacker is usually site owner is given a dynamically-generated token that she more interested in overriding the value of an already exist- 1The PAPAS service is available at: http://papas.iseclab. ing parameter. This can be achieved by “masking” the old org parameter by introducing a new one with the same name. For this to be possible, it is necessary for the web applica- has to manually parse the query string to extract each single tion to “misbehave” in the presence of duplicated parame- value. ters, a problem that is often erroneously confused with the However, the problem arises when the developer expects HPP vulnerability itself. However, since parameter pollu- to receive a single item and, therefore, invokes methods tion attacks often rely on duplicated parameters in practice, (such as getParameter in JSP) that only return a sin- we decided to study the parameter duplication behavior of gle value. In this case, if more than one parameter with the applications, and measure it in our experiments. same name is present in the query string, the one that is re- turned can either be the first, the last, or a combination of 2.1 Parameter Precedence in Web Applications all the values.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us