Protection and Communication Abstractions for Web Browsers in MashupOS Helen J. Wang, Xiaofeng Fan, Jon Howell (MSR) Collin Jackson (Stanford) February,

Slides:



Advertisements
Similar presentations
Nick Feamster CS 6262 Spring 2009
Advertisements

Protecting Browser State from Web Privacy Attacks Collin Jackson, Andrew Bortz, Dan Boneh, John Mitchell Stanford University.
Presented by Vaibhav Rastogi. Current browsers try to separate host system from Web Websites evolved into web applications Lot of private data on the.
Operating System Security
Expressive Privacy Control with Pseudonyms Seungyeop Han, Vincent Liu, Qifan Pu, Simon Peter, Thomas Anderson, Arvind Krishnamurthy, David Wetherall University.
Building web applications on top of encrypted data using Mylar Presented by Tenglu Liang Tai Liu.
Protecting Browsers from Cross-Origin CSS Attacks Lin-Shung Huang, Zack Weinberg Carnegie Mellon University Chris Evans Google Collin Jackson Carnegie.
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.
Georgios Kontaxis, Michalis Polychronakis Angelos D. Keromytis, Evangelos P. Markatos Siddhant Ujjain (2009cs10219) Deepak Sharma (2009cs10185)
Presented by Vaibhav Rastogi.  Advent of Web 2.0 and Mashups  Inclusion of untrusted third party content a necessity  Need to restrict the functionality.
An Evaluation of the Google Chrome Extension Security Architecture
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
Mitigating Malware Collin Jackson CS142 – Winter 2009.
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.
Secure web browsers, malicious hardware, and hardware support for binary translation Sam King.
On the Incoherencies in Web Browser Access Control Policies Authors: Kapil Singh, et al Presented by Yi Yang.
Blackbox Reversing of XSS Filters Alexander Sotirov ekoparty 2008.
The Most Dangerous Code in the Browser Stefan Heule, Devon Rifkin, Alejandro Russo, Deian Stefan Stanford University, Chalmers University of Technology.
Privacy and Security on the Web Part 1. Agenda Questions? Stories? Questions? Stories? IRB: I will review and hopefully send tomorrow. IRB: I will review.
Protection and Communication Abstractions for Web Browsers in MashupOS Helen J. Wang (Microsoft Research), Xiaofeng Fan (Microsoft Research), Jon Howell.
CROSS SITE SCRIPTING..! (XSS). Overview What is XSS? Types of XSS Real world Example Impact of XSS How to protect against XSS?
Happy Hacking HTML5! Group members: Dongyang Zhang Wei Liu Weizhou He Yutong Wei Yuxin Zhu.
Frame isolation and the same origin policy Collin Jackson CS 142 Winter 2009.
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,
Web Services & Widgets Godmar Back. Mash-Ups Applications that combine information from different sources in one web page Different architectural choices.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Presented by…. Group 2 1. Programming language 2Introduction.
FLOWFOX A WEB BROWSER WITH FLEXIBLE AND PRECISE INFORMATION CONTROL.
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.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
Ladd Van Tol Senior Software Engineer Security on the Web Part One - Vulnerabilities.
1 All Your iFRAMEs Point to Us Mike Burry. 2 Drive-by downloads Malicious code (typically Javascript) Downloaded without user interaction (automatic),
BLUEPRINT: Robust Prevention of Cross-site Scripting Attacks for Existing Browsers Mike Ter Louw, V.N. Venkatakrishnan University of Illinois at Chicago.
JavaScript, Fourth Edition
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Web Mashups -Nirav Shah.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
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.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Georgios Kontaxis‡, Michalis Polychronakis‡, Angelos D. Keromytis‡, and Evangelos P.Markatos* ‡Columbia University and *FORTH-ICS USENIX-SEC (August, 2012)
Copyright © cs-tutorial.com. Overview Introduction Architecture Implementation Evaluation.
C C Implementation  Prototype based on Firefox 3.0b2 codebase/ Spidermonkey VM  Uses SM contexts to manage multiple JavaScript execution contexts simultaneously.
Building Secure Web Applications With ASP.Net MVC.
By Sean Rose and Erik Hazzard.  SQL Injection is a technique that exploits security weaknesses of the database layer of an application in order to gain.
Cross Site Scripting and its Issues By Odion Oisamoje.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
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.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
1 Isolating Web Programs in Modern Browser Architectures CS6204: Cloud Environment Spring 2011.
Trevor Jim Nikhil Swamy Michael Hicks Defeating Script Injection Attacks with Browser-Enforced Embedded Policies Jason FroehlichSeptember 24, 2008.
Protection and Communication Abstractions for Web Browsers in MashupOS Helen J. Wang, Xiaofeng Fan, Jon Howell (MSR) Collin Jackson (Stanford) February,
Cloud Environment Spring  Microsoft Research Browser (2009)  Multi-Principal Environment with Browser OS  Next Step Towards Secure Browser 
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.
Javascript worms By Benjamin Mossé SecPro
CSCE 548 Student Presentation Ryan Labrador
TMG Client Protection 6NPS – Session 7.
Web Mashups -Nirav Shah.
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
World Wide Web policy.
CSC 495/583 Topics of Software Security Web Browser Security (2)
Presentation transcript:

Protection and Communication Abstractions for Web Browsers in MashupOS Helen J. Wang, Xiaofeng Fan, Jon Howell (MSR) Collin Jackson (Stanford) February,

2

3 … but most of all, Samy is my hero

4

Outline The problem The MashupOS project Protection Communication Implementation and demo Evaluation Related work Conclusions 5

Client Mashups Web content has evolved from single-principal services to multi-principal services, rivaling that of desktop PCs. Principal is domain 6

Browsers Remain Single-Principal Systems The Same Origin Policy (SOP), an all-or- nothing trust model: –No cross-domain interactions allowed –(External) scripts run with the privilege of the enclosing page 7 <iframe src=“ <script src=“ X

Insufficiency of the SOP Sacrifice security for functionality when including an external script without fully trusting it E.g., iGoogle, Live gadget aggregators’ inline gadget 8

Insufficiency of the SOP, Cont. Third-party content sanitization is hard –Cross site scripting (XSS): Unchecked user input in a generated page E.g., Samy worm: infected 1 million MySpace.com users in 20 hours Root cause: –The injected scripts run with the page’s privilege 9 Samy is my hero

Insufficiency of the SOP, Cont. Sacrifice functionality for security when denying scripts in third-party content E.g., MySpace.com disallows scripts in user profiles 10

The MashupOS Project Enable browser to be a multi-principal OS Focus of this paper: protection and communication abstractions Protection: –Provide default isolation boundaries Communications: –Allow service-specific, fine-grained access control across isolation boundaries 11

Design Principles Match all common trust levels to balance ease-of-use and security –Goal: enable programmers to build robust services –Non-goal: make it impossible for programmers to shoot themselves in the foot Easy adoption and no unintended behaviors 12

Outline The problem The MashupOS project Protection Communication Implementation and demo Evaluation Related work Conclusions 13

A Principal’s Resources Memory: –heap of script objects including DOM objects that control the display Persistent state: –cookies, etc. Remote data access: –XMLHttpRequest 14

Trust Relationship between Providers and Integrators i.com Content Semantics AbstractionRun- as 15 p.comi.com Internet HTML XHR X X No Isolated p.com <iframe src=“ X

Trust Relationship between Providers and Integrators i.com Content Semantics AbstractionRun- as 16 p.comi.com Internet Script XHR No Isolated p.com Yes Open i.com <script src=“

Trust Relationship between Providers and Integrators i.com Content Semantics AbstractionRun- as 17 p.comi.com Internet No Isolated p.com Yes Open i.com NoYes X

Trust Relationship between Providers and Integrators 18 p.comi.com Internet X X XHR None YesNo Unauthorized Unauth X XHR i.com Content Semantics AbstractionRun- as No Isolated p.com Yes Open i.com NoYes Unauthorized content is not authorized to access any principal’s resources. <sandbox src=“

Properties of Sandbox Asymmetric access –Access: reading/writing script global objects, function invocations, modifying/creating DOM elements inside the sandbox Invoking a sandbox’s function is done in the context of the sandbox –setuid (“unauthorized”) before invocation and setuid (“enclosingPagePrincipal) upon exit The enclosing page cannot pass non-sandbox object references into the sandbox. –Programmers can put needed objects inside the sandbox Private vs. Open sandboxes 19

Private Sandbox Content if tag not supported Belongs to a domain and can only be accessed by that domain –E.g., private location history marked on a map Private sandboxes cannot access one another even when nested –Otherwise, a malicious script can nest another private sandbox and access its private content 20

