Redefining Web Browser Principals with a Configurable Origin Policy Yinzhi Cao, Vaibhav Rastogi, Zhichun Li†, Yan Chen and Alexander Moshchuk†† Northwestern.

Slides:



Advertisements
Similar presentations
Protecting Browser State from Web Privacy Attacks Collin Jackson, Andrew Bortz, Dan Boneh, John Mitchell Stanford University.
Advertisements

LIS651 lecture 3 taming PHP Thomas Krichel
LIS651 lecture 3 functions & sessions Thomas Krichel
Presented by Vaibhav Rastogi. Current browsers try to separate host system from Web Websites evolved into web applications Lot of private data on the.
Using the Self Service BMC Helpdesk
AUTHENTICATION AND KEY DISTRIBUTION
ForceHTTPS: Protecting High-Security Web Sites from Network Attacks Collin Jackson and Adam Barth.
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
Presenter: James Huang Date: Sept. 29,  HTTP and WWW  Bottle Web Framework  Request Routing  Sending Static Files  Handling HTML  HTTP Errors.
Expressive Privacy Control with Pseudonyms Seungyeop Han, Vincent Liu, Qifan Pu, Simon Peter, Thomas Anderson, Arvind Krishnamurthy, David Wetherall University.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Path Cutter: Severing the Self-Propagation Path of XSS JavaScript Worms in Social Web Networks Yinzhi Cao, Vinod Yegneswaran, Phillip Porras, and Yan Chen.
1 Yinzhi Cao, Zhichun Li *, Vaibhav Rastogi, Yan Chen, and Xitao Wen Labs of Internet Security and Technology Northwestern University * NEC Labs America.
17 th ACM CCS (October, 2010).  Introduction  Threat Model  Cross-Origin CSS Attacks  Example Attacks  Defenses  Experiment  Related Work 2 A Presentation.
Deeper Security Analysis of Web-based Identity Federation Apurva Kumar IBM Research – India.
Password Managers: Attacks and Defenses David Silver, Suman Jana, Dan Boneh, Stanford University Eric Chen, Collin Jackson, Carnegie Mellon University.
1 14th ACM Conference on Computer and Communications Security, Alexandria, VA Shuo Chen †, David Ross ‡, Yi-Min Wang † † Internet Services Research Center.
Vaibhav Rastogi and Yi Yang.  Web 2.0 – rich applications  A website hosts content it may not be responsible for  Third party gadgets  Third party.
The Basic Authentication Scheme of HTTP. Access Restriction Sometimes, we want to restrict access to certain Web pages to certain users A user is identified.
On the Incoherencies in Web Browser Access Control Policies Authors: Kapil Singh, et al Presented by Yi Yang.
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 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.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
1 Subspace: Secure Cross Domain Communication for Web Mashups Collin Jackson and Helen J. Wang Mamadou H. Diallo.
Redefining Web Browser Principals with a Configurable Origin Policy Yinzhi Cao, Vaibhav Rastogi, Zhichun Li†, Yan Chen and Alexander Moshchuk†† Northwestern.
Subspace: Secure Cross-Domain Communication for Web Mashups Collin Jackson Stanford University Helen J. Wang Microsoft Research ACM WWW, May, 2007 Presenter:
Subspace: Secure Cross-Domain Communication for Web Mashups In Proceedings of the 16th International World Wide Web Conference. (WWW), 2007 Collin Jackson,
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Towards a Formal Foundation of Web Security devdatta akhawe / adam barth / peifung eric lam john mitchell / dawn song.
Origins, Cookies and Security – Oh My! John Kemp, Nokia Mobile Solutions.
JavaScript, Fourth Edition
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
I Do Not Know What You Visited Last Summer: Protecting users from stateful third-party web tracking with TrackingFree browser Xiang Pan §, Yinzhi Cao †,
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.
Cross Site Integration “mashups” cross site scripting.
SEC835 Runtime authentication Secure session management Secure use of cryptomaterials.
SMash : Secure Component Model for Cross- Domain Mashups on Unmodified Browsers WWW 2008 Frederik De Keukelaere et al. Presenter : SJ Park.
1 Robust Defenses for Cross-Site Request Forgery Adam Barth, Collin Jackson, John C. Mitchell Stanford University 15th ACM CCS.
A Little Bit About Cookies Fort Collins, CO Copyright © XTR Systems, LLC A Little Bit About Cookies Instructor: Joseph DiVerdi, Ph.D., M.B.A.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
THE DEVIL IS IN THE (IMPLEMENTATION) DETAILS: AN EMPIRICAL ANALYSIS OF OAUTH SSO SYSTEMS SAN-TSAI SUN & KONSTANTIN BEZNOSOV PRESENTED BY: NAZISH KHAN COMPSCI.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
University of Central Florida The Postman Always Rings Twice: Attacking & Defending postMessage in HTML5 Websites Ankur Verma University of Central Florida,
Vaibhav Rastogi and Yi Yang.  SOP is outdated  Netscape introduced this policy when most content on the Internet was static  Differences amongst different.
I Do Not Know What You Visited Last Summer: Protecting users from stateful third-party web tracking with TrackingFree browser Xiang Pan, Northwestern University.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
Cross-site request forgery Collin Jackson CS 142 Winter 2009.
1 Isolating Web Programs in Modern Browser Architectures CS6204: Cloud Environment Spring 2011.
Web Browsing *TAKE NOTES*. Millions of people browse the Web every day for research, shopping, job duties and entertainment. Installing a web browser.
Automatic and Precise Client-Side Protection against CSRF Attacks.
Cloud Environment Spring  Microsoft Research Browser (2009)  Multi-Principal Environment with Browser OS  Next Step Towards Secure Browser 
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
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.
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
World Wide Web policy.
Client / Session Identification Cookies
Web Caching? Web Caching:.
Automatic and Precise Client-Side Protection against CSRF Attacks
Riding Someone Else’s Wave with CSRF
Cross Site Request Forgery New Attacks and Defenses
Cross Site Request Forgery (CSRF)
Presentation transcript:

