Stateful Declassification Policies for Event-Driven Programs

47
Stateful Declassification Policies for Event-Driven Programs M. Vanhoef, W. De Groef, D. Devriese, F. Piessens, T. Rezk CSF 2014

description

Presentation given at CSF 2014 on the paper "Stateful Declassification Policies for Event-Driven Programs". In essence we present declassification for Secure Multi Execution (SME).

Transcript of Stateful Declassification Policies for Event-Driven Programs

Page 1: Stateful Declassification Policies for Event-Driven Programs

Stateful Declassification Policies

for Event-Driven Programs

M. Vanhoef, W. De Groef, D. Devriese, F. Piessens, T. Rezk

CSF 2014

Page 2: Stateful Declassification Policies for Event-Driven Programs

Observation

“The browser is the new OS”

2

Page 3: Stateful Declassification Policies for Event-Driven Programs

But… browser security?

3

XSS

Page 4: Stateful Declassification Policies for Event-Driven Programs

Firefox: no protection

4

Previous work(s) offer protection against this!

Page 5: Stateful Declassification Policies for Event-Driven Programs

What are we protecting?

5

Event-driven (reactive) programs:

All inputs to the program are events

Output is produced using API calls

Page 6: Stateful Declassification Policies for Event-Driven Programs

What are we protecting?

6

Event-driven (reactive) programs:

All inputs to the program are events

Output is produced using API calls

Public output Private input

Page 7: Stateful Declassification Policies for Event-Driven Programs

Currently: Noninterference

7

𝐼 ≈𝐿 𝐼′ → 𝑂 ≈𝐿 𝑂′

Equal after high

input removed low output identical

Security levels: H (private) and L (public)

Enforce using Secure Multi Execution (SME)

Secure

Precise

Page 8: Stateful Declassification Policies for Event-Driven Programs

Implemented in FlowFox

8

With proper policy, attack is blocked!

Keys pressed, but request blocked

Page 9: Stateful Declassification Policies for Event-Driven Programs

The problem…

9

Noninterference is too strict!

Examples:

Leak only occurrence of key presses?

Leak specific shortcut keys only?

Leak approximate location (mouse, GPS)?

Page 10: Stateful Declassification Policies for Event-Driven Programs

Example: online slideshow

10

Uses arrow keys to navigate:

We need declassification support!

Page 11: Stateful Declassification Policies for Event-Driven Programs

Our Contributions

11

Declassification in untrusted programs

Policy specification

SME enforcement

Implementation in FlowFox

Page 12: Stateful Declassification Policies for Event-Driven Programs

Policy specification

What does the policy define?

“The info leaked public observers”

We consider two cases:

1. Leaking approximate information about one event

2. Leaking aggregate or statistical info over several events

12

Page 13: Stateful Declassification Policies for Event-Driven Programs

Policy specification

How to formally specify both cases?

Using a functional, declarative program.

On each input, define the (new) public info.

13

Leaking over one event Leaking over several events

(1) Event projection (2) Information release

Page 14: Stateful Declassification Policies for Event-Driven Programs

1. Event projection

14

Leaks info about one event (stateless):

π ev n = Nothing | Project n′

Nothing : Event not visible to low observers

ev n′ : Low observers can depend on (ev n′)

Other events project to Nothing

Page 15: Stateful Declassification Policies for Event-Driven Programs

1. Event projection

15

Leaks info about one event (stateless):

π ev n = Nothing | Project n′

Generalizes security labels:

Low event: 𝜋 𝑒𝑣 𝑛 = Project 𝑛

High event: 𝜋 𝑒𝑣 𝑛 = Nothing

And separation of content and presence:

Only presence: 𝜋 𝑒𝑣 𝑛 = Project 0

Page 16: Stateful Declassification Policies for Event-Driven Programs

1. Event projection

16

Leaks info about one event (stateless):

π ev n = Nothing | Project n′

Must be idempotent to guarantee precision:

𝜋(𝜋 𝑒𝑣 𝑛 ) = 𝜋(𝑒𝑣 𝑛)

In line with the idea of removing sensitive info!

Page 17: Stateful Declassification Policies for Event-Driven Programs

2. Information release

17

Leaks info about multiple events (stateful):

𝑟 𝑠, 𝑒𝑣 𝑛 = 𝑠′, Unchanged | Release 𝑛′

𝑠, 𝑠′: old and new state

Release 𝑛′: low observers can depend on 𝑛′

Unchanged: no new info released

Page 18: Stateful Declassification Policies for Event-Driven Programs

2. Information release

18

Leaks info about multiple events (stateful):

𝑟 𝑠, 𝑒𝑣 𝑛 = 𝑠′, Unchanged | Release 𝑛′

Can specify type and initial value of the state:

State :: Bool = False

Released value is put on a release channel

Enforcement mechanism can obtain latest released value

Page 19: Stateful Declassification Policies for Event-Driven Programs

