101
Obliviate: A Data Oblivious File System for Intel SGX Adil Ahmad Kyungtae Kim Muhammad Ihsanulhaq Sarfaraz Byoungyoung Lee 1

Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: A Data Oblivious File System for Intel SGX

Adil AhmadKyungtae Kim

Muhammad Ihsanulhaq SarfarazByoungyoung Lee

1

Page 2: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Clouds? The Ultimate Dream?

CloudsUser

2

Page 3: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Clouds? The Ultimate Dream?

CloudsUser

2

Page 4: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Clouds? The Ultimate Dream?

CloudsUser

Hmm, SGX??

2

Page 5: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Clouds? The Ultimate Dream?

CloudsUser

Hmm, SGX??

2

Page 6: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Clouds? The Ultimate Dream?

CloudsUser

Hmm, SGX??

2

Page 7: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Clouds? The Ultimate Dream?

CloudsUser

Hmm, SGX?? Thanks,

SGX?! ☺

2

Page 8: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Clouds? The Ultimate Dream?

CloudsUser

Hmm, SGX?? Thanks,

SGX?! ☺

2

The real world is a bit more complicated!

Page 9: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

The sorcery behind SGX

Program’s Address Space

3

Page 10: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

The sorcery behind SGX

Program’s Address Space

Non-Enclave

Enclave

3

Confidentiality and integrity-protected

Trusted execution region

Page 11: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

The sorcery behind SGX

Program’s Address Space

Non-Enclave

Enclave

SystemComponents

Restricted by the processor

3

Confidentiality and integrity-protected

Trusted execution region

Page 12: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Possible SGX File Systems

Disk 4

Page 13: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Possible SGX File Systems

Disk

Enclaves are ring-3

4

Page 14: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Possible SGX File Systems

Disk

Enclaves are ring-3

Rely on OS for ring-0 ops

Operating System

4

Page 15: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Possible SGX File Systems

Disk

Enclaves are ring-3

1. open(“a.txt”);2. read(2, 0x1000, 4096);3. ….

Rely on OS for ring-0 ops

Operating System

4

Page 16: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Possible SGX File Systems

Disk

Enclaves are ring-3

1. open(“a.txt”);2. read(2, 0x1000, 4096);3. ….

Rely on OS for ring-0 ops

Operating System

Allow OS to handle file buffer

(native)

4

Page 17: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Possible SGX File Systems

Disk

Enclaves are ring-3

1. open(“a.txt”);2. read(2, 0x1000, 4096);3. ….

Rely on OS for ring-0 ops

Operating System

Allow OS to handle file buffer

(native)

Buffer the file within the enclave

(in-memory)

4

Page 18: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Side-channel attacks against in-memory FS

OperatingSystem

Enclave

Page table attacks against SGX[S&P14, SEC17]

Cache attacks against SGX[DIMVA17, WOOT17, EuroSec17]

5

Data.txt

Page 19: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Side-channel attacks against in-memory FS

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

0 0x1004

Page Table

OperatingSystem

Enclave

Accessed by the enclave

Page table attacks against SGX[S&P14, SEC17]

Cache attacks against SGX[DIMVA17, WOOT17, EuroSec17]

5

Data.txt

Page 20: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Side-channel attacks against in-memory FS

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

0 0x1004

Page Table

OperatingSystem

Enclave

Accessed by the enclave

1 0x1000

1 0x1003

Page table attacks against SGX[S&P14, SEC17]

Cache attacks against SGX[DIMVA17, WOOT17, EuroSec17]

5

Data.txt

Page 21: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Side-channel attacks against in-memory FS

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

0 0x1004

Page Table

OperatingSystem

Enclave

Accessed by the enclave

1 0x1000

1 0x1003

Page table attacks against SGX[S&P14, SEC17]

cache-set 0

cache-set 1

cache-set 2

cache-set 3

Cache

Cache attacks against SGX[DIMVA17, WOOT17, EuroSec17]

5

Data.txt

Page 22: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Side-channel attacks against in-memory FS

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

0 0x1004

Page Table

OperatingSystem

Enclave

Accessed by the enclave

1 0x1000

1 0x1003

Page table attacks against SGX[S&P14, SEC17]

cache-set 0

cache-set 1

cache-set 2

cache-set 3

Cache

cache-set 0

cache-set 3Cache attacks against SGX

[DIMVA17, WOOT17, EuroSec17]

5

Data.txt

Page 23: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Case Study: Attacking SQlite

Doctor Cloud

6

Page 24: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Case Study: Attacking SQlite

Doctor

Doctor attempts to access a patient’s history

Cloud

6

Page 25: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Case Study: Attacking SQlite

Query1: Bob’s heart history

Doctor

Doctor attempts to access a patient’s history

Cloud

6

Query2: Alice’s heart history

