OMash: Enabling Secure Web Mashups via Object Abstractions Steven Crites, Francis Hsu, Hao Chen (UC Davis) ACM Conference on Computer and Communications.

Slides:



Advertisements
Similar presentations
Presented by Vaibhav Rastogi. Current browsers try to separate host system from Web Websites evolved into web applications Lot of private data on the.
Advertisements

Enabling Secure Internet Access with ISA Server
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.
Java Script Session1 INTRODUCTION.
Path Cutter: Severing the Self-Propagation Path of XSS JavaScript Worms in Social Web Networks Yinzhi Cao, Vinod Yegneswaran, Phillip Porras, and Yan Chen.
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
EECS 354 Network Security Cross Site Scripting (XSS)
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.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
OCT1 Principles From Chapter One of “Distributed Systems Concepts and Design”
Web Same-Origin-Policy Lab Zutao Zhu 11/06/2009. Outline Background Setting SOP.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Chapter 6: Hostile Code Guide to Computer Network Security.
Phu H. Phung Chalmers University of Technology JSTools’ 12 June 13, 2012, Beijing, China Joint work with Lieven Desmet (KU Leuven)
1 Subspace: Secure Cross Domain Communication for Web Mashups Collin Jackson and Helen J. Wang Mamadou H. Diallo.
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)
4.1 JavaScript Introduction
JavaScript & jQuery the missing manual Chapter 11
Origins, Cookies and Security – Oh My! John Kemp, Nokia Mobile Solutions.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
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.
Robust Defenses for Cross-Site Request Forgery CS6V Presented by Saravana M Subramanian.
SOMA: Mutual Approval for Included Content in Web Pages Terri Oda, Glenn Wurster, P.C. van Oorschot, Anil Somayaji Carleton Computer Security Lab Carleton.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Working with Cookies Managing Data in a Web Site Using JavaScript Cookies* *Check and comply with the current legislation regarding handling cookies.
International Telecommunication Union Geneva, 9(pm)-10 February 2009 ITU-T Security Standardization on Mobile Web Services Lee, Jae Seung Special Fellow,
OMash: Enabling Secure Web Mashups via Object Abstractions Steven Crites, Francis Hsu, Hao Chen UC Davis.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Cross Site Integration “mashups” cross site scripting.
Robust Defenses for Cross-Site Request Forgery
2011/12/20 1 Tongbo Luo, Hao Hao, Wenliang Du, Yifei Wang, and Heng Yin Syracuse University ACSAC 2011.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
SMash : Secure Component Model for Cross- Domain Mashups on Unmodified Browsers WWW 2008 Frederik De Keukelaere et al. Presenter : SJ Park.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
1 Robust Defenses for Cross-Site Request Forgery Adam Barth, Collin Jackson, John C. Mitchell Stanford University 15th ACM CCS.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
THE DEVIL IS IN THE (IMPLEMENTATION) DETAILS: AN EMPIRICAL ANALYSIS OF OAUTH SSO SYSTEMS SAN-TSAI SUN & KONSTANTIN BEZNOSOV PRESENTED BY: NAZISH KHAN COMPSCI.
M. Alexander Helen J. Wang Yunxin Liu Microsoft Research 1 Presented by Zhaoliang Duan.
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.
Cross-site request forgery Collin Jackson CS 142 Winter 2009.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Front end (user interfaces) Facilitating the user‘s interaction with the SandS services and processes I. Mlakar, D. Ceric, A. Lipaj Valladolid, 17/12/2014.
Protection and Communication Abstractions for Web Browsers in MashupOS Helen J. Wang, Xiaofeng Fan, Jon Howell (MSR) Collin Jackson (Stanford) February,
AJAX Use Cases for WSRP Subbu Allamaraju BEA Systems Inc WSRP F2F Meeting, May 2006.
CSRF Attacks Daniel Chen 11/18/15. What is CSRF?  Cross Site Request Forgery (Sea-Surf)  AKA XSRF/ One Click / Sidejacking / Session Riding  Exploits.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites Paper by Sooel Son and Vitaly Shmatikov, The University of Texas.
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
WWW and HTTP King Fahd University of Petroleum & Minerals
World Wide Web policy.
Security mechanisms and vulnerabilities in .NET
Cross-Site Request Forgeries: Exploitation and Prevention
Riding Someone Else’s Wave with CSRF
ASP.NET Module Subtitle.
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Cross Site Request Forgery New Attacks and Defenses
Cross-Site Scripting Attack (XSS)
Cross Site Request Forgery (CSRF)
Presentation transcript:

