Obliviate: A Data Oblivious File System for Intel SGX
Adil Ahmad Kyungtae Kim Muhammad Ihsanulhaq Sarfaraz Byoungyoung Lee
1
System for Intel SGX Adil Ahmad Kyungtae Kim Muhammad Ihsanulhaq - - PowerPoint PPT Presentation
Obliviate: A Data Oblivious File System for Intel SGX Adil Ahmad Kyungtae Kim Muhammad Ihsanulhaq Sarfaraz Byoungyoung Lee 1 Clouds? The Ultimate Dream? User Clouds 2 Clouds? The Ultimate Dream? User Clouds 2 Clouds? The Ultimate
Adil Ahmad Kyungtae Kim Muhammad Ihsanulhaq Sarfaraz Byoungyoung Lee
1
Clouds User
2
Clouds User
2
Clouds User Hmm, SGX??
2
Clouds User Hmm, SGX??
2
Clouds User Hmm, SGX??
2
Clouds User Hmm, SGX?? Thanks, SGX?! ☺
2
Clouds User Hmm, SGX?? Thanks, SGX?! ☺
2
Program’s Address Space
3
Program’s Address Space Non- Enclave Enclave
3
Confidentiality and integrity- protected T rusted execution region
Program’s Address Space Non- Enclave Enclave System Components Restricted by the processor
3
Confidentiality and integrity- protected T rusted execution region
Disk
4
Disk
Enclaves are ring-3
4
Disk
Enclaves are ring-3 Rely on OS for ring-0 ops Operating System
4
Disk
Enclaves are ring-3
1.
2. read(2, 0x1000, 4096); 3. ….
Rely on OS for ring-0 ops Operating System
4
Disk
Enclaves are ring-3
1.
2. read(2, 0x1000, 4096); 3. ….
Rely on OS for ring-0 ops Operating System Allow OS to handle file buffer (native)
4
Disk
Enclaves are ring-3
1.
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
Operating System Enclave
Page table attacks against SGX
[S&P14, SEC17] Cache attacks against SGX [DIMVA17, WOOT17, EuroSec17]
5
Data.txt
Access Frame #
0x1000 0x1001 0x1002 0x1003 0x1004
Page T able
Operating System Enclave Accessed by the enclave
Page table attacks against SGX
[S&P14, SEC17] Cache attacks against SGX [DIMVA17, WOOT17, EuroSec17]
5
Data.txt
Access Frame #
0x1000 0x1001 0x1002 0x1003 0x1004
Page T able
Operating System 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
Access Frame #
0x1000 0x1001 0x1002 0x1003 0x1004
Page T able
Operating System 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
Access Frame #
0x1000 0x1001 0x1002 0x1003 0x1004
Page T able
Operating System 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 3 Cache attacks against SGX [DIMVA17, WOOT17, EuroSec17]
5
Data.txt
Doctor Cloud
6
Doctor Doctor attempts to access a patient’s history Cloud
6
Query1: Bob’s heart history Doctor Doctor attempts to access a patient’s history Cloud
6
Query2: Alice’s heart history
Query1: Bob’s heart history Doctor SGX-protected SQLite Doctor attempts to access a patient’s history Cloud
6
Query2: Alice’s heart history
Name Lungs Condition Heart condition
Query1: Bob’s heart history Doctor SGX-protected SQLite Doctor attempts to access a patient’s history Cloud
6
Query2: Alice’s heart history
med.db
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Alice
…
Eve
… … …
med.db
Query1: Bob’s heart history
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
med.db
Query1: Bob’s heart history
1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,32768);
Syscall Snooping Attack
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
med.db
Query1: Bob’s heart history
1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,32768);
Syscall Snooping Attack
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
Page T able Attack
Time Address
med.db
Query1: Bob’s heart history
1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,32768);
Syscall Snooping Attack
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
Page T able Attack Query1
Time Address
med.db
Query1: Bob’s heart history
1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,32768);
Syscall Snooping Attack
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
Alice
…
Page T able Attack
Time Address
Query2: Alice’s heart history
med.db
Query1: Bob’s heart history
1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,32768); 1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,40960);
Syscall Snooping Attack
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
Alice
…
Page T able Attack
Time Address
Query2: Alice’s heart history
med.db
Query1: Bob’s heart history
1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,32768); 1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,40960);
Syscall Snooping Attack
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
Alice
…
Page T able Attack
Time Address
Query2 Query2: Alice’s heart history
med.db
Query1: Bob’s heart history
1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,32768); 1.
, ..); 2. pread64(…,4096,0); 3. pread64(…,4096,4096); 4. pread64(…,4096,40960);
Syscall Snooping Attack
Name
Bob
…
Lung Condition
…
Heart condition
… … …
Bob
…
Alice
…
Eve
… … …
Alice
…
Page T able Attack
Time Address
Query2 Query2: Alice’s heart history
8
Masking individual memory side-channels is risky
8
Masking individual memory side-channels is risky Memory side-channels rely on predictable access patterns
8
Masking individual memory side-channels is risky Memory side-channels rely on predictable access patterns How to provide strong protection despite memory traces?
8
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
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
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
stores acquired blocks holds encrypted real blocks and dummy blocks
ORAM T ree
1 1 1
d
dummy
A
real
Legend
10
11
11
OBLIVIA TE!
11
OBLIVIA TE!
11
Obliviate
Filesystem Enclave Application Enclave
Disk
12
Obliviate
Filesystem Enclave Application Enclave
Disk
12
(Init) load all files into ORAM T ree(s)
ORAM Trees
C A B D
T rusted Proxy
Interceptor
Obliviate
Filesystem Enclave Application Enclave
Disk
12
ORAM Trees
C A B D
T rusted Proxy
Obliviate
Channel
Filesystem Enclave Application Enclave
Disk
12
ORAM Trees
C A B D
T rusted Proxy
Obliviate
Filesystem Enclave Application Enclave
Disk
12
ORAM Trees
C A B D
Metadata Handling
T rusted Proxy
Obliviate
Filesystem Enclave Application Enclave
Disk
12
ORAM Trees
C A B D
ORAM Operation
T rusted Proxy
Obliviate
Filesystem Enclave Application Enclave
Disk
Secure Region
12
ORAM Trees
C A B D
Disk
Application Enclaves Obliviate
13
Disk
Application Enclaves Obliviate
Pass all FS syscalls using encrypted channel
13
Allow Obliviate to worry about securing file access
Disk
Application Enclaves Obliviate
Pass all FS syscalls using encrypted channel
13
Allow Obliviate to worry about securing file access
Disk
Application Enclaves Obliviate
Pass all FS syscalls using encrypted channel
13
Application
14
Intercept FS syscalls and encrypt
T rusted Proxy
Application
14
Intercept FS syscalls and encrypt
T rusted Proxy
Exit-less message queue
(SCONE [OSDI16], ELEOS [EuroSys17]) Application
Oblivate
Disk
14
Intercept FS syscalls and encrypt
T rusted Proxy
Exit-less message queue
(SCONE [OSDI16], ELEOS [EuroSys17]) Application
Oblivate
Disk
14
Obliviate
Disk
15
Application
Obliviate
Disk
Position Map Stash
ORAM client
15
Need to store metadata in enclave
Application
Obliviate
Disk
Position Map Stash
ORAM client
Obliviate’s enclave is not side-channel free
15
Application
Position Map
Obliviate
Disk
Position Map Stash
ORAM client
15
Application
Position Map
Load from index
Obliviate
Disk
Position Map Stash
ORAM client
15
Application
Position Map
Access Frame #0x1000 0x1001 0x1002 0x1003
Page T able
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
Position Map
Use Conditional Move (CMOV)
Access Frame #0x1000 0x1001 0x1002 0x1003
Page T able
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
Position Map
Use Conditional Move (CMOV)
Access Frame #0x1000 0x1001 0x1002 0x1003
Page T able
cache-set 0 cache-set 1 cache-set 2
cache-set 3
Last-Level Cache
cache-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
Position Map
Use Conditional Move (CMOV)
Access Frame #0x1000 0x1001 0x1002 0x1003
Page T able
cache-set 0 cache-set 1 cache-set 2
cache-set 3
Last-Level Cache
cache-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
Position Map
Use Conditional Move (CMOV)
Access Frame #0x1000 0x1001 0x1002 0x1003
Page T able
cache-set 0 cache-set 1 cache-set 2
cache-set 3
Last-Level Cache
cache-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
16
Obliviate Disk
16
EPC Physical Memory Program
Obliviate Disk
Large enclaves degrade performance
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
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
Communication Thread Operation Thread
Obliviate
17
Disk
Encrypted ORAM Trees
C A B D
Application
Communication Thread Operation Thread
Obliviate
17
Disk
Encrypted ORAM Trees
C A B D
Application
(a) read(1, 0x18289, 4096)
Communication Thread Operation Thread
Obliviate
17
Disk
Encrypted ORAM Trees
C A B D
(b) Read(A)
Application
(a) read(1, 0x18289, 4096)
Communication Thread Operation Thread
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)
Communication Thread Operation Thread
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)
18
19
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
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
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
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
a) SQLite Response Times (milli-sec) b) Lighttpd Throughput (Req/s)
100 1000 10000
1K 16K 128K 1M
In-memory FS Obliviate
500 1000 1500 2000 2500
INSERT SELECT
In-memory FS Obliviate
21
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
500 1000 1500 2000 2500
INSERT SELECT
In-memory FS Obliviate
21
22
22
execution.
22
execution.
channels.
22
execution.
channels.
22
Opensource: https://github.com/adilahmad17/Obliviate Contact: ahmad37@purdue.edu
23
24
25
c a b d
25
c a b d
Single ORAM Tree protects file offset
25
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
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