Page 26: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Case Study: Attacking SQlite

Query1: Bob’s heart history

Doctor

SGX-protected SQLite

Doctor attempts to access a patient’s history

Cloud

6

Query2: Alice’s heart history

Page 27: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Case Study: Attacking SQliteName

LungsCondition

Heartcondition

Query1: Bob’s heart history

Doctor

SGX-protected SQLite

Doctor attempts to access a patient’s history

Cloud

6

Query2: Alice’s heart history

Page 28: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Name

Bob …

LungCondition

Heartcondition

… … …

Alice …

Eve …

Page 29: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

historyName

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Page 30: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

history 1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,32768);

Syscall Snooping Attack

Name

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Page 31: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

history 1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,32768);

Syscall Snooping Attack

Name

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Page Table Attack

Time

Ad

dre

ss

Page 32: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

history 1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,32768);

Syscall Snooping Attack

Name

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Page Table Attack

Query1

Time

Ad

dre

ss

Page 33: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

history 1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,32768);

Syscall Snooping Attack

Name

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Alice …

Page Table Attack

Time

Ad

dre

ss

Query2:Alice’s heart

history

Page 34: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

history 1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,32768);

1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,40960);

Syscall Snooping Attack

Name

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Alice …

Page Table Attack

Time

Ad

dre

ss

Query2:Alice’s heart

history

Page 35: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

history 1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,32768);

1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,40960);

Syscall Snooping Attack

Name

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Alice …

Page Table Attack

Time

Ad

dre

ss

Query2

Query2:Alice’s heart

history

Page 36: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What the attacker sees?

med.db

Query1:Bob’s heart

history 1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,32768);

1. open(”med.db”, . .);2. pread64(…,4096,0);3. pread64(…,4096,4096);4. pread64(…,4096,40960);

Syscall Snooping Attack

Name

Bob …

LungCondition

Heartcondition

… … …

Bob …

Alice …

Eve …

Alice …

Page Table Attack

Time

Ad

dre

ss

Query2

Query2:Alice’s heart

history

Predictable access patterns in file operations leak sensitive information!

Page 37: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What should we do?

8

Page 38: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What should we do?

Masking individual memory side-channels is risky

8

Page 39: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What should we do?

Masking individual memory side-channels is risky

Memory side-channels rely on predictable access patterns

8

Page 40: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What should we do?

Masking individual memory side-channels is risky

Memory side-channels rely on predictable access patterns

How to provide strong protection despite memory traces?

8

Page 41: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

What should we do?

Masking individual memory side-channels is risky

Memory side-channels rely on predictable access patterns

How to provide strong protection despite memory traces?

8

Oblivious RAM is one possible solution to this problem

Page 42: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Oblivious RAM

User Clouds

B

D E

C

F

A

User’s goal: Securely access data stored in the cloud

Attacker’s goal: Figure out what data-block is being accessed

9

Page 43: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Path ORAM

Improved variant of Oblivious RAM [Stephanov et. al, CCS12]

d

d C

A B d D

Server

A 00

B 01

C 10

D 11

Position Map

Client

Stash

stores position of block

stores acquired blocks

holds encrypted real blocks and dummy blocks

ORAM Tree

0 1

0 01 1 d dummy

A real

Legend

10

Page 44: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

11

Page 45: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

11

Page 46: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

OBLIVIATE!

11

Page 47: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

OBLIVIATE!

11

Page 48: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: memory charm against the OS ☺

Obliviate

Filesystem EnclaveApplication Enclave

Disk

12

Page 49: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: memory charm against the OS ☺

Obliviate

Filesystem EnclaveApplication Enclave

Disk

12

(Init) load all files into

ORAM Tree(s)

ORAM Trees

C

A B D

Page 50: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: memory charm against the OS ☺

Trusted Proxy

1. FS Syscall Interceptor

Obliviate

Filesystem EnclaveApplication Enclave

Disk

12

ORAM Trees

C

A B D

Page 51: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: memory charm against the OS ☺

Trusted Proxy

Obliviate

2. Encrypted Channel

Filesystem EnclaveApplication Enclave

Disk

12

ORAM Trees

C

A B D

Page 52: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: memory charm against the OS ☺

Trusted Proxy

Obliviate

Filesystem EnclaveApplication Enclave

Disk

12

ORAM Trees

C

A B D

3. Data Oblivious Metadata Handling

Page 53: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: memory charm against the OS ☺

Trusted Proxy

Obliviate

Filesystem EnclaveApplication Enclave

Disk

12

ORAM Trees

C

A B D

4. Asynchronous ORAM Operation

Page 54: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Obliviate: memory charm against the OS ☺

Trusted Proxy

Obliviate

Filesystem EnclaveApplication Enclave

Disk5. Extended

Secure Region12

ORAM Trees

C

A B D

Page 55: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Decoupling file system support

Disk

Application Enclaves Obliviate

13

Page 56: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Decoupling file system support

Disk

Application Enclaves Obliviate

Pass all FS syscalls using encrypted

channel

13

Page 57: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Decoupling file system support

Allow Obliviate to worry about securing

file access

Disk

Application Enclaves Obliviate

Pass all FS syscalls using encrypted

channel

13

Page 58: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Decoupling file system support

Allow Obliviate to worry about securing

file access

Disk

Application Enclaves Obliviate

Pass all FS syscalls using encrypted

channel

13

Separation of functions facilitates development!

Page 59: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Legacy application supportApplication

14

Page 60: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Legacy application support

Intercept FS syscalls and encrypt

Trusted Proxy

Application

14

Page 61: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Legacy application support

Intercept FS syscalls and encrypt

Trusted Proxy

Exit-less message queue(SCONE [OSDI16], ELEOS

[EuroSys17])

Application

Oblivate

Disk 14

Page 62: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Legacy application support

Intercept FS syscalls and encrypt

Trusted Proxy

Exit-less message queue(SCONE [OSDI16], ELEOS

[EuroSys17])

Application

Oblivate

Disk 14

No changes from the app developer!

Page 63: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Obliviate

Disk15

Application

Page 64: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Obliviate

Disk

Position Map

Stash

ORAM client

15

Need to store metadata in enclaveApplication

Page 65: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Obliviate

Disk

Position Map

Stash

ORAM client

Obliviate’s enclave is not side-channel

free

15

Application

Page 66: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Position Map

Obliviate

Disk

Position Map

Stash

ORAM client

15

Application

Page 67: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Position Map

Load from index

Obliviate

Disk

Position Map

Stash

ORAM client

15

Application

Page 68: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Position Map

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

Page Table

cache-set 0

cache-set 1

cache-set 2

cache-set 3

Last-Level Cache

1 0x1003

Obliviate

Disk

Position Map

Stash

ORAM client

15

Application

Page 69: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Position Map

Use Conditional Move(CMOV)

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

Page Table

cache-set 0

cache-set 1

cache-set 2

cache-set 3

Last-Level Cache

1 0x1003

Obliviate

Disk

Position Map

Stash

ORAM client

15

Application

Page 70: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Position Map

Use Conditional Move(CMOV)

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

Page Table

cache-set 0

cache-set 1

cache-set 2

cache-set 3

Last-Level Cachecache-set 0

cache-set 1

cache-set 2

1 0x1003

1 0x1000

1 0x1001

1 0x1002

Obliviate

Disk

Position Map

Stash

ORAM client

15

Application

Page 71: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Position Map

Use Conditional Move(CMOV)

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

Page Table

cache-set 0

cache-set 1

cache-set 2

cache-set 3

Last-Level Cachecache-set 0

cache-set 1

cache-set 2

1 0x1003

1 0x1000

1 0x1001

1 0x1002

Obliviate

Disk

Position Map

Stash

ORAM client

15

The attacker cannot distinguish CMOV from MOV

Application

Page 72: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing ORAM

Position Map

Use Conditional Move(CMOV)

Access Frame #

0 0x1000

0 0x1001

0 0x1002

0 0x1003

Page Table

cache-set 0

cache-set 1

cache-set 2

cache-set 3

Last-Level Cachecache-set 0

cache-set 1

cache-set 2

1 0x1003

1 0x1000

1 0x1001

1 0x1002

Obliviate

Disk

Position Map

Stash

ORAM client

15

The attacker cannot distinguish CMOV from MOV

Application

Side-channel resistant ORAM implementation!

Page 73: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Extending Enclave Memory

16

Obliviate

Disk

Page 74: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Extending Enclave Memory

16

EPC

Physical Memory

Program

Obliviate

Disk

Large enclaves degrade performance

Page 75: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Extending Enclave Memory

Metadata (small) inside enclave

ORAM Trees (large) outside enclave

16

EPC

Physical Memory

Program

Obliviate

Disk

Encrypted ORAM Trees

C

A B D

Position Map

Stash

ORAM Client

Large enclaves degrade performance

Page 76: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Extending Enclave Memory

Metadata (small) inside enclave

ORAM Trees (large) outside enclave

16

EPC

Physical Memory

Program

Obliviate

Disk

Encrypted ORAM Trees

C

A B D

Position Map

Stash

ORAM Client

Large enclaves degrade performance

Encrypted ORAM trees outside enclave!

Page 77: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Leveraging asynchronicity

CommunicationThread

OperationThread

Obliviate

17

Disk

Encrypted ORAM Trees

C

A B D

Application

Page 78: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Leveraging asynchronicity

CommunicationThread

OperationThread

Obliviate