OMash: Enabling Secure Web Mashups via Object Abstractions Steven Crites, Francis Hsu, Hao Chen (UC Davis) ACM Conference on Computer and Communications Security (CCS), 2008 Presenter: Fu-Chi Ao

Outline Introduction The Same Origin Policy Design Usage Examples Implementation Related Work Conclusion and Comments 2009/7/172

Introduction (1/2) Even before the rise of AJAX and mashups, at any given time a web browser likely contained pages from different domains Same Origin Policy (SOP) – Used by web browsers – Not support secure cross-domain communication desired by web mashup developer – Supports only 2 states Full trust: third-party content runs with full privilege No trust: no communication is allowed 2009/7/173

Introduction (2/2) OMash – New abstraction and access control model for writing secure yet flexible mashup applications Provide mashup developers with the ability to allow safe, controlled communication and interaction between web sites, and allow for the various trust models they desire – Does not rely on the SOP – Supports backwards compatibility – Tested on Mozilla Firefox /7/174

The Same Origin Policy (1/2) a.com b.com Server Browser   2009/7/175

The Same Origin Policy (2/2) Applied to protect three browser resources: – Documents: Sites from one origin cannot access documents from another origin via the Document Object Model – Cookies: Sites can only set their own cookies and cookies are only sent to their originating site in HTTP requests. – Access to remote services: Only permits XMLHttpRequest to issue requests to the origin of the containing document. allows a script to issue an asynchronous HTTP request to a remote server. 2009/7/176

Problems of SOP: DOM Access Extended to Domain Name System (DNS) domains and relies on it DNS Insecurity – Client vulnerabilities DNS rebinding (Jackson et al, CCS 07) Dynamic Pharming (Karlof et al, CCS 07) – Server vulnerabilities DNS cache poisoning (Kaminsky, BlackHat 08) 2009/7/177

Problems of SOP: Authentication Credentials Confused Deputy – When a request is made, cookies matching the destination domain are added to the request as well as any other form of HTTP Authentication (e.g. Basic, Digest, NTLM) information for the domain – Regardless of what page caused the browser to initiate this request – Causes Cross-Site Request Forgery (CSRF) attacks 2009/7/178

Cross-Site Request Forgery a.com b.com Server Browser 2009/7/179

Trust Levels Wang et al. in MashupOS enumerate all the possible trust levels available between integrators and providers – (1) isolated content that should be isolated from other domains – (2) access-controlled content that should be isolated but allows for mediated access via, e.g. message passing – (3) (and (5)) open content that any domain can access and integrate into itself 1 – (4) unauthorized content that has no privileges of any domain. Table 1: The Trust Model on the Web for a provider P and an integrator I as defined in MashupOS 2009/7/1710

OMash Design Analog to OOP languages Treat each web page as an object that declares public and private data and methods – A web page can only access its own content and the public content of another page – All data in the page are considered private by default To enable inter-page communication, a page may declare a public interface, getPublicInterface, which all pages can access 2009/7/1711

Object Abstractions Java (analogy) Web page object public class FooObject { public void publicMethod() { } private int privateData; } function getPublicInterface() { function Interface() { this.publicMethod = function () {…} } return new Interface(); } var privateData; 2009/7/1712

Page Objects A web page consists of – DOM tree – Scripts – Credentials (HTTP authentication token, e.g. cookies) A page object can be contained in a – Window – Frame – Iframe 2009/7/1713

Public and Private Members Public interface – Each object declares getPublicInterface() – Returns a closure of all public methods and data An expression (typically a function) that can have free variables together with an environment that binds those variables Using closures, pages can safely get and set information on other pages in a controlled manner Private data – DOM objects (document, etc.) – JavaScript objects and functions – Credentials (HTTP authentication token, e.g. cookies) 2009/7/1714

Provider and Integrator Communicate via the Public Interface map.html integrator.html function getPublicInterface() { function Interface() { this.setCenter = function (lat,long){ … } return new Interface(); }... var win = getElementByID(“inner”).conte ntWindow; var map = win.getPublicInterface();... map.setCenter(lat, long); } map.html integrator.html 2009/7/1715

