1 A Privacy-Preserving Defense Mechanism Against Request Forgery Attacks Ben S. Y. Fung and Patrick P. C. Lee The Chinese University of Hong Kong TrustCom’11.

Slides:



Advertisements
Similar presentations
Building web applications on top of encrypted data using Mylar Presented by Tenglu Liang Tai Liu.
Advertisements

17 th ACM CCS (October, 2010).  Introduction  Threat Model  Cross-Origin CSS Attacks  Example Attacks  Defenses  Experiment  Related Work 2 A Presentation.
EECS 354 Network Security Cross Site Scripting (XSS)
Attacking Session Management Juliette Lessing
CS426Fall 2010/Lecture 81 Computer Security CS 426 Lecture 8 User Authentication.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Online Security Tuesday April 8, 2003 Maxence Crossley.
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.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
Cookies COEN 351 E-commerce Security. Client / Session Identification HTTP does not maintain state. State Information can be passed using: HTTP Headers.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
D ATABASE S ECURITY Proposed by Abdulrahman Aldekhelallah University of Scranton – CS521 Spring2015.
Introduction to Application Penetration Testing
Origins, Cookies and Security – Oh My! John Kemp, Nokia Mobile Solutions.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
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.
Robust Defenses for Cross-Site Request Forgery CS6V Presented by Saravana M Subramanian.
Optimizing Traditional and Advocating New Prevention Methods Mark Jenne Tatiana Alexenko Cross-Site-Request-Forgery.
I Do Not Know What You Visited Last Summer: Protecting users from stateful third-party web tracking with TrackingFree browser Xiang Pan §, Yinzhi Cao †,
Preventing Web Application Injections with Complementary Character Coding Raymond Mui Phyllis Frankl Polytechnic Institute of NYU Presented at ESORICS.
OMash: Enabling Secure Web Mashups via Object Abstractions Steven Crites, Francis Hsu, Hao Chen UC Davis.
Chapter 8 Cookies And Security JavaScript, Third Edition.
OMash: Enabling Secure Web Mashups via Object Abstractions Steven Crites, Francis Hsu, Hao Chen (UC Davis) ACM Conference on Computer and Communications.
BetterAuth: Web Authentication Revisited Martin Johns, Sebastian Lekies, Bastian Braun, Benjamin Flesch In ACSAC /01/08 A.C. ADL.
Cross-Site Attacks James Walden Northern Kentucky University.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
CSCE 201 Web Browser Security Fall CSCE Farkas2 Web Evolution Web Evolution Past: Human usage – HTTP – Static Web pages (HTML) Current: Human.
Robust Defenses for Cross-Site Request Forgery
Detecting Targeted Attacks Using Shadow Honeypots Authors: K.G. Anagnostakis, S. Sidiroglou, P. Akritidis, K. Xinidis, E. Markatos, A.D. Keromytis Published:
SEC835 Runtime authentication Secure session management Secure use of cryptomaterials.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
1 Robust Defenses for Cross-Site Request Forgery Adam Barth, Collin Jackson, John C. Mitchell Stanford University 15th ACM CCS.
Cookies Bill Chu. © Bei-Tseng Chu Aug 2000 Definition A cookie is a TEXT object of max 4KB sent from a web server to a browser It is intended for the.
Saphe surfing! 1 SAPHE Secure Anti-Phishing Environment Presented by Uri Sternfeld.
IT Security. What is Information Security? Information security describes efforts to protect computer and non computer equipment, facilities, data, and.
Evil Code and how to defend against it CSCI 4300
University of Central Florida The Postman Always Rings Twice: Attacking & Defending postMessage in HTML5 Websites Ankur Verma University of Central Florida,
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
CS526Topic 12: Web Security (2)1 Information Security CS 526 Topic 9 Web Security Part 2.
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)
Michael Dalton, Christos Kozyrakis, and Nickolai Zeldovich MIT, Stanford University USENIX 09’ Nemesis: Preventing Authentication & Access Control Vulnerabilities.
Cross-site request forgery Collin Jackson CS 142 Winter 2009.
Bloom Cookies: Web Search Personalization without User Tracking Authors: Nitesh Mor, Oriana Riva, Suman Nath, and John Kubiatowicz Presented by Ben Summers.
Automatic and Precise Client-Side Protection against CSRF Attacks.
CSRF Attacks Daniel Chen 11/18/15. What is CSRF?  Cross Site Request Forgery (Sea-Surf)  AKA XSRF/ One Click / Sidejacking / Session Riding  Exploits.
Puppetnets: Misusing Web Browsers as a Distributed Attack Infrastructure Paper By : V.T.Lam, S.Antonatos, P.Akritidis, K.G.Anagnostakis Conference : ACM.
Do not try any of the techniques discussed in this presentation on a system you do not own. It is illegal and you will get caught.
The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites Paper by Sooel Son and Vitaly Shmatikov, The University of Texas.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
Building Secure ColdFusion Applications
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Enabling Secure Internet Access with TMG
World Wide Web policy.
Cross-Site Forgery
Cross-Site Request Forgeries: Exploitation and Prevention
CSC 482/582: Computer Security
Automatic and Precise Client-Side Protection against CSRF Attacks
What is Cookie? Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve.
Riding Someone Else’s Wave with CSRF
Cross-Site Request Forgery (CSRF) Attack Lab
Cross Site Request Forgery New Attacks and Defenses
Cross Site Request Forgery (CSRF)
Presentation transcript:

1 A Privacy-Preserving Defense Mechanism Against Request Forgery Attacks Ben S. Y. Fung and Patrick P. C. Lee The Chinese University of Hong Kong TrustCom’11

2 Motivation  HTTP session state management is important in modern web applications State includes authentication credentials Clients insert state into HTTP requests Web servers use state to identify clients’ privileges  Examples of state: Cookies Authentication header Data embedded GET/PUT requests

3 Motivation  HTTP session state management is subject to various security risks  One top risk: Cross-site request forgery (CSRF) An attacker triggers an HTTP request that carries session state of a client, without client’s knowledge OWASP Top 10 Application Security Risks in 2010

4 How CSRF Works How CSRF Works  Root cause of CSRF Existing browsers do not check whether a client actually initiates an HTTP request Malicious Website Browser Target Website Send login request Send forged request with cookies Return login response with cookies Visit malicious website Return malicious code

5 General Request Forgery  Variants of CSRF Login CSRF [Barth et al., 08] Trigger forged login requests without active sessions Clickjacking [Hansen and Grossman, 08] Put an invisible frame of target website on malicious website  Same site request forgery (SSRF) Target and malicious websites on same domain (origin) but maintained by different owners Cross-origin checking no longer works

6 Related Work  Header checking Checks origin header [Barth et al., CCS 08]. Can’t defend SSRF  Token validation Insert secure tokens in form [CSRFGuard, 10]. Token protected by same origin policy. Can’t defend SSRF.  Client-side defense e.g., BEAP [Mao et al., FC 09] Behavioral inference. Can generate high false alarms.

7 Related Work  Fine-grained access control E.g., SOMA [Oda et al., CCS 08], Csfire [De Ryck et al., ESSOS 10] Servers configure access scopes where requests can be initiated. Browsers enforce access control Can defend both CSRF and SSRF attacks W3C drafts specs on fine-grained configuration  Limitation: Access scope policies carry sensitive information  Question: Can we limit disclosure of sensitive information while allowing access control?

8 Our Work  Build DeRef, a practical system that can defend different variants of CSRF and SSRF attacks  Enable fine-grained access configurations  Identify forged requests in privacy-preserving manner, without disclosing private information of both browser and website  Implement a proof-of-concept prototype atop Firefox and WordPress  feasible deployment

9 Definitions  Initiating URLs URLs that directly/indirectly initiate requests e.g., referer URLs, or URLs of current iframe and ancestor iframes  Target URLs destination URLs Initiating URLs Target URL

10 Threat Model  Websites can configure target URLs to be protected initiating URLs that are legitimate to send requests to protected target URLs  A request is forged if target URL is protected, but initiated URLs are not legitimate Strip authentication credentials (including cookies and authentication headers) from forged requests  Aim to defend both CSRF and SSRF attacks

11 Fine-Grained Access Control in DeRef  DeRef is built on two access control lists (ACLs): I-ACL: legitimate initiating URLs T-ACL: protected target URLs  ACLs are configured with scopes Based on scheme://domain/path e.g.,  ACLs are transformed to “privacy-preserving” lists and stored in a policy file, which is publicized on website  DeRef’s browser plugin checks scopes defined in the policy file, and caches recently checked scopes

12 Privacy-Preserving Goals  Protect client’s private information When browser checks if a URL is defined by a ACL, it does not reveal the URL to the website  Protect website’s private information Browser does not know website’s configured scopes unless the scope matches the URL  DeRef’s approach: two-phase checking Hash checking: checks if a scope potentially matches ACLs Blind checking: checks if a scope actually matches ACLs

13 Hash Checking  Let x 1 … x L be a list of L configured scopes s be a random salt h(.) be a k-bit one-way hash function  Website sends h(s,x 1 ), h(s,x 2 ), …, h(s,x L ) to browser

14 Hash Checking  To check if a URL y is defined in the configured scopes, we enumerate all possible scopes associated with y  For example, we have y =  We need to check

15 Hash Checking  Hash length k determines the degree of privacy of the website’s configured scope Large k  attacker more likely find configured scopes e.g., by offline dictionary attack with popular URLs Small k  have many false positives e.g., if k = 4, 1/2 4 = 1/16 of URLs in entire web will match  Good value of k Filter out invalid scopes Preserve the privacy of configured scopes  k is tunable depending on application needs

16 Blind Checking  Built on privacy-preserving matching protocol [R. Nojima et al., Trans. on Data Privacy 09] Based on Chaum’s RSA blind signature [Chaum, Crypto 83]  Idea (details in paper): In bootstrap phase, website sends a list of signed hashes, which “hide” the configured scopes Browser sends blinded hash for scope that passes hash checking Website signs blinded hash and returns to browser Browser unblinds signed hash and checks against a list of signed hashes

17 Two-Phase Privacy-Preserving Checking  Phase 1: hash checking Filter out scopes that are not configured in ACLs Reduce blind checking steps Hash checking does not produce false negative  Phase 2: blind checking Eliminate the false positives from hash checking

18 Implementation  Client-side: Implement a Firefox plugin in Javascript Intercepts HTTP/HTTPS messages Enforces two-phase checking Strips session information from forged requests  Server-side: Implement a plugin in WordPress 2.0 in PHP  Backward compatible if only one side supports DeRef  allows incremental deployment

19 Evaluation  Goal: study response time overhead of DeRef in real deployment compared to without DeRef Deploy three machines in a LAN: client (Firefox), target website (WordPress), malicious website  Three scenarios: #1: Browsing insensitive webpages (normal usage) #2: Browsing sensitive webpages (e.g., logins) #3: Browsing malicious webpages that trigger CSRF attacks

20 Results  #1: normal usage only has minimal overhead  #2: sensitive webpages have high overhead Two-phase checking on both I-ACL and T-ACL  #3: malicious webpages have overhead Two-phase checking on T-ACL only (since initiating URLs not configured in I-ACL)  Caching recently checked scopes reduces overhead to < 20% #1#2#3 IndexAdminLoginCSRFLogin CSRF No DeRef ms ms ms64.41 ms55.83 ms DeRef (no cache) ms (4 %) ms (275 %) ms (154 %) ms (83 %) ms (99 %) DeRef (with cache) ms (4 %) ms (15 %) ms (11 %) ms (18 %) 66.4 ms (19 %)

21 Trade-off between Performance and Privacy  Larger k --> processing time decreases Hash checking filters more non-configured URLs Blind checking likely to be skipped  Trade-off between performance and privacy by varying k

22 Conclusions  DeRef: a practical system that defends a general class of request forgery attacks Enable fine-grained access control in a privacy- preserving manner Use tunable two-phase checking to trade-off between performance privacy Implement a proof-of-concept prototype atop Firefox and WordPress  Source code: