Securing distributed systems with information flow control - - PowerPoint PPT Presentation

securing distributed systems with information flow control
SMART_READER_LITE
LIVE PREVIEW

Securing distributed systems with information flow control - - PowerPoint PPT Presentation

Securing distributed systems with information flow control Nickolai Zeldovich Silas Boyd-Wickizer David Mazires Traditional web applications: lots of trusted (yellow) code HTTP User's Application User's browser front Database User's


slide-1
SLIDE 1

Securing distributed systems with information flow control

Nickolai Zeldovich Silas Boyd-Wickizer David Mazières

slide-2
SLIDE 2

Traditional web applications: lots of trusted (yellow) code

Application code Database

User's browser

HTTP front end

User's browser User's browser

  • Application is typically millions of lines of code
  • Lots of third-party libraries from SourceForge
  • Application has access to entire user database
slide-3
SLIDE 3

Traditional web applications: lots of trusted (yellow) code

Application code Database

User's browser

HTTP front end

User's browser User's browser

  • Application is typically millions of lines of code
  • Lots of third-party libraries from SourceForge
  • Application has access to entire user database
  • Result: any bug allows attacker to steal all data!

– PayMaxx app code exposed 100,000 users' SSNs

slide-4
SLIDE 4

Recent work: information flow control

  • Don't try to eliminate all application bugs (hard!)
  • OS'es like Asbestos, HiStar, Flume keep user

data secure even if application is malicious

– Track flow of user's data through system – Only send user's data to that user's browser – No need to audit/understand application code!

slide-5
SLIDE 5

Recent work: information flow control

  • Don't try to eliminate all application bugs (hard!)
  • OS'es like Asbestos, HiStar, Flume keep user

data secure even if application is malicious

– Track flow of user's data through system – Only send user's data to that user's browser – No need to audit/understand application code!

  • Limitation: works only on one machine

– Web applications need multiple machines for scale

slide-6
SLIDE 6

This talk: extending information flow control to distributed systems

  • Outline:

– Review of information flow control (IFC) in an OS – Challenges in distributed IFC and our solution – Apps: web server, incremental deployment, ...

  • Results:

– Can control information flow in distributed system – Key idea: self-certifying category names – Enforce security of scalable web server in 6,000 lines

slide-7
SLIDE 7

Labels control information flow

File A Process

Label Label

File B

Label

slide-8
SLIDE 8

Labels control information flow

File A Process

Label Label

File B

Label

Blue data can flow only to other blue objects Color is category of data (e.g. my files)

slide-9
SLIDE 9

Labels control information flow

File A Process

Label Label

File B

Label

X X

Blue data can flow only to other blue objects Color is category of data (e.g. my files)

slide-10
SLIDE 10

Labels control information flow

File A Process

Label Label

File B

Label

X

Color is category of data (e.g. my files)

X

Blue data can flow only to other blue objects

slide-11
SLIDE 11

Labels control information flow

File A Process

Label Label

File B

Label

Owns blue data, can remove color (e.g. encrypt) Color is category of data (e.g. my files) Blue data can flow only to other blue objects

slide-12
SLIDE 12

Labels are egalitarian

File A Process

Label Label

File B

Label

  • Any process can request a new category (color)

– Gets ownership of that category ( ) – Uses category in labels to control information flow – Can grant ownership to others

slide-13
SLIDE 13

Traditional web server: lots of trusted (yellow) code

Application code Database

User's browser

HTTP front end

User's browser User's browser

slide-14
SLIDE 14

Information flow control: separate color for each user's data

User's browser

HTTP front end

User's browser User's browser

Database Application code

slide-15
SLIDE 15

Information flow control: track each user's data in app

Application code

User's browser

HTTP front end

User's browser User's browser

Application code Application code Database

slide-16
SLIDE 16

Labels prevent application code from disclosing data onto network

Application code

User's browser

HTTP front end

User's browser User's browser

Application code Application code

X X

Database

slide-17
SLIDE 17

Front-end uses ownership to send data only to user's browser

Application code

User's browser

HTTP front end

User's browser User's browser

Application code Application code

X X

Database