17

Disk

Encrypted ORAM Trees

C

A B D

Application

(a) read(1, 0x18289, 4096)

Page 79: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Leveraging asynchronicity

CommunicationThread

OperationThread

Obliviate

17

Disk

Encrypted ORAM Trees

C

A B D

(b) Read(A)

Application

(a) read(1, 0x18289, 4096)

Page 80: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Leveraging asynchronicity

CommunicationThread

OperationThread

Obliviate

17

(c) Reply to the request

Disk

Encrypted ORAM Trees

C

A B D

(c) Write-back(A)(b) Read(A)

Application

(a) read(1, 0x18289, 4096)

Page 81: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Leveraging asynchronicity

CommunicationThread

OperationThread

Obliviate

17

(c) Reply to the request

Disk

Encrypted ORAM Trees

C

A B D

(c) Write-back(A)(b) Read(A)

Application

(a) read(1, 0x18289, 4096)

Perform Asynchronous ORAM write-back!

Page 82: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Implementation

1. Obliviate runs using Intel SGX SDK Library

2. Graphene-SGX integration to run “heavyweight”applications, e.g. , SQLite and Lighttpd

18

Page 83: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Performance Evaluation

Evaluated filesystems:

1. Native Filesystem (Non-SGX)

2. In-memory Filesystem (SGX, based on Graphene-SGX)

3. Obliviate (SGX, based on Intel SGX SDK)

19

Page 84: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Iozone Benchmarks

a) Sequential Reads (Bytes/sec) b) Sequential Writes (Bytes/sec)

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

20

Page 85: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Iozone Benchmarks

a) Sequential Reads (Bytes/sec) b) Sequential Writes (Bytes/sec)

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

2-3x overhead over the in-memory FS

20

Page 86: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Iozone Benchmarks

a) Sequential Reads (Bytes/sec) b) Sequential Writes (Bytes/sec)

In-memory FS exerts a lot of pressure on EPC

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

2-3x overhead over the in-memory FS

20

Page 87: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Iozone Benchmarks

a) Sequential Reads (Bytes/sec) b) Sequential Writes (Bytes/sec)

Comparable performance for smaller file sizes

In-memory FS exerts a lot of pressure on EPC

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

1

10

100

1000

10000

100000

1000000

10000000

2M 128M 512M 1G

Native FS In-memory FS Obliviate

2-3x overhead over the in-memory FS

20

Page 88: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Macro-Benchmarks

a) SQLite Response Times (milli-sec) b) Lighttpd Throughput (Req/s)

100

1000

10000

1K 16K 128K 1M

In-memory FS Obliviate

0

500

1000

1500

2000

2500

INSERT SELECT

In-memory FS Obliviate

21

Page 89: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Macro-Benchmarks

a) SQLite Response Times (milli-sec) b) Lighttpd Throughput (Req/s)

~2x overhead over in-memory FS

100

1000

10000

1K 16K 128K 1M

In-memory FS Obliviate

0

500

1000

1500

2000

2500

INSERT SELECT

In-memory FS Obliviate

21

Page 90: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Conclusion

22

Page 91: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Conclusion

1. All existing SGX filesystems are vulnerable to side-channels

22

Page 92: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Conclusion

1. All existing SGX filesystems are vulnerable to side-channels

2. File system operations can leak sensitive information about program execution.

22

Page 93: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Conclusion

1. All existing SGX filesystems are vulnerable to side-channels

2. File system operations can leak sensitive information about program execution.

3. Obliviate provides theoretically-strong defense against side-channels.

22

Page 94: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Conclusion

1. All existing SGX filesystems are vulnerable to side-channels

2. File system operations can leak sensitive information about program execution.

3. Obliviate provides theoretically-strong defense against side-channels.

22

Opensource: https://github.com/adilahmad17/ObliviateContact: [email protected]

Page 95: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Thanks! Merci! Shukriya!

23

Page 96: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Extra Slides

24

Page 97: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing file system

25

Page 98: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing file system

c

a b d

25

Page 99: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing file system

c

a b d

Single ORAM Tree protects

file offset

25

Page 100: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing file system

c

a b d

c

a b d

c

a b d

c

a b d

c

a b d

c

a b d

c

a b d

Hierarchical ORAM Trees

can protect files

Single ORAM Tree protects

file offset

25

Page 101: Obliviate: A Data Oblivious Filesystem for Intel SGX€¦ · Doctor Doctor attempts to access a patient’s history Cloud 6. Case Study: Attacking SQlite Query1: Bob’s heart history

Securing file system

c

a b d

c

a b d

c

a b d

c

a b d

c

a b d

c

a b d

c

a b d

Hierarchical ORAM Trees

can protect files

Single ORAM Tree protects

file offset

Protect both file and file offset!

25