Mediate DOM Access By using the getPublicInterface function, a page’s creator can specify what they want other pages to be able to access Using this approach, the mashup developer can model a variety of trust relationships – Isolated content – Access-controlled content – Open content – Unauthorized content 2009/7/1716

No access between provider and integrator Isolated function getPublicInterface() { function Interface() { } return new Interface(); } 2009/7/1717

Limited access depending on caller Provide methods for the returned interface that only allow access to a site’s content based on the caller’s credentials Access-controlled function getPublicInterface() { function Interface() { this.auth = function(user,pass) { return token; } this.do = function (token,...) { check(token); } } return new Interface(); } var api = win.getPublicInterface(); token = api.auth(user, pass); api.do (token,...) Provider Integrator 2009/7/1718

Open Full access between provider and integrator function getPublicInterface() { function Interface() { this.getDocument = function () { return document; } return new Interface(); } 2009/7/1719

Unauthorized map.html, which provides a map service outer.html, which uses the service provided by the code in map.html map.html outer.html  isolate the untrusted script library (provided content) within another page 2009/7/1720

Mediate Authentication Credentials HTTP authentication (e.g. Basic, Digest, NTLM) – When authentication information (HTTP or a cookie) comes in, the browser associates this information with the page that receives it, page P Cookies – The only cookies we want to treat this way are those that are used for authentication. – Modification : Add extra attribute Authentication Session cookies are associated with a page when they are set Persistent cookies are associated with the first user-opened page XMLHttpRequest – Malicious sites can no longer leverage CSRF – Can logg in with 2 different accounts at the same time – Can accomplish safe cross-domain data exchange by lifting the restriction of XHR 2009/7/1721

Browser Sessions under OMash Each cookie – Belongs to a window – Is shared by subsequent pages from the same domain in that window Each window has an independent session – Desirable side effect: Can log in to multiple accounts in different windows in the same browser 2009/7/1722

Cross-window Sessions How to track a session across windows? Cookie Inheritance – When page P1 loads P2, P2 inherits P1’s cookies – P1 and P2 now belong to the same session 2009/7/1723

Preventing CSRF a.com b.com Server Browser 2009/7/1724

Preventing CSRF a.com b.com Server Browser 2009/7/1725

Preventing CSRF a.com b.com Server Browser No cookie! 2009/7/1726

Backward Compatibility with the Same Origin Policy If application prefers using SOP to allow inter- page communication: To implement this under OMash – Server embeds a shared secret in all pages – Pages authenticate each other using this secret 2009/7/1727

Supporting SOP without DNS secret = “1234”; function getPublicInterface() { function Interface() { this.foo=function (secret, … ) { check(secret); … } } return new Interface(); } secret = “1234” api = win.getPublicInterface() api.foo(secret, …) ProviderIntegrator 2009/7/1728

(b) outer.html. It authenticates by providing the argument secret in the call to the provider. (a) inner.html. The function foo authenticates the caller by checking the parameter provided Secret against the embedded global variable secret. 2009/7/1729

Implementation Implemented and tested on Firefox 2 Proof of concept as Firefox add-on – Use Mozilla’s Configurable Security Policies(CAPS) system to allow the cross-domain access to the getPublicInterface allow users to set up security policies for the browser, and also have different security policies for different Internet sites – Use Firefox 2’s Session store API to make each cookie private to a window No changes required on the server 2009/7/1730

Related Work MashupOS (Wang et al, SOSP 07) – Rely on the Same Origin Policy for controlling DOM accesses or cross-domain data exchange – Requires browser writers and application developers to support and use several different abstractions SMash (Keukelaere WWW 07) – Isolates components using the iframe tag, and URL fragment identifiers allow the frames to establish communication links. Google’s Caja – Also allows web applications of different trust domains to directly communicate with JavaScript function calls and reference passing 2009/7/1731

Conclusion and Comments OMash is a new browser security model – Allows flexible trust relation – Simple – Familiar, easy to understand – Backward compatible Don’t rely on Same Origin Policy – Prevent CSRF attacks – Allows programmers to define “Same Origin” flexibly based on shared secrets 2009/7/1732