secure cooperative sharing of javascript, browser, and physical resources benjamin livshits uc...

22
Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Upload: evangeline-ryan

Post on 18-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources

Benjamin Livshits

UC Berkeley

Leo Meyerovich, David Zhu

Page 2: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Web Application Security

lipstick on a pig?

Page 3: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

JIT compilers

partitioned hardware

Not Your Mother’s Browserbrowser kernels

Page 4: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Mashup Manifesto1. sharing requires control

2. sharing must be natural

3. sharing must be cheap

Page 5: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

What to Share?

diskHardware

JavaScript

Browser APIs parser, DOM, network, ...

Page 6: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

1. <CoFrame src=http://gadget.com/page id=gadget 2. passthroughBrowser="html css js" 3. delegatePhysical=".1 cpu"/> ...4. var toggle = true; 5. delegateBrowser(“network”, gadget, "http://gadget.com", 6. function () { if (toggle) return true; }); 7. function getData() { 8. toggle = false; 9. return "profile data"; } 10. aroundJS(gadget, getData, 11. function proceed (continue) { return continue(); });

Page 7: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

JS Sharing with Cross-Principal Advice

function getData

Function.prototype

Alice Bob

__proto__

Page 8: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

JS Sharing with Cross-Principal Advice

function getData

Function.prototype

__proto__

Alice Bob

Page 9: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

JS Sharing with Cross-Principal Advice

function getData

Function.prototype

__proto__

function proceed

execute

function defaultDeny

Messagesexecuteset fld val get fldaddField fld valremoveField fld

Alice Bob

set, get, …function proceed (continue) { return continue(); }

function defaultDeny (continue) { throw ‘err’ }

Page 10: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

JS Sharing with Cross-Principal Advice

function getData

Function.prototype

__proto__

function proceed

execute

function defaultDeny

Messagesexecuteset fld val get fldaddField fld valremoveField fld

Alice Bob

set, …, get

Page 11: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

JS Sharing with Cross-Principal Advice

function getData

Function.prototype

__proto__

function proceed

execute

function defaultDeny

Messagesexecuteset fld val get fldaddField fld valremoveField fld

Alice Bob

execute, set, get, addField, removeField

set, …, get

Cornelia

set, …

Page 12: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

browser

Browser API Sharing with Non-Tampering Advice

facebook.com

gadget.com

gadget.com

delegateBrowser(“network”, gadget, "http://gadget.com",

function () { if (toggle) return true; });

delegation: non-tampering advicefacebook.com

parser, DOM, CSS, ...

Page 13: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Physical Resource Sharing with TessellationOS

disk

layout

render

layout

render

layout

render

… … …

Page 14: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Mashup Manifesto1. sharing requires control

2. sharing must be natural

3. control must be cheap

Page 15: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Related Work

Physical Resource Sharing Resource Containers E Gazelle TessellationOS Chrome

JavaScript Sharing Caja MashupOS Object Views ConScript

Browser API Sharing OP Browser ConScript ServiceOS

Page 16: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

backup slides.

Page 17: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu
Page 18: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Sharing Browser APIs: Today

Facebook.comadvice

DOM (FFI)

Page 19: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

Sharing Browser APIs: Tomorrow

Facebook.com

DOM (FFI)

advice

browser

kernel

Page 20: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

container.com

gadget.com

BROWSER

Page 21: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

container.com

gadget.com

gadget.com

BROWSER

gadgetfork

bomb!!!

YouTubepolicy?

Page 22: Secure Cooperative Sharing of JavaScript, Browser, and Physical Resources Benjamin Livshits UC Berkeley Leo Meyerovich, David Zhu

container.com

gadget.com

gadget.com

BROWSER

A New Hope