slide-18
SLIDE 18

Front-end uses ownership to send data only to user's browser

Application code

User's browser

HTTP front end

User's browser User's browser

Application code Application code

X X

Database

  • What happens when the server gets overloaded?
slide-19
SLIDE 19

Limitation: OS alone cannot control information flow in distributed system

Application code

X

User's browser

HTTP front end

User's browser User's browser

Application code Application code

X X X X X X X

Database

slide-20
SLIDE 20

Distributed challenge: when to allow processes to communicate?

HTTP front-end Application server httpd App code

  • Design goal: decentralized – no fully-trusted parts

– (Not the usual meaning of decentralized IFC, or DIFC)

  • Challenge: no equivalent of a fully-trusted OS

kernel that can make all decisions ?

Data server Database

?

slide-21
SLIDE 21

High-level approach: encode labels in messages

HTTP front-end Application server httpd Message App code

Each machine uses OS to enforce labels locally

Data server Message Database

slide-22
SLIDE 22

Problem: decentralized trust

  • When can we trust the recipient with message?

Attacker's machine

X

HTTP front-end Application server httpd Message App code Data server Message Database

slide-23
SLIDE 23

Solution: per-category trust

  • DB trusts front-end, app servers with a particular

user's data (e.g. messages labeled blue)

  • But DB doesn't trust the app code...

Attacker's machine

X

HTTP front-end Application server httpd Message App code Data server Message Database

slide-24
SLIDE 24

Exporters control information flow

  • n each machine using local OS

HTTP front-end Application server httpd Message App code Data server Message Database Exporter Exporter Exporter

  • Database doesn't trust the app code, but trusts

the app server's exporter to contain the app code

Attacker's machine

X

slide-25
SLIDE 25

Exporter's API

exp_send(dest_host, dest_mbox, msg, label)

– Exporter provides interface to send datagrams – Message should only be sent if every category

in label trusts the machine dest_host

– How does the exporter check for this trust?

slide-26
SLIDE 26

Strawman: check trust by querying category owners

Exporter Process

(secret bit = 1)

Category owner

slide-27
SLIDE 27

Strawman: check trust by querying category owners

Exporter Process

(secret bit = 1) exp_send(host_x, msg)

Category owner Host X

? ?

slide-28
SLIDE 28

Strawman: check trust by querying category owners

Exporter Process

(secret bit = 1) exp_send(host_x, msg)

Category owner

Control msg: “can I send to host_x?”

Host X

? ?

slide-29
SLIDE 29

Querying category owners creates a covert channel in API

Exporter Process

(secret bit = 1)

Category owner Attacker's host

X

Host X

slide-30
SLIDE 30

Querying category owners creates a covert channel in API

Exporter Process

(secret bit = 1)

Category owner Attacker's host

X

Host X

slide-31
SLIDE 31

Querying category owners creates a covert channel in API

Exporter Process

(secret bit = 1)

Category owner Attacker's host

X

exp_send(host_x, msg)

Host X

? ?

slide-32
SLIDE 32

Querying category owners creates a covert channel in API

Exporter Process

(secret bit = 1)

Category owner Attacker's host

X

exp_send(host_x, msg)

Host X

? ?

Control msg: “can I send to host_x?” Control msg: “can I send to host_x?”

slide-33
SLIDE 33

Strawman 2: store trust in exporter

Exporter Process

(secret bit = 1) host_x host_y

slide-34
SLIDE 34

Strawman 2: store trust in exporter

Exporter Process

(secret bit = 1) exp_send(host_x, msg) host_x host_y

  • Exporter sends no queries that could leak data
slide-35
SLIDE 35

Storing trust in exporter also creates a covert channel in API

Exporter Process

(secret bit = 1) host_x

Colluding Process Attacker's host Y

X

slide-36
SLIDE 36

Storing trust in exporter also creates a covert channel in API

Exporter Process

(secret bit = 1) host_x

Colluding Process Attacker's host Y

X

exp_trust( , host_y) host_y Depends on value of the secret bit

slide-37
SLIDE 37

Storing trust in exporter also creates a covert channel in API

Exporter Process