Open Sandbox Content if tag not supported Can be accessed by any domain Can access its descendant open sandboxes --- important for third party service composition –E.g., containing a map; don’t want an to tamper hotmail.com; don’t want the map library to tamper the 21

Provider-Browser Protocol for Unauthorized Content Unauthorized content must be sandboxed and must not be renderable by frames –Otherwise, unauthorized content would run as the principal of the frame MIME protocol seems to be what we want: –Require providers to prefix unauthorized content subtype with x-privateUnauthorized+ or x-openUnauthorized+ –E.g., text/html  text/x-privateUnauthorized+html –Verified that Firefox cannot render these content types with and –But, IE’s MIME sniffing allows rendering sometimes Alternative: encraption (e.g., Base64 encoding) Prevent providers from unintentionally publishing unauthorized content as other types of content: –Constrain sandbox to take only unauthorized content 22

Key Benefits of Sandbox Safe mashups with ease Beneficial to host third-party content as unauthorized content 23

Sandbox for Safe Mashups with Ease 24 // local script to Mashup.com // calling functions in a.js and b.js … X X

Hosting Third-Party Content as Unauthorized Content Combats cross site scripting attacks in a fundamental way –Put user input into a sandbox –Does not have to sacrifice functionality Helps with Web spam –Discount the score of hyperlinks in third party content 25

Outline The problem The MashupOS project Protection Communication Implementation & demo Evaluation Related work Conclusions 26

Communications Message passing across the isolation boundaries enable custom, fine-grained access control 27 Isolated a.comb.com CommRequest Unauthorized CommRequest

Server: server = new CommServer(); server.listenTo(“aPort”, requestHandlerFunction); Client: req = new CommRequest(); req.open (“INVOKE”, “local: isSynchronous); req.send (requestData); req.onreadystatechange = function () { …} 28

CommRequest vs. XMLHttpRequest Cross domain Source labeled No cookies sent “Server” can be on client Reply from remote server tagged with special MIME type Syntax similar to socket API and XHR 29

Outline The problem The MashupOS project Protection Communication Implementation & demo Evaluation Related work Conclusions 30

Implementation Use frames as our building blocks, but we apply our access control 31 Script Engine MashupOS Script Engine Proxy MashupOS MIME Filter Script execution DOM object access DOM object update Original HTML MashupOS transformed HTML HTML Layout Engine

Evaluation: Showcase Application PhotoLoc, a photo location service –Mash up Google’s map service and Flickr’s geo-tagged photo gallery service –Map out the locations of photographs taken PhotoLoc doesn’t trust flickr nor gmap 32

PhotoLoc/index.htm function setPhotoLoc(request) { var coordinate = request.body; var latitude = getLatitude (coordinate); var longitude = getLongitude (coordinate); G.map.setCenter(new GLatLng(latitude, longitude), 6); } var svr = new CommServer(); svr.listenTo(“recvLocationPort”, setPhotoLoc); 33 Direct access CommRequest

Demo 34

Evaluation: Prototype Performance Microbenchmarking for script engine proxy –Negligible overhead for no or moderate DOM manipulations –33%--82% overhead with heavy DOM manipulations Macrobenchmark measures overall page- loading time using top 500 pages from the top click-through search results of MSN search from 2005 –shows no impact Anticipate in-browser implementation to have low overhead 35

Outline The problem The MashupOS project Protection Communication Implementation & demo Evaluation Related work Conclusions 36

Related work Crockford’s –Symmetric isolation with socket-like communication with the enclosing page Wahbe et al’s Software Fault Isolation –Asymmetric access though never leveraged –Primary goal was to avoid context switches for untrusted code in a process Cox et al’s Tahoma browser operating system uses VM to –Protect the host system from browser and web services –Protect web applications (a set of web sites) from one another 37

Future Work Robust implementation of the protection model Tools to detect whether a browser extension violates the browser’s protection model Tools for ensuring proper segregation of different content types Resource management, OS facilities 38

Conclusions Web content involves multiple principals Browsers remain a single principal platform The missing protection abstraction: Unauthorized content and –Enable safe mashups with ease –Combats cross-site scripting in a fundamental way CommRequest allows fine-grained access control across isolation boundaries Practical for deployment 39

Thank you! 40