A Secure Architecture for Untrusted Web Browser Plugins Achim - - PowerPoint PPT Presentation

a secure architecture for untrusted web browser plugins
SMART_READER_LITE
LIVE PREVIEW

A Secure Architecture for Untrusted Web Browser Plugins Achim - - PowerPoint PPT Presentation

A Secure Architecture for Untrusted Web Browser Plugins Achim Weimert SECT/TU-Berlin March 18, 2011 Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 1 / 21 Outline Introduction 1 Design 2 3 Implementation


slide-1
SLIDE 1

A Secure Architecture for Untrusted Web Browser Plugins

Achim Weimert

SECT/TU-Berlin

March 18, 2011

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 1 / 21

slide-2
SLIDE 2

Outline

1

Introduction

2

Design

3

Implementation

4

Evaluation

5

Demo

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 2 / 21

slide-3
SLIDE 3

Introduction

Web browser:

◮ Display web page ◮ Execute JavaScript Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 3 / 21

slide-4
SLIDE 4

Introduction

Web browser:

◮ Display web page ◮ Execute JavaScript

Plugins:

◮ Extend browser functionality ◮ Provided by third-party ◮ Executed in browser context ◮ Netscape Plugin API (NPAPI) Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 3 / 21

slide-5
SLIDE 5

Browser Vulnerabilities

Plugins to attack web browser

Availability Integrity Confidentiality

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 4 / 21

slide-6
SLIDE 6

Browser Vulnerabilities

Plugins to attack web browser

Availability Integrity Confidentiality

Threat model

Attacker controls web page, plugin Trusted OS, browser, user

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 4 / 21

slide-7
SLIDE 7

Goal

Create architecture that...

allows for multi-media plugins

◮ low latency ◮ high data throughput ◮ low computation overhead ◮ multiple event sources ◮ threading ◮ prioritization

prevents attacks on browser security

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 5 / 21

slide-8
SLIDE 8

Design

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 6 / 21

slide-9
SLIDE 9

Design

Design...

... an interface

Checkable information flow

... an architecture

Provide interface Enforce interface Facilitate multi-media plugins

Overview

Execution model, host-client interaction, threading library

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 7 / 21

slide-10
SLIDE 10

Execution Model

Virtual CPU model (vCPU)

Resembles physical CPU Sequential execution model Control flow diversion on events Allows for user level threads Allows for synchronization

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 8 / 21

slide-11
SLIDE 11

Execution Model

Virtual CPU model (vCPU)

Resembles physical CPU Sequential execution model Control flow diversion on events Allows for user level threads Allows for synchronization

Host-Client Interaction

System calls Events

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 8 / 21

slide-12
SLIDE 12

Client Threading Library

Multi-threading:

◮ preemption ◮ scheduling ◮ prioritization of events and threads ◮ synchronization

Dynamic memory

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 9 / 21

slide-13
SLIDE 13

Implementation

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 10 / 21

slide-14
SLIDE 14

Implementation

Tools

Ubuntu Linux 9.10 (64bit) C++ / Assembly Implementation separate from the browser Sandboxing vCPU Preemption Thread priorities Event priorities Synchronization System calls User level resume

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 11 / 21

slide-15
SLIDE 15

vCPU System Calls

Host waits for client changes using waitpid Segmentation fault at specific address Manipulation of client using ptrace

Implemented System Calls

exit / sleep / resume / deliver event / get data / display

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 12 / 21

slide-16
SLIDE 16

User Level Resume

Resume client state without system call

high usage of syscall resume repeated switching to host user level implementation

◮ high performance ◮ RET instruction Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 13 / 21

slide-17
SLIDE 17

Evaluation

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 14 / 21

slide-18
SLIDE 18

Evaluation

System Call Roundtrip

clock cycles per call time per call relation vCPU ( syscall null ) 37, 702 ticks ≈ 35.671 µs 100% native (getpid) 248 ticks ≈ 0.234 µs 1%

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 15 / 21

slide-19
SLIDE 19

Evaluation cont.

Context Switch

configuration time per switch relation 1 vCPU user level resume ≈ 1.0 µs 100% 2 syscall resume ≈ 16.5 µs 1, 732% 3 native shared addr. (clone) ≈ 2.3 µs 237% 4 separate addr. (fork) ≈ 2.9 µs 300% 5 separate addr. (clone) ≈ 2.9 µs 300%

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 16 / 21

slide-20
SLIDE 20

Evaluation cont.

Computation Overhead

time relation vCPU 13,733 ms 100.0% native 13,643 ms 99.3%

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 17 / 21

slide-21
SLIDE 21

Evaluation cont.

Event Latency

2000 4000 6000 8000 10000 1 2 3 4 5 6 Latency in CPU clock cycles Number of parallel data event handling threads Latency of events with parallel data event handling threads

Figure: Latency of events: increasing number of data event handling threads

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 18 / 21

slide-22
SLIDE 22

Evaluation cont.

Event Latency with parallel events

500000 1e+06 1.5e+06 2e+06 2.5e+06 1 2 3 4 5 Average CPU cycles per 100 events Number of parallel data event handling threads Average event latency for HIGH priority handling (1) Average event latency for EQUAL priority handling (2)

Figure: Latency of data events: increasing number of data event handling threads

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 19 / 21

slide-23
SLIDE 23

FFmpeg Demo

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 20 / 21

slide-24
SLIDE 24

Q & A

Thank you! Questions?

Achim Weimert (SECT/TU-Berlin) Web Browser Plugin Architecture March 18, 2011 21 / 21