Preventing Session Hijacking Attacks with Disposable Credentials

Preventing Session Hijacking Attacks with Disposable Credentials

One-Time Cookies: Preventing Session Hijacking Attacks with Disposable Credentials Italo Dacosta, Saurabh Chakradeo, Mustaque Ahamad and Patrick Traynor Converging Infrastructure Security (CISEC) Laboratory Georgia Tech Information Security Center (GTISC) Georgia Institute of Technology idacosta, schakradeo, mustaq, traynor @cc.gatech.edu { } Abstract as session authentication tokens. As an example, many websites rely on strong security mechanisms such as Many web applications are vulnerable to session hi- HTTPS (i.e., HTTP over TLS/SSL) to initially authenti- jacking attacks due to the insecure use of cookies for cate a user. During this secure session, the server gener- session management. The most recommended defense ates cookies that the user can later employ as lightweight against this threat is to completely replace HTTP with authentication tokens. However, because these tokens HTTPS. However, this approach presents several chal- are static and transmitted “in the clear”, an adversary able lenges (e.g., performance and compatibility concerns) to intercept them can use these cookies to gain unau- and therefore, has not been widely adopted. In this pa- thorized access to a user’s session. While such session per, we propose “One-Time Cookies” (OTC), an HTTP hijacking attacks are not new, a significant number of session authentication protocol that is efficient, easy to web applications remains vulnerable to this threat [38]. deploy and resistant to session hijacking. OTC’s secu- Moreover, the availability of tools such as Hamster [14] rity relies on the use of disposable credentials based on and Firesheep [6] makes such attacks simple to execute. a modified hash chain construction. We implemented While the common wisdom suggests the extension of OTC as a plug-in for the popular WordPress platform HTTPS from login to site-wide protection, this solution and conducted extensive performance analysis using ex- may break certain web application functionality [34] and tensions developed for both Firefox and Firefox for mo- impact performance. Accordingly, lightweight solutions bile browsers. Our experiments demonstrate the ability with fewer side-effects may be more appropriate. to maintain session integrity with a throughput improve- In this paper, we present One-Time Cookies (OTC), an ment of 51% over HTTPS and a performance approx- efficient and robust web session authentication protocol. imately similar to a cookie-based approach. In so do- OTC generates single-use authentication tokens based on ing, we demonstrate that one-time cookies can signifi- a modified hash chain construction. These tokens, once cantly improve the security of web sessions with minimal verified by the web application, can not be reused. More- changes to current infrastructure. over, each OTC credential is tied to a specific request for a resource, meaning that an adversary can not intercept 1 Introduction and repurpose them for illicitly redirecting a session. In so doing, we make the following contributions: HTTP is a stateless protocol. Requests to a web server are treated as independent transactions with no relation Design, verification and implementation of One- • to each other. While simple and scalable, this design Time Cookies: We develop a protocol based on makes the creation of applications requiring the associa- a modified hash chain construction that prevents tion of multiple transactions to a single user (e.g., bank- adversaries from successfully replaying captured ing) somewhat difficult natively. HTTP cookies, which cookies to gain unauthorized control of an HTTP generally contain one or a small number of short identi- session. We then use ProVerif [1, 2, 5] to formally fier strings allowing a server to associate seemingly unre- verify the security properties of the OTC protocol. lated requests, rapidly became the dominant mechanism Finally, we implement our construction as an exten- for web session management. sion for the popular blogging platform WordPress, Unfortunately, the use of cookies introduces a num- which currently relies on HTTPS for login and sub- ber of security risks, especially when they are employed sequently uses cookies for session management. Extensive performance analysis on multiple plat- 2.1 HTTP Cookies • forms: We implement plugins for both Firefox and Firefox for mobile web browsers and perform ex- HTTP does not provide support for session management. tensive performance tests. Our experiments show Each request and response exchanged between a client an increase in throughput for the server by nearly and a server are considered an independent transaction. 51% over enabling site-wide SSL. We also measure While this is sufficient for the most basic static pages, the OTC protocol in scenarios in which distributed the need for session management mechanisms increased web caches are currently relied upon and parameter- with the development of the first web applications. As a ize our experiments with round-trip times gathered result, HTTP cookies [20,21] were first proposed in 1994 from PlanetLab [33] measurements. and have since become the dominant mechanism for web session management. Make our OTC implementation available to the Cookies consist of name-value pairs containing ses- • community: The OTC code for the WordPress sion information. A web application running on the plug-in and the extensions for Firefox and Firefox server generates cookies and sends them to the user in mobile is already available here: http://www. responses as HTTP headers as follows: cc.gatech.edu/˜idacosta/otc.html. Set-Cookie: SID=645aa87285e8d8adbe97c4f3e22 Any WordPress based web site can incorporate OTC in matter of minutes and point their users to A web application adds one Set-Cookie header per either the desktop or mobile Firefox extensions. cookie to the server’s response. In addition to the cookie value, the web application can define other parameters domain path expiration We are very careful not to over-claim the security such as and (cookie’s scope), HttpOnly guarantees provided by one-time cookies. Specifically, (cookie’s validity period), flag (defines if the Secure while our approach efficiently eliminates session hijack- cookie can be accessed by client-side scripts) and ing attacks by ensuring session integrity (specifically, flag (defines if the cookie can only be sent over a secure the integrity of navigation requests), it does not provide channel; i.e., HTTPS). The browser will add cookies to for confidentiality or integrity of the content actually re- each request to the web application as one HTTP header quested by users. These are fundamental tradeoffs be- as follows: tween our work and the use of site-wide HTTPS. How- Cookie: SID=645aa87285e8d8adbe97c4f3e22 ever, our mechanism does directly respond to real threats (e.g., Firesheep [6]) with a performance-conscious solu- Cookies used to authenticate user’s requests (authen- tion that can be deployed without the need for additional tication cookies) are normally created during the login hardware. Our solution therefore lies within a spectrum process. After successful validation of the user’s primary of valid techniques and can immediately improve the se- authentication credentials (i.e., username and password), curity of users of many web applications. the web application generates new authentication cook- The remainder of this paper is organized as follows: ies and sends them to the user’s browser. The browser Section 2 offers important background information on then appends these cookies to each request that requires session management on the web and presents our mo- authentication. Using cookies for session authentication tivation; Section 3 describes the design, implementation offers several advantages. First, it avoids requiring the and formal description of the protocol in which one-time user to enter authentication credentials for every request. cookies are used and its security properties; Section 4 Second, it requires minimal state management in the web presents our experimental testbed, experiments and re- application. This is important for web applications where sults; Section 5 offers additional analysis and discussion state synchronization is difficult (e.g., multiple servers in of our proposed solution; Section 6 provides an overview different geographical locations). Third, it is a simple of important related work; Section 7 offers concluding mechanism and is supported by all browsers. remarks. 2.2 Problems with Authentication Cookies 2 Web Session Authentication Once established, authentication cookies become a tem- porary replacement of the user’s password. For that rea- In this section, we present a brief overview of HTTP son, they must be properly protected during their life cy- cookies as session authentication tokens and session cle. However, most web applications use authentication hijacking attacks. We then discuss current solutions cookies with limited or no protection at all, affecting the against these attacks and their lack of widespread deploy- security of the users’ sessions. ment. Most authentication cookies are static; they do not change during their life cycle. If an adversary captures Site Rank an active authentication cookie, she can replay it to im- facebook.com 2 personate the user associated with the cookie(s) and send youtube.com 4 arbitrary requests. This problem is known as a session hi- live.com 5 wikipedia.com 8 jacking or sidejacking attack because the adversary takes twitter.com 10 control over an active user session. This problem is exac- amazon.com

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    17 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