Top Banner
Information Flow Control for Distributed Trusted Execution Environments Anitha Gollamudi Owen Arden Stephen Chong 1
95

Information Flow Control for Distributed Trusted Execution ...

Mar 13, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Information Flow Control for Distributed Trusted Execution ...

Information Flow Control for Distributed Trusted

Execution Environments

Anitha Gollamudi Owen ArdenStephen Chong

�1

Page 2: Information Flow Control for Distributed Trusted Execution ...

Trusted Execution Environment (TEE)

•Protected memory region for code and data

•Offers isolated execution and remote attestation

•Only host can communicate with TEE

•Hardware feature

•e.g. Intel SGX, ARM TrustZone

•Good fit for offering security in distributed settings

2

Page 3: Information Flow Control for Distributed Trusted Execution ...

TEEs ⇏ Security Guarantees

!3

Page 4: Information Flow Control for Distributed Trusted Execution ...

TEEs ⇏ Security Guarantees

!3

if secretsend cipher on public

else ()

Page 5: Information Flow Control for Distributed Trusted Execution ...

TEEs ⇏ Security Guarantees

!3

if secretsend cipher on public

else ()

Ah, secret is 1

Page 6: Information Flow Control for Distributed Trusted Execution ...

TEEs ⇏ Security Guarantees

!3

if secretsend cipher on public

else ()

Ah, secret is 1

Information Flow Control (IFC) techniques!

Page 7: Information Flow Control for Distributed Trusted Execution ...

IFC for Distributed TEEs: Challenges

!4

Page 8: Information Flow Control for Distributed Trusted Execution ...

IFC for Distributed TEEs: Challenges

1. Choose right abstractions for crypto and TEEs

• Focus on application-level security

• Reflect the capabilities and limitations of TEEs

• e.g. TEE can communicate only with the host

• Implementable!

!4

Page 9: Information Flow Control for Distributed Trusted Execution ...

IFC for Distributed TEEs: Challenges

1. Choose right abstractions for crypto and TEEs

• Focus on application-level security

• Reflect the capabilities and limitations of TEEs

• e.g. TEE can communicate only with the host

• Implementable!

2. Enforce security

!4

Page 10: Information Flow Control for Distributed Trusted Execution ...

Contributions

!5

Page 11: Information Flow Control for Distributed Trusted Execution ...

Contributions1. Distributed Flow-limited Authorization calculus for TEEs

(DFLATE)

• Supports distributed TEEs

• Design mapping to real system

!5

Page 12: Information Flow Control for Distributed Trusted Execution ...

Contributions1. Distributed Flow-limited Authorization calculus for TEEs

(DFLATE)

• Supports distributed TEEs

• Design mapping to real system

2. A permissive security type system

• Enforces security (noninterference) for confidentiality and integrity

!5

Page 13: Information Flow Control for Distributed Trusted Execution ...

DFLATE

• Simply typed lambda calculus extended with

• Communication primitives (send/receive/spawn)

• Abstractions for crypto and TEE

• Security types

!6

Page 14: Information Flow Control for Distributed Trusted Execution ...

Address Challenge #11. Choose right abstractions for crypto and TEEs

• Abstractions should reflect the capabilities and limitations of TEEs

• e.g. TEE can only communicate with host

• Focus on application-level security

• Implementable!

2. Enforce security

!7

Page 15: Information Flow Control for Distributed Trusted Execution ...

Communication

!8

recv chab as x in…

Alice (a) Bob (b)

send blue on chab

chab

Page 16: Information Flow Control for Distributed Trusted Execution ...

Communication

!8

recv chab as x in…

Alice (a) Bob (b)

send blue on chab

chab

Page 17: Information Flow Control for Distributed Trusted Execution ...

Communication

!8

recv chab as x in…

Alice (a) Bob (b)

send blue on chab

chab

Page 18: Information Flow Control for Distributed Trusted Execution ...

Securing Communication

!9

if secretsend blue on public

else ()

Public channel

Page 19: Information Flow Control for Distributed Trusted Execution ...

Securing Communication

!9

if secretsend blue on public

else ()

Public channel

Page 20: Information Flow Control for Distributed Trusted Execution ...

Securing Communication

!10

if secretsend blue on public

else ()

Public channel

Page 21: Information Flow Control for Distributed Trusted Execution ...

Securing Communication

!10

Security labels on channels prevent leaks due to communication

if secretsend blue on public

else ()

Public channel

Page 22: Information Flow Control for Distributed Trusted Execution ...

!11

Communication through trusted/untrusted nodes

1

2

?

Page 23: Information Flow Control for Distributed Trusted Execution ...

!11

Communication through trusted/untrusted nodes

1

2

•Bob can not learn/modify the content of the message•Bob may learn the existence of the message

?

Page 24: Information Flow Control for Distributed Trusted Execution ...

!11

Communication through trusted/untrusted nodes

1

2

•Bob can not learn/modify the content of the message•Bob may learn the existence of the message

Bob can learn the message received from Alice

?

Page 25: Information Flow Control for Distributed Trusted Execution ...

!11

Communication through trusted/untrusted nodes

1

2

•Bob can not learn/modify the content of the message•Bob may learn the existence of the message

Bob can learn the message received from Alice

?

Page 26: Information Flow Control for Distributed Trusted Execution ...

!11

Communication through trusted/untrusted nodes

1

2

•Bob can not learn/modify the content of the message•Bob may learn the existence of the message

Bob can learn the message received from Alice

?

Page 27: Information Flow Control for Distributed Trusted Execution ...

!12

2b

Carol must not learn the contents of the blue message

2a

Carol may learn the contents of the blue message

Page 28: Information Flow Control for Distributed Trusted Execution ...

!12

2b

Carol must not learn the contents of the blue message

2a

Carol may learn the contents of the blue message

Page 29: Information Flow Control for Distributed Trusted Execution ...

!13

3

Bob cannot learn/modify the orange message

Support for communication with enclaves

Page 30: Information Flow Control for Distributed Trusted Execution ...

DFLATE abstracts crypto mechanisms using protected expressions

!14

Page 31: Information Flow Control for Distributed Trusted Execution ...

chab

!15

Protected Expression

Page 32: Information Flow Control for Distributed Trusted Execution ...

(ηa 42)chab

!15

Protected Expression

Protected expression

Page 33: Information Flow Control for Distributed Trusted Execution ...

(ηa 42)chab

!15

Protected Expression

Protected expression

Protected expressions abstract encryption and signing

Page 34: Information Flow Control for Distributed Trusted Execution ...

!16

Protected Expression

chab

has type a says int(ηa 42)

(ηa 42)

Page 35: Information Flow Control for Distributed Trusted Execution ...