Redefining Web Browser Principals with a Configurable Origin Policy Yinzhi Cao, Vaibhav Rastogi, Zhichun Li†, Yan Chen and Alexander Moshchuk†† Northwestern Lab for Internet and Security Technology †NEC Labs America, ††Microsoft Research Presenter: Yinzhi Cao 1

Outline Background and Motivation – Background (SOP) – Fine-grained-ness of SOP – Coarse-grained-ness of SOP – Origin Spoofing Attacks Design Implementation Evaluation Conclusion 2

Background Same-origin policy (SOP). – An access control policy in a client web browser. – Scripts/resources with the same triple can access each other. – SOP is used to define protection boundaries between different web applications. – SOP is good, but … 3 benign.com Principal One Principal Two malicious.com

Fine-grained-ness of SOP Cooperation between Multiple Origins. (SOP cannot) Thus, some solutions are created. – document.domain. – Cross-principal Communication Channel. – Cross-Origin AJAX. – ObjectView. 4 However, Singh et al. show that document.domain can be insecure in Oakland 2010 Paper.

Coarse-grained-ness of SOP Isolating Content from One Single Domain. (SOP cannot) – Different Web Sessions at One Client. – Mashup Isolation. Existing Solutions – Private browsing – SessionStorage – MashupOS – OMash – SMash – Subspace 5

Existing approaches can split and merge two SOP defined principals. However, there is no new label for those newly created principals, leading to origin spoofing attacks. 6

Origin Spoofing Attack I Revisit reply attack proposed by Barth et al top.postMessage(msg,targetOrigin) redirect In SOP, those two gadgets share the same targetOrigin source.origin.postMessage(replyMsg, origin)

Origin Spoofing Attack II 8 Malicious.comConnect.com Merged Principal Benign.com Request through Cross-origin Resource Sharing Is it malicious.com or connect.com?

Outline Background and Motivation Design – Several Concepts. – Configurable Origin Policy. – Operations on COP origins. Create a Principal. Join an Existing Principal. Communication inside a Principal. Communication between Principals. Destroy a Principal. Implementation Evaluation Conclusion 9

