+ All Categories
Home > Documents > The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: –...

The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: –...

Date post: 28-Aug-2019
Category:
Upload: dotram
View: 216 times
Download: 0 times
Share this document with a friend
30
The Multi-Principal OS Construction of the Gazelle Web Browser Helen J. Wang, Chris Grier, Alex Moshchuk, Sam King, Piali Choudhury, Herman Venter
Transcript
Page 1: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

The Multi-Principal OS Construction of the Gazelle Web Browser

Helen J. Wang, Chris Grier, Alex Moshchuk, Sam King, Piali Choudhury, Herman Venter

Page 2: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Browser as an application platform

•  Single stop for many computing needs –  banking, shopping, office tasks, social networks, entertainment

•  Static document browsing rich programs –  obtained from mutually distrusting origins

–  same-origin policy: a browser is a multi-principal platform where web sites are principals

•  Browser = prime target of today’s attackers

Page 3: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Your valuables are online!

•  Existing browser security mentality: –  valuables on local machine –  protect local machine from the web

•  This work’s mentality: –  valuables online –  must also protect web site principals

from one another

Browser

OS

Browser

OS

Page 4: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Browser design requires OS thinking

•  Cross-principal protection is an essential function of an operating system

•  Fundamental flaw with existing browser designs: –  OS logic is intermingled with application-specific content processing –  consequences:

•  unreliable cross-principal protection •  many vulnerabilities

HTML parsing

DOM

browser

rendering

JS engine

same-origin protection

Persistent state

network access

Page 5: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Gazelle

•  An OS exclusively manages: –  protection across principals –  resource allocation –  resource access control

•  Our approach for designing Gazelle: –  take all OS functionality out of content processing logic –  put it into a small, simple browser kernel

rendering same-origin protection

Persistent state

network access

Browser kernel

DOM

HTML parsing JS engine

Page 6: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Gazelle

•  Build the browser as a multi-principal OS –  label principals according to web site origins –  enforce strong isolation among principals

•  apply to all resources •  apply to all types of web content

•  Challenge: correctly handle web’s embedding model (cross-origin mashups) –  implications for managing display and other resources

a.co

m

b.co

m

c.co

m

Page 7: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Outline

•  Motivation •  Gazelle’s design

–  defining the principals –  protection architecture –  securing the display

•  Implementation •  Evaluation

Page 8: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Defining the principals

•  Gazelle’s principal corresponds to a web site origin –  origin = <protocol, domain, port>: http://www.news.com:80

•  Principal = unit of protection

shop.com/index.html shop.com

Page 9: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Labeling embedded content •  <scripts>, stylesheets

–  a library abstraction –  runs as includer

•  <iframe>, <frame>, <object>, <img> –  runs as provider –  same principal definition for plug-in content

<iframe src=“ad.com/ad.html”>

<object src=“youtube.com/v.swf”>

youtube.com

shop.com/index.html shop.com

ad.com

Page 10: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Principal instances

•  Can have multiple instances of same principal •  A principal instance is:

–  the unit of failure containment –  the unit of resource allocation

•  Principal instances of the same principal share persistent state

shop.com/1 shop.com/2

Tab 1 Tab 2

shop.com

Page 11: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Architecture

•  Browser kernel: –  exclusively manages principals and all system resources

•  processes, network, storage, display, IPC, system events

–  enforces all security policies

shop.com ad.com youtube.com

G a z e l l e s y s t e m c a l l s

Browser kernel process

OS

Principal instance

libflash

Principal instance

libweb

Principal instance

libweb

ad.com

shop.com/index.html

shop.com

youtube.com

Page 12: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Architecture

•  Principal instances: –  perform all content processing –  access resources through system calls to browser kernel –  reside in sandboxed processes

sandboxed OS process

shop.com ad.com youtube.com

G a z e l l e s y s t e m c a l l s

Browser kernel process

OS

Principal instance

libflash

Principal instance

libweb

Principal instance

libweb

ad.com

shop.com/index.html

shop.com

youtube.com

Page 13: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Architecture

•  Principal instances: –  perform all content processing –  access resources through system calls to browser kernel –  reside in sandboxed processes

G a z e l l e s y s t e m c a l l s

Browser kernel process

OS

Principal instance

libflash

Principal instance

libweb

Principal instance

libweb

shop.com/index.html

… … … …

multiple tabs

Page 14: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Gazelle’s security and robustness benefits

IE 8 & Google Chrome:

•  Security goal: protect host machine •  Multiple processes are for reliable browsing sessions •  Security decisions made in rendering process

shop.com ad.com youtube.com

Principal instance

libflash

Principal instance

libweb

Principal instance

libweb

Rendering process for shop.com

shop.com youtube.com

ad.com

8

shop.com

youtube.com ad.com

… …

multiple tabs

Page 15: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Architectural implications

•  Gazelle naturally provides principal-based isolation for: –  all resources

•  network, display, memory, persistent state, etc.

–  all types of web content •  HTML, JavaScript, images, plug-in content, etc.

•  This differs from today’s browser policies –  often inconsistent across resources –  e.g., cookies, scripts (document.domain exception)