2. Info release: example

19

Leak if shotcut key was used at least once

State :: Bool = False

Release function 𝑟:

Page 20: Stateful Declassification Policies for Event-Driven Programs

Updated noninterference

20

Noninterference (old):

𝐼 ≈𝐿 𝐼′ → 𝑂 ≈𝐿 𝑂′

𝒟∗ 𝐼 = all info low observers can depend

on according to policy 𝒟

Noninterference with declassification:

𝒟∗ 𝐼 = 𝒟∗ 𝐼′ → 𝑂 ≈𝐿 𝑂′

Equal according to policy 𝒟 Low outputs identical

Page 21: Stateful Declassification Policies for Event-Driven Programs

Our Contributions

21

Declassification in untrusted programs

Policy specification

SME enforcement

Implementation in FlowFox

Page 22: Stateful Declassification Policies for Event-Driven Programs

Secure Multi Execution (SME)

Runs a copy for each security level:

Low

High High

Low

Program (H)

Program (L)

22

Page 23: Stateful Declassification Policies for Event-Driven Programs

SME Example: high input

Low run

KeyPress ‘e’

High run

23

Page 24: Stateful Declassification Policies for Event-Driven Programs

SME Example: high input

Low run

KeyPress ‘e’

High run

24

Page 25: Stateful Declassification Policies for Event-Driven Programs

SME Example: high input

Low run

KeyPress ‘e’

High run

25

Page 26: Stateful Declassification Policies for Event-Driven Programs

SME Example: low input

Low run

High run

MouseClick 10

26

Page 27: Stateful Declassification Policies for Event-Driven Programs

SME Example: low input

Low run

High run

MouseClick 10

27

Page 28: Stateful Declassification Policies for Event-Driven Programs

SME Example: low input

Low run

High run

MouseClick 10

28

Page 29: Stateful Declassification Policies for Event-Driven Programs

SME Example: low input

Low run

High run

MouseClick 10

29

Page 30: Stateful Declassification Policies for Event-Driven Programs

SME Example: low input

Low run

High run

MouseClick 10

30

Page 31: Stateful Declassification Policies for Event-Driven Programs

Declassification in SME?

31

Projections generalize security labellings!

Low

High High

Low

Program (H)

Program (L)

Page 32: Stateful Declassification Policies for Event-Driven Programs

Declassification in SME?

32

Low

High

Input Program (H)

𝜋 Program (L)

Projections generalize security labellings!

Page 33: Stateful Declassification Policies for Event-Driven Programs

Declassification in SME?

33

Information release?

Low

High

Input Program (H)

𝜋 Program (L)

Page 34: Stateful Declassification Policies for Event-Driven Programs

Declassification in SME?

34

Information release?

Low

High

Input Program (H)

𝜋 Program (L)

SME state

Page 35: Stateful Declassification Policies for Event-Driven Programs

Declassification in SME?

35

Information release?

Low

High

Input Program (H)

𝜋

?

Program (L)

SME state

Page 36: Stateful Declassification Policies for Event-Driven Programs

Access to release channel

36

Using annotations

Important remarks:

Annotations are seen as untrusted, security does not depend on them (hence attacker cannot abuse them).

Only used to assure precision!

Idea: browser vendor sets default policies, motivating programmers to use annotates.

Page 37: Stateful Declassification Policies for Event-Driven Programs

Declassification in SME

37

Properties:

Security: OK!

Precision for projections: OK!

Full precision more tedious:

Program must run under expected policy

All leaks should happen through annotations

Projections are powerful!

Page 38: Stateful Declassification Policies for Event-Driven Programs

Our Contributions

38

Declassification in untrusted programs

Policy specification

SME enforcement

Implementation in FlowFox

Page 39: Stateful Declassification Policies for Event-Driven Programs

Revealing Occurrence

39

Keylogger in chrome (no protection):

Page 40: Stateful Declassification Policies for Event-Driven Programs

Revealing Occurrence

40

Keylogger in FlowFox (policy):

Page 41: Stateful Declassification Policies for Event-Driven Programs

Revealing Occurrence

41

Keylogger in FlowFox (attack blocked):

Page 42: Stateful Declassification Policies for Event-Driven Programs

Leak approximate info

42

Imagine mouse tracking software:

Page 43: Stateful Declassification Policies for Event-Driven Programs

Leak approximate info

43

Imagine mouse tracking software:

Page 44: Stateful Declassification Policies for Event-Driven Programs

Leak approximate info

44

Mouse tracking under FlowFox (policy):

Page 45: Stateful Declassification Policies for Event-Driven Programs

Leak approximate info

45

Mouse tracking under FlowFox (high output):

Page 46: Stateful Declassification Policies for Event-Driven Programs

Leak approximate info

46

Mouse tracking under FlowFox (low output):

Page 47: Stateful Declassification Policies for Event-Driven Programs

Questions?