(secret bit = 1) host_x

Colluding Process Attacker's host Y

X

Depends on value of the secret bit host_y exp_send(host_y, msg) Depends on behavior of malicious process Depends on value of the secret bit exp_trust( , host_y)

slide-38
SLIDE 38

Problem: What to do with covert channels?

  • Non-goal: eliminate all covert channels

– Not practical

  • Goal: avoid covert channels in interface

– Allow trading off performance to mitigate

covert channels without changing the API

slide-39
SLIDE 39

Solution: Self-certifying category names

  • Categories named by public key
  • Trust for a category defined by certificates

signed by that category's private key

  • Caller supplies all certificates to exp_send()
slide-40
SLIDE 40

Caller supplies all certificates needed by exporter

exp_send(dest_host, dest_mbox, msg, label, certs) Caller-supplied

slide-41
SLIDE 41

Caller supplies all certificates needed by exporter

exp_send(dest_host, dest_mbox, msg, label, certs) =

 

Caller-supplied Mapping

slide-42
SLIDE 42

Caller supplies all certificates needed by exporter

exp_send(dest_host, dest_mbox, msg, label, certs)

Can send to host X 

=

 

Caller-supplied Mapping Certificate

No covert channels to determine trust:

➔ No external

communication

➔ No shared state

slide-43
SLIDE 43

Exporter API design summary

  • Self-certifying categories allow exporter to be

stateless – just verify caller-supplied certificates

– Stateless exporter design avoids covert channels

  • exp_send() sends labeled datagrams

– Also allows granting ownership (stars) across network – By design, only depends on caller-supplied args!

  • Small trusted exporter: 3,700 lines + libs (crypto)
slide-44
SLIDE 44

exp_send() enforces security policies specified by labels

Exporter: datagrams via exp_send()

  • Higher-level functionality will not be trusted
slide-45
SLIDE 45

Building distributed applications

  • n top of exp_send()

RPC library Exporter: datagrams via exp_send()

  • RPC implemented on top of exp_send's

datagrams, much like RPC over UDP

slide-46
SLIDE 46

Building distributed applications

  • n top of exp_send()

Resource allocation Exporter: datagrams via exp_send() RPC library

  • Resource allocation RPC server

(manages access to CPU, memory)

slide-47
SLIDE 47

Building distributed applications

  • n top of exp_send()

Resource allocation Exporter: datagrams via exp_send() RPC library

  • Program invocation: starts a process using

previously-allocated resources Program invocation

slide-48
SLIDE 48

Application

Building distributed applications

  • n top of exp_send()

Resource allocation Exporter: datagrams via exp_send() RPC library Program invocation

slide-49
SLIDE 49

Bootstrapping a new machine

New machine B Existing machine A Resources root's shell Exporter A Exporter B

=

 

  • Goal: gain access to new machine's resources

using admin's privileges on existing machine

slide-50
SLIDE 50

Bootstrapping a new machine

New machine B Existing machine A Resources root's shell Exporter A Exporter B

=

 

(1) Create mapping on new machine to bridge its protection domain with existing machine's (2) Write down new machine's public key =

 

(1) Mapping (2) B's public key

slide-51
SLIDE 51

Bootstrapping a new machine

New machine B Existing machine A Resources root's shell Exporter A Exporter B

=

 

  • Use process invocation and ownership of root's

category to start running code on new machine =

 

Message

 

Process

slide-52
SLIDE 52

User's browser

User data User data

Traditional web server (like Apache): 1M+ lines of trusted code

Application

(PDF: 600k LoC)

User data listener OpenSSL

(340k LoC)

http RSA key

User's browser User's browser

slide-53
SLIDE 53

Application

(PDF: 600k LoC)

Application

(PDF: 600k LoC)

User data User data

Application code cannot disclose user data

Application

(PDF: 600k LoC)

User data listener OpenSSL

(340k LoC)

http RSA key

User's browser User's browser User's browser

slide-54
SLIDE 54

httpd httpd User's auth agent User's auth agent Application

(PDF: 600k LoC)

Application

(PDF: 600k LoC)

User data User data

Per-user authentication agents, no fully-privileged code