•  Achieving backward compatibility is a policy issue –  can achieve through cross-principal communication –  this work: focus on architectural issues –  future work: balance backward compatibility and security

Page 16: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Embedding cross-principal content •  Powerful paradigm in modern web •  Key deviation from the desktop model •  Implications for browser’s resource allocation:

–  display (next) –  other resources: CPU, memory, network (not in this talk)

youtube.com

shop.com/index.html shop.com

ad.com

Page 17: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

•  Browser kernel manages the display –  browser kernel doesn’t know content semantics

•  Principal instances render the content •  Browser kernel composes the display

a.com

b.com

Display in Gazelle

Browser Kernel

display (winID, bitmap) display (winID, bitmap)

a.com b.com

Page 18: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Dual ownership of a window •  Window: unit of display delegation •  A window has two owners:

–  landlord: creator principal –  tenant: resident principal –  landlord can delegate screen area to tenant

•  delegate() system call

•  Window’s resources: –  position, dimensions, content (pixels),

URL location

a.com

b.com

Landlord: a.com Tenant: b.com

Page 19: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Display Access Control

Position Dimensions Pixels URL location

Landlord RW RW W

Tenant R RW RW

Tenant cannot tamper owner’s display

Tenant’s display content

No navigation history leakage

Unlike existing browsers, display ownership and access control is managed exclusively by the browser kernel

Page 20: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Protecting events

•  Browser kernel must dispatch user events to the right principal instance

•  Challenge: cross-principal content overlaying –  frames can be transparent –  images under text –  layers in CSS

•  Layout policy has security and backward compatibility implications –  see paper

a.com

b.com

Page 21: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Outline

•  Motivation •  Gazelle’s design •  Implementation •  Evaluation

Page 22: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Implementation •  Browser kernel implemented in C# (5K lines) •  Principal instance is based on Internet Explorer renderer

–  we reuse IE rendering engine (Trident) •  “free” HTML parsing/rendering, JavaScript engine, DOM

–  Trident instrumented to redirect resource access to BK –  sandboxed process simulated through interposition –  no plug-ins yet

Unmodified IE renderer

web

Page 23: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Implementation •  Browser kernel implemented in C# (5K lines) •  Principal instance is based on Internet Explorer renderer

–  we reuse IE rendering engine (Trident) •  “free” HTML parsing/rendering, JavaScript engine, DOM

–  Trident instrumented to redirect resource access to BK –  sandboxed process simulated through interposition –  no plug-ins yet

Unmodified IE renderer

web

interposition layer

Browser kernel process Principal instance

Page 24: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Evaluation – browsing performance

•  On par with IE7 and Chrome when browsing within an origin

Examples of web page load times Gazelle IE7 Chrome

Navigate from google.com to google.com/ads 1.0s 1.1s 1.0s

Page 25: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Evaluation – browsing performance

•  On par with IE7 and Chrome when browsing within an origin •  More overhead for cross-origin navigation, rendering

embedded cross-origin content –  main source: IE instrumentation

•  1.4s for nytimes (55% of overhead over IE7) •  can be eliminated in a production implementation

Examples of web page load times Gazelle IE7 Chrome

Navigate from google.com to google.com/ads 1.0s 1.1s 1.0s

Navigate from google.com/ads to nytimes.com 5.8s 3.2s 3.5s

(nytimes.com contains a cross-origin iframe)

Page 26: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Evaluation – browsing performance

•  Many other optimizations can bring performance on par –  overlapping fetching and rendering –  pre-initializing principal instance processes –  named pipes –  bitmap transfers

(nytimes.com contains a cross-origin iframe)

Examples of web page load times Gazelle IE7 Chrome

Navigate from google.com to google.com/ads 1.0s 1.1s 1.0s

Navigate from google.com/ads to nytimes.com 5.8s 3.2s 3.5s

Page 27: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Related work

•  Security in other browsers: –  IE8/Chrome: different security goals

•  origin protection logic in rendering process, not in browser kernel

–  OP: additional modularization without security benefits •  some OS logic (e.g., display management) still in principal space

–  Tahoma: VM isolation, web sites opt in to take advantage –  SubOS: principal definition differs from today’s web

•  None of these handle embedded web principals shop.com

ad.com

Page 28: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Ongoing research

•  Compatibility vs. security cost analysis –  large-scale study over real web sites

•  Sandboxing for principal instances –  system call interposition (Xax) –  binary rewriting (Native Client) –  adding native OS process sandboxing support

•  Porting plug-ins into the Gazelle architecture •  Secure device access •  Resource scheduling

Page 29: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Concluding remarks

•  Gazelle: –  protect online valuables –  first multi-principal OS-based browser design

•  OS functions shifted from renderer to privileged browser kernel •  browser kernel exclusively manages principals, resources, and security

–  architecture does not prevent backward compatibility –  cross-origin mashups present intricacies in managing display and other

resources

•  Practical to turn an existing browser into Gazelle

Page 30: The Multi-Principal OS Construction of the Gazelle Web Browser · • Browser kernel: – exclusively manages principals and all system resources • processes, network, storage,

Questions?


Recommended