send (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Bind abstracts decryption and signature verification

Operating on Protected Expressions

!17

chab

(ηa 42)

Page 36: Information Flow Control for Distributed Trusted Execution ...

send (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Bind abstracts decryption and signature verification

Operating on Protected Expressions

!17

chab

(ηa 42)

Page 37: Information Flow Control for Distributed Trusted Execution ...

send (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

To successfully decrypt,Alice must authorize Bob

Secure Bind

!18

chab

(ηa 42)

Page 38: Information Flow Control for Distributed Trusted Execution ...

Bob ≽ Alice

Principals delegate authority using acts-for (≽)!19

Page 39: Information Flow Control for Distributed Trusted Execution ...

Bob ≽ Alice

Principals delegate authority using acts-for (≽)!19

Page 40: Information Flow Control for Distributed Trusted Execution ...

assume b ≽ a insend (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Delegation of Authority

!20

(ηa 42)chab

Page 41: Information Flow Control for Distributed Trusted Execution ...

assume b ≽ a insend (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Delegation of Authority

!20

(ηa 42)chab

Page 42: Information Flow Control for Distributed Trusted Execution ...

assume b ≽ a insend (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Delegation of Authority

!20

(ηa 42)

Assume abstracts key sharing among principals

chab

Page 43: Information Flow Control for Distributed Trusted Execution ...

!21

1

2

a says τ

a says τ

Bob can learn the message received from Alice

•Bob must not learn/modify the content of the message•Bob may learn the existence of the message

?

Page 44: Information Flow Control for Distributed Trusted Execution ...

!21

1

2

a says τa says τ

a says τ

Bob can learn the message received from Alice

•Bob must not learn/modify the content of the message•Bob may learn the existence of the message

?

Page 45: Information Flow Control for Distributed Trusted Execution ...

!21

Types enable reasoning about Bob’s power

1

2

a says τa says τ

a says τ

Bob can learn the message received from Alice

•Bob must not learn/modify the content of the message•Bob may learn the existence of the message

?

Page 46: Information Flow Control for Distributed Trusted Execution ...

assume b ≽ a insend (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Secure Bind (2)

!22

(ηa 42)chab

Page 47: Information Flow Control for Distributed Trusted Execution ...

assume b ≽ a insend (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Bob must not leak the decrypted value

Secure Bind (2)

!22

(ηa 42)chab

Page 48: Information Flow Control for Distributed Trusted Execution ...

assume b ≽ a insend (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Secure Bind (2)

!23

(ηa 42)chab

a ⊑ τ

The output type of bind must protect Alice

Page 49: Information Flow Control for Distributed Trusted Execution ...

assume b ≽ a insend (ηa 42) on chab

recv chab as enc inbind x = enc in ( f x)

Secure Bind (2)

!23

(ηa 42)chab

a ⊑ τThe output type of bind must protect Alice

Page 50: Information Flow Control for Distributed Trusted Execution ...

!24

Type system ensures that Bob uses the decrypted value securely

2b

Carol must not learn the contents of the blue message

2a

Carol may learn the contents of the blue message

a says τ

a says τ b says τ′�

b says τ′�

Page 51: Information Flow Control for Distributed Trusted Execution ...

assume t ≽ a in send (ηa blue) on chab

assume t ≽ c in recv chbc as x in ⋯

recv chab as xsend x on chbt

recv chbt as x′� in ⋯

TEEt {⋯send v on chbt

}

Abstracting TEE

!25

chab chbc

Page 52: Information Flow Control for Distributed Trusted Execution ...

assume t ≽ a in send (ηa blue) on chab

assume t ≽ c in recv chbc as x in ⋯

recv chab as xsend x on chbt

recv chbt as x′� in ⋯

TEEt {⋯send v on chbt

}

Abstracting TEE

!25

chab chbc

Page 53: Information Flow Control for Distributed Trusted Execution ...

assume t ≽ a in send (ηa blue) on chab

assume t ≽ c in recv chbc as x in ⋯

recv chab as xsend x on chbt

recv chbt as x′� in ⋯

TEEt {⋯send v on chbt

}

Computation principal

Abstracting TEE

!25

chab chbc

Page 54: Information Flow Control for Distributed Trusted Execution ...

assume t ≽ a in send  (ηa blue) on chab

assume t ≽ c in recv chbc as x in ⋯

recv chab as xsend chbt x then recv chbt as x′� in ⋯

TEEt {⋯send v on chbt

}

Abstracting TEE

!26

chab chbc

Page 55: Information Flow Control for Distributed Trusted Execution ...

assume t ≽ a in send  (ηa blue) on chab

assume t ≽ c in recv chbc as x in ⋯

recv chab as xsend chbt x then recv chbt as x′� in ⋯

TEEt {⋯send v on chbt

}

Abstracting TEE

!26

chab chbc

Page 56: Information Flow Control for Distributed Trusted Execution ...

!27

3

a says τ

Bob cannot learn/modify the orange message

Page 57: Information Flow Control for Distributed Trusted Execution ...

!27

3

a says τ a says τ′�

Bob cannot learn/modify the orange message

Page 58: Information Flow Control for Distributed Trusted Execution ...

Implementing DFLATE

!28

Page 59: Information Flow Control for Distributed Trusted Execution ...

Design• DFLATE abstractions are implementable!

!29

Page 60: Information Flow Control for Distributed Trusted Execution ...

Design• DFLATE abstractions are implementable!

• TEEs can be implemented by Intel SGX enclaves

• SGX provides remote attestation

• SGX enclave communicates through the host

!29

Page 61: Information Flow Control for Distributed Trusted Execution ...

Design• DFLATE abstractions are implementable!

• TEEs can be implemented by Intel SGX enclaves

• SGX provides remote attestation

• SGX enclave communicates through the host

• Protected expressions can be implemented using public key encryption and digital signatures

• However, this requires access to the corresponding signing/decryption keys

• Key distribution, especially for enclaves, is non-trivial

!29

Page 62: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

• A global key master has key pairs for all principals

• Key master provisions the nodes and enclaves with necessary private keys

!30

Page 63: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

!31

Key Master

To obtain keys, a node proves its identity to the key master

Page 64: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

!31

Key Master

To obtain keys, a node proves its identity to the key master

Page 65: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

!31

Key Master

To obtain keys, a node proves its identity to the key master

Page 66: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

!31

Key Master

To obtain keys, a node proves its identity to the key master

Page 67: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

!32

Key Master

To obtain keys, an enclave attests itself to the key master

Page 68: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

!32

Key Master

To obtain keys, an enclave attests itself to the key master

Page 69: Information Flow Control for Distributed Trusted Execution ...

Key Distribution

!32

Key Master

To obtain keys, an enclave attests itself to the key master

Page 70: Information Flow Control for Distributed Trusted Execution ...

Address Challenge #21. Choose right abstractions for crypto and TEEs

• Abstractions should reflect the capabilities and limitations of TEEs

• e.g. TEE can only communicate with host

• Focus on application-level security

• Implementable!

2. Enforce security

!33

Page 71: Information Flow Control for Distributed Trusted Execution ...

Security

• Formal definition of security is noninterference (NI)

• Confidentiality NI: private inputs can’t influence public outputs

• Integrity NI: Low integrity inputs can’t influence high integrity outputs

• Type system enforces security

!34

Page 72: Information Flow Control for Distributed Trusted Execution ...

Example Revisited

Alice

!35

Bob

if secretsend cipher on public

Ah, secret is 1

Page 73: Information Flow Control for Distributed Trusted Execution ...

Example Revisited

Alice

!35

Bob

if secretsend cipher on public

Ah, secret is 1

Program is ill-typed

Page 74: Information Flow Control for Distributed Trusted Execution ...

Confidentiality Theorem

!36

Secret inputs from Alice Public outputs

Page 75: Information Flow Control for Distributed Trusted Execution ...

Confidentiality Theorem

!36

Secret inputs from Alice Public outputs

Page 76: Information Flow Control for Distributed Trusted Execution ...

Confidentiality Theorem

!36

Secret inputs from Alice Public outputs

Page 77: Information Flow Control for Distributed Trusted Execution ...

Integrity Theorem

!37

Untrusted inputs from Bob

Trusted outputsto Carol

Page 78: Information Flow Control for Distributed Trusted Execution ...

Integrity Theorem

!37

Untrusted inputs from Bob

Trusted outputsto Carol

Page 79: Information Flow Control for Distributed Trusted Execution ...

Compromised-node Noninterference

!38

Page 80: Information Flow Control for Distributed Trusted Execution ...

Compromised-node Noninterference

!38

Trace for blue execution

Page 81: Information Flow Control for Distributed Trusted Execution ...

Compromised-node Noninterference

!38

Trace for blue execution

Trace for green execution

Traces observed (by Bob) for executions with different secret inputs are equal

Page 82: Information Flow Control for Distributed Trusted Execution ...

Compromised-node Noninterference

!39

Page 83: Information Flow Control for Distributed Trusted Execution ...

Compromised-node Noninterference

!39

Trace for blue execution

Page 84: Information Flow Control for Distributed Trusted Execution ...

Compromised-node Noninterference

!39

Trace for blue execution

Trace for green execution

Traces observed can be different

Page 85: Information Flow Control for Distributed Trusted Execution ...

Confidentiality vs Integrity Guarantees

• Asymmetry due to the ability to suppress messages

• Faithfully models the expressive power of the integrity attacker

• Without undermining the guarantees of cryptography and TEEs

!40

Page 86: Information Flow Control for Distributed Trusted Execution ...

Conclusion

• DFLATE: A programming model for distributed TEEs

• Design for implementing the abstractions in DFLATE

• DFLATE enforces confidentiality and integrity

!41

Page 87: Information Flow Control for Distributed Trusted Execution ...

Backup Slides

!42

Page 88: Information Flow Control for Distributed Trusted Execution ...

(ηa 42)

!43

Nested Protection

chab

Page 89: Information Flow Control for Distributed Trusted Execution ...

(ηa 42)

!43

Nested Protection

chab

Page 90: Information Flow Control for Distributed Trusted Execution ...

(ηa 42)

!43

Nested Protection

chab

has type b says a says int(ηb (ηa 42))

(ηb (ηa 42))

Page 91: Information Flow Control for Distributed Trusted Execution ...

send chab (ηa mblue) recv chab as x in send chbc x

!44

Page 92: Information Flow Control for Distributed Trusted Execution ...

send chab (ηa mblue) assume b ≽ a inrecv chab as x in send chbc x

!45

Page 93: Information Flow Control for Distributed Trusted Execution ...

send chab (ηa mblue)assume b ≽ a inrecv chab as x in send chbc x

!45

Malicious declassification

Page 94: Information Flow Control for Distributed Trusted Execution ...

send chab (ηa mblue)assume b ≽ a inrecv chab as x in send chbc x

Type system prevents malicious declassifications and endorsements

!45

Malicious declassification

Page 95: Information Flow Control for Distributed Trusted Execution ...

send chab (ηa mblue)assume b ≽ a inrecv chab as x in send chbc x

Insufficient authority to add delegation!46