Application

(PDF: 600k LoC)

User data listener OpenSSL

(340k LoC)

http RSA key User's auth agent

Password

User's browser User's browser User's browser

slide-55
SLIDE 55

inetd OpenSSL

(340k LoC)

OpenSSL

(340k LoC)

httpd httpd User's auth agent User's auth agent Application

(PDF: 600k LoC)

Application

(PDF: 600k LoC)

User data User data

SSL library cannot send data to attacker

Application

(PDF: 600k LoC)

User data inetd OpenSSL

(340k LoC)

http RSA key User's auth agent

Password

User's browser User's browser User's browser

listener

slide-56
SLIDE 56

User's browser User's browser User's browser

SSL SSL httpd httpd Application

(PDF: 600k LoC)

Application

(PDF: 600k LoC)

User data User data

SSL library cannot disclose private key

Application

(PDF: 600k LoC)

User data SSL http RSA key RSAd

4600 lines 340k lines

inetd inetd listener User's auth agent User's auth agent User's auth agent

Password

slide-57
SLIDE 57

SSL SSL httpd httpd User's auth agent User's auth agent Application

(PDF: 600k LoC)

Application

(PDF: 600k LoC)

User data User data

Security enforced by ~6,000 lines of code (yellow)

Application

(PDF: 600k LoC)

User data SSL http RSA key User's auth agent

Password

RSAd

310 lines 300 lines 360 lines

User's browser User's browser User's browser

340k lines 4600 lines

inetd inetd listener

slide-58
SLIDE 58

SSL SSL httpd httpd User's auth agent User's auth agent Application

(PDF: 600k LoC)

Application

(PDF: 600k LoC)

User data User data

Scalable web server, no fully-trusted machines

Application

(PDF: 600k LoC)

User data SSL http RSA key User's auth agent

Password

RSAd

310 lines 300 lines 360 lines

User's browser User's browser User's browser

340k lines 4600 lines

inetd inetd listener

slide-59
SLIDE 59

Replication

  • Goal: ensure certificate private key is protected

while minimizing trusted code

New server B Existing server A Resources root's shell key replicator RSA key

slide-60
SLIDE 60

Replication

  • Admin gives key replicator access to resources

(blue star) and name (public key) of new server

New server B Existing server A Resources root's shell key replicator RSA key Replicate to B

slide-61
SLIDE 61

Replication

  • Replication daemon sends over key and starts

RSAd (using program invocation RPC service)

New server B Existing server A Resources root's shell key replicator RSA key RSA key RSAd

slide-62
SLIDE 62

Replication

  • Admin provides resources, but does not get

access to RSA key itself

New server B Existing server A Resources root's shell key replicator RSA key RSA key RSAd

slide-63
SLIDE 63

Network protocol works with multiple OS'es

SSL SSL httpd httpd User's auth agent User's auth agent Application

(PDF: 600k LoC)

Application

(PDF: 600k LoC)

User data User data Application

(PDF: 600k LoC)

User data SSL http RSA key User's auth agent RSAd

310 lines 300 lines 340k lines 4600 lines Password

inetd inetd listener

HiStar Linux Flume

slide-64
SLIDE 64

Incremental deployment example: Run untrusted perl on HiStar

Return value,

  • utput data

Perl code, input data

  • Security policy specified by label
  • Lower overhead, richer policies than VM/sandbox

HiStar machine Linux machine perl

Exporter Exporter Library

Apache

slide-65
SLIDE 65

Scaling untrusted app code to multiple compute clusters

  • Extend the idea of untrusted application code to

third-party compute clusters

  • Earlier: untrusted app code handles user data

– Limitation: had to use web site's trusted servers – Cannot mix Facebook+MySpace: no common server

  • Now: users can explicitly trust compute clusters

– Secure mash-ups can combine data from many sites – No need for fully-trusted common application platform

slide-66
SLIDE 66

Summary

  • Shown how to use information flow control for

security in decentralized distributed systems

  • Key idea: self-certifying category names

 stateless checks  no implicit shared state  avoids covert channels in design

  • Build everything on top of datagrams with IFC