Frame isolation and the same origin policy Collin Jackson CS 142 Winter 2009.

Slides:



Advertisements
Similar presentations
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
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.
ForceHTTPS: Protecting High-Security Web Sites from Network Attacks Collin Jackson and Adam Barth.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Building web applications on top of encrypted data using Mylar Presented by Tenglu Liang Tai Liu.
Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 4: Web Browsing.
EECS 354 Network Security Cross Site Scripting (XSS)
Lesson 4: Web Browsing.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
ACTIVE X By Ethan Huang. OUTLINE What is ActiveX? Component of ActiveX Why ActiveX? ActiveX and Java Security Issue.
Beware of Finer-Grained Origins
Happy Hacking HTML5! Group members: Dongyang Zhang Wei Liu Weizhou He Yutong Wei Yuxin Zhu.
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,
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Presented by…. Group 2 1. Programming language 2Introduction.
IT 210 The Internet & World Wide Web introduction.
Towards a Formal Foundation of Web Security devdatta akhawe / adam barth / peifung eric lam john mitchell / dawn song.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
HTML5 Group 3: Dongyang Zhang, Wei Liu, Weizhou He, Yutong Wei, Yuxin Zhu.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
© Neeraj Suri EU-NSF ICT March 2006 DEWSNet Dependable Embedded Wired/Wireless Networks MUET Jamshoro Browser Security Model Faisal Karim Shaikh DEWSNet.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
CSCE 201 Web Browser Security Fall CSCE Farkas2 Web Evolution Web Evolution Past: Human usage – HTTP – Static Web pages (HTML) Current: Human.
1 Welcome to CSC 301 Web Programming Charles Frank.
Grid Chemistry System Architecture Overview Akylbek Zhumabayev.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
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.
Protecting Browsers from DNS Rebinding Attacks Collin Jackson, Adam Barth, Andrew Bortz ACM CCS Systems Modeling & Simulation Lab. Kim.
RUBRIC IP1 Ruben Botero Web Design III. The different approaches to accessing data in a database through client-side scripting languages. – On the client.
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,
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 pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
WHAT IS E-COMMERCE? E-COMMERCE is a online service that helps the seller/buyer complete their transaction through a secure server. Throughout the past.
JavaScript and Ajax (Internet Background) Week 1 Web site:
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 HTML5Websites Sooel Son and Vitaly Shmatikov The University of Texas at Austin 20.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Browser code isolation John Mitchell CS 155 Spring 2016.
By Collin Donaldson. Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you own. 2.You gain explicit,
The Postman Always Rings Twice: Attacking and Defending postMessage in HTML5 Websites Paper by Sooel Son and Vitaly Shmatikov, The University of Texas.
Browser Security Model *original slides by prof. John Mitchell.
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
Browser Security Model
JavaScript and Ajax (Internet Background)
Lesson 4: Web Browsing.
CSC 495/583 Topics of Software Security Web Browser Security (2)
Browser code isolation
Lesson 4: Web Browsing.
Cross Site Request Forgery New Attacks and Defenses
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
Introduction to JavaScript
Cross Site Request Forgery (CSRF)
Presentation transcript:

Frame isolation and the same origin policy Collin Jackson CS 142 Winter 2009

Outline Security User Interface Goals of a browser When is it safe to type my password? Same-Origin Policy How sites are isolated Opting out of isolation Navigation Frame hijacking Navigation policy

3 Running Remote Code is Risky Integrity Compromise your machine Install malware rootkit Transact on your accounts Confidentiality Read your information Steal passwords Read your

4 Browser Sandbox Goal Run remote web applications safely Limited access to OS, network, and browser data Approach Isolate sites in different security contexts Browser manages resources, like an OS

5 Security User Interface When is it safe to type my password?

Safe to type your password? 6

7

8

9 ???

Safe to type your password? 10

Frames Modularity Brings together content from multiple sources Client-side aggregation Delegation Frame can draw only on its own rectangle src = 7.gmodules.com/... name = remote_iframe_7 src = google.com/… name = awglogin

Popup windows With hyperlinks click here With JavaScript mywin = window.open(“ “foo”, “width=10,height=10”) Navigating named window re-uses existing one Can access properties of remote window: mywin.document.body mywin.location = “

Windows Interact 13

Are all interactions good? 14

15 Same-Origin Policy How does the browser isolate different sites?

Policy Goals Safe to visit an evil web site Safe to visit two pages at the same time Address bar distinguishes them Allow safe delegation

Same Origin Policy Origin = protocol://host:port Full access to same origin Full network access Read/write DOM Storage (more on Weds.) Assumptions? Site A Site A context

Library import Script has privileges of imported page, NOT source server. Can script other pages in this origin, load more scripts Other forms of importing VeriSign

Data export Many ways to send information to other origins No user involvement required Cannot read back response

Domain Relaxation Origin: scheme, host, (port), hasSetDomain Try document.domain = document.domain chat.facebook.com facebook.com

Recent Developments Cross-origin network requests Access-Control-Allow-Origin: Access-Control-Allow-Origin: * Cross-origin client side communication Client-side messaging via navigation (older browsers) postMessage (newer browsers) Site B Site A Site A contextSite B context

window.postMessage New API for inter-frame communication Supported in latest betas of many browsers A network-like channel between frames Add a contact Share contacts

postMessage syntax frames[0].postMessage("Attack at dawn!", " window.addEventListener("message", function (e) { if (e.origin == " {... e.data... } }, false); Facebook Anecdote Facebook Anecdote Attack at dawn!

24 Navigation Who decides what content goes in a frame?

25 A Guninski Attack awglogin window.open(" "awglogin");

What should the policy be? 26 Child Sibling Descendant Frame Bust

BrowserPolicy IE 6 (default)Permissive IE 6 (option)Child IE7 (no Flash)Descendant IE7 (with Flash)Permissive Firefox 2Window Safari 3Permissive Opera 9Window HTML 5Child Legacy Browser Behavior

Window Policy Anomaly top.frames[1].location = " top.frames[2].location = "

BrowserPolicy IE7 (no Flash)Descendant IE7 (with Flash)Descendant Firefox 3Descendant Safari 3Descendant Opera 9(many policies) HTML 5Descendant Adoption of Descendant Policy

Why include “targetOrigin”? What goes wrong? frames[0].postMessage("Attack at dawn!"); Messages sent to frames, not principals When would this happen? 30

Conclusion Same origin policy is flexible Address bar reflects the principal that's in control Content may be affected by other principals Delegation Library import Domain relaxation Pixel delegation via frames Communication Data export Opt-in messaging

Reading Securing Browser Frame Communication. Adam Barth, Collin Jackson, and John C. Mitchell iki/Part2#Same-origin_policy