Several Concepts Principal – An abstract container that includes certain resources from both clients and servers with particular properties. Origin – A label of principal. OriginID – A physical representation of the origin of a principal. – Three preserved originID: empty, default, and secret. PrincipalD – Public version of originID. Principal’s Server List (PSL) - a list maintained by the browser to record all the servers or part of them that are involved in current principal 10

Configurable Origin Policy A COP principal (both server and client parts included) can configure any of its resources to an arbitrary but unique origin. On the server side, we change the content-to- principal mapping. 11

12 a.comb.comc.com Principal One Principal Two Principal Three Server SOP: a.com originID=1 b.com originID=1 c.com originID=2 originID=3 d.com originID=4 Principal One Principal Two Principal Three Principal Four Client COP: Client Server

Configurable Origin Policy On the client side, we give the client principal more freedom. Because of the invisibility of our origin to other principals, we can set an arbitrary origin at the client side. 13

Operation: Create a Principal Creation of Principal from Scratch – This will help open different Gmail accounts. – The server will send different originIDs to the client for different Gmail sessions. 14 with empty originID gmail.com PSL:gmail.com

Operation: Create a Principal Creation of Principal from Another Principal – Mashup isolation problem can also be solved here. – Web integrators at client side can create different principals for contents from different third parties by giving different originIDs. 15 and PSL and the same PSL

Operation: Request Another Website to Join Its Principal originID & PSL ads.cnn.com ads.cnn.comwww.cnn.com Contents with the same OriginID and path PSL: ;

Operation: Join without revealing originID Used for supplying cacheable contents 17 Secret originID & PSL Case One Case Two b.com a.com default originID Reject

This case may be useful for collaboration amongst websites. A Facebook principal at the client browser wants to share information with another website, say Yelp. This Facebook principal will create a new principal which is used for sharing and then gives the originID to Yelp. Yelp can join that principal with the originID. Operation: Join Another Website’s Principal WebSite 1 Case One Case Two WebSite 2 Can I join? Yes, send originID WebSite 1 WebSite 2 No. WebSite 2 WebSite 1 18

Outline Background and Motivation Design Implementation Evaluation Conclusion 19

Enforcing COP: Defining a Principal Access control methods or other isolation mechanisms are needed to make the boundary of a principal clear. bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { … if (m_protocol == other->m_protocol) { if (!m_domainWasSetInDOM && !other->m_domainWasSetInDOM) { if (m_host == other->m_host && m_port == other->m_port) return true; } else if (m_domainWasSetInDOM && other->m_domainWasSetInDOM) { if (m_domain == other->m_domain) return true; } Access Control in SOP Access Control in COP bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { if (m_originID!="" || other->originID()!="") { return m_originID == other->originID(); } else { SOP Access Control } 20

Outline Background and Motivation Design Implementation Evaluation – Deployment – Performance Conclusion 21

Using Proxy Assistance Proxy Assitance. CNN.com. Different Google Session. 22

Origin Spoofing Attack I top.postMessage(msg,PrincipalID) redirect In COP, those two gadgets have different OriginID and PrincipalID. source.origin.postMessage(replyMsg, PrincipalID)

Origin Spoofing Attack II 24 Malicious.comConnect.com Merged Principal Benign.com Request through Cross-origin Resource Sharing PSL:

Evaluation Performance Evaluation – Loading Time. – Breakdown of Loading Time. – Delay of Principal Operations. 25

Outline Background and Motivation Design Implementation Evaluation Conclusion 26

Conclusion The browser’s central security policy, same-origin policy (SOP), is questioned. We propose a new framework, which uses configurable origins that can be dynamically changed by the web server and its client side program. COP has negligible overhead and is easy to deploy. More details can be found at 27

Thank you! 28

BACKUP 29

Association of OriginIDs with Resources Origins for Resources from Servers. – HTTP Request. Communication inside the current principal (a request to a server in PSL): launched from the current principal with its originID. Join operation (a request to a server NOT in PSL): launched from the current principal with its originID and PSL Create Operation: launched from a different principal with that principal’s originID (usually empty). – HTTP Response. Empty originID in the request. – Create an oringinID Non-empty originID in the request. – Check and decide whether to join the principal. Origins for Dynamically-Generated Resources. HTTP/ OK Date: ******* Content-Type: text/html … originID: ********* OriginID with HTTP OriginID with HTML //Inheritance--create an iframe with the same originID my_iframe1=document.createElement("iframe"); document.getElementById("my_div").appendChild(my_iframe1); my_iframe1.contentDocument.write("...."); //Dynamic Generation--create an iframe with a different originID my_iframe2=document.createElement("iframe"); document.getElementById("my_div").appendChild(my_iframe2); my_iframe2.contentDocument.write("...."); my_iframe2.contentDocument.originID = generateOriginID(); 30

Discussion on Compatibility Compatibility with Existing Servers. – SOP is a special case of COP. Compatibility with Existing Client Browsers. – We convey originID in a protocol field not recognizing which older browsers will ignore. 31

document.domain Singh et al. show that document.domain can be insecure. Figure is from SINGH, K., MOSHCHUK, A., WANG, H., AND LEE, W. On the Incoherencies in Web Browser Access Control Policies. In 31st IEEE Symposium on Security and Privacy (Oakland) (2010). Original: y.a.com Eighteen out of one hundred top Alexa web sites are using document.domain. Effective: a.com 3.html 1.html main.html 2.html Original: a.com Effective: a.com Original: x.a.com Effective: a.com Original: x.a.com Effective: x.a.com (1) 1.html changes its domain. (2) 3.html changes its domain. (3) 3.html inject script into 1.html. (4) Script reads cookies from 2.html. (5) 1.html passes cookies to 3.html. 32

Cross-Origin AJAX Since AJAX requests obey SOP, the client’s browser cannot request a URL through XMLHTTPRequest from a different origin. Many proposals have been made in this regard. – Cross-origin resource sharing. – IETF Draft about HTTP Origin. 00#section #section-6 – XDomainRequest in IE8. us/library/dd573303%28VS.85%29.aspx us/library/dd573303%28VS.85%29.aspx 33

Summary for Fine-grained-ness of SOP Overall, all these problems exist because the same origin policy restricts cross-domain access. We aim to make cooperation between multiple origins easier and less error-prone. We will disallow document.domain and uses a configurable origin protocol to combine multiple SOP origins into one configurable origin. 34

Summary for Coarse-grained-ness of SOP SOP is sometimes too coarse for finer-grained origins. Many existing works have shown and solved the problem. We are going to design a big framework that can also solve the problem. Moreover, existing works cannot solve the combination of splitting and merging. For example, one Mashup from a.com may want to merge with another Mashup from b.com. 35

36 This join operation can be used in document.domain examples. For example, previously, and ads.cnn.com both change document.domain = “cnn.com” Now, principal at client side sends a request to ads.cnn.com with the principal’s originID. ads.cnn.com will agree to join the existing principal with the same originID.

Other Operations Communication inside a Principal. – Not restricted. Accompanied by originID. Communication between Principals. – postMessage channel – Object View (WWW 2010) Destroy a Principal. – Use close(). 37

OriginID and PrincipalID Generation The representation of originID is similar to that of a session cookie. – We will use the same way of generating a session ID. PrincipalID is a public representation of originID. – Once a principal is created, we will assign an arbitrary principalID for it. 38

Server Modification We modify the server so that resources in one web session will be allocated into one principal at client. Categories of Sessions. – Explicit sessions, also known as login sessions. Use session ID or identity cookie as originID. – Implicit sessions. We need to create our own originID. 39

Security Analysis OriginID Sniffing. – Use HTTPs. Mixing of COP and SOP. – Mixing two principles. Always use COP. – Mixing two sites. SOP is a special case of COP. 40

Association of OriginIDs with Communications Communications between Principals. – postMessage Channel. 41

Outline Background and Motivation Design Implementation Security Analysis Evaluation Conclusion 42

Formal Security Analysis A formal web security model based on Alloy by Akhawe et al. We switch same-origin policy to configurable origin policy in their model. Alloy is not able to find any counterexample. 43

Security Analysis Cross Site Request Forgery (CSRF). – Step One, the link needs to be imbedded in the website. – Step Two, the browser needs to send the request. – Step Three, the server (the bank in this case) needs to allow this action. In COP, the server will see the request is from different principal and thus reject it (Step Three). 44