InkTag: Secure Applications on an Untrusted Operating System Owen Hofmann, Sangman Kim, Alan Dunn, Mike Lee, Emmett Witchel UT Austin
You trust your OS... should you? • The OS is the software root of trust on most systems • The OS is a shared vulnerability App App App App • OS compromise infects all • The OS is a vulnerable vulnerability OS • Syscall interface a complex attack surface • ioctl() • Root often has OS-level privilege 2
You trust your OS... should you? • The OS is the software root of trust on most systems • The OS is a shared vulnerability App App App App App • OS compromise infects all • The OS is a vulnerable vulnerability OS • Syscall interface a complex attack surface • ioctl() • Root often has OS-level privilege 2
You trust your OS... should you? • The OS is the software root of trust on most systems • The OS is a shared vulnerability App App App App App • OS compromise infects all • The OS is a vulnerable vulnerability OS OS • Syscall interface a complex attack surface • ioctl() • Root often has OS-level privilege 2
You trust your OS... should you? • The OS is the software root of trust on most systems • The OS is a shared vulnerability App App App App App App App App • OS compromise infects all • The OS is a vulnerable vulnerability OS OS • Syscall interface a complex attack surface • ioctl() • Root often has OS-level privilege 2
You should trust the hypervisor • Hypervisors have become a common part of the software stack • Provide a layer of indirection App App App App under the OS • Hypervisors can be more trustworthy OS • Fewer lines of code • Thinner interface • Fewer vulnerabilities Hypervisor 3
But the OS is still a problem • Users want trustworthy App App App App applications • Applications still must trust OS the OS Hypervisor 4
But the OS is still a problem • Users want trustworthy App App App App applications • Applications still must trust OS OS the OS Hypervisor 4
But the OS is still a problem • Users want trustworthy App App App App App App App App applications • Applications still must trust OS OS the OS Hypervisor 4
Removing OS trust • Why can the kernel compromise applications? App App App App • No isolation • OS still provides all essential services OS • File I/O • Memory mapping Hypervisor 5
Isolate and verify • Can the hypervisor improve this situation? • Previous systems have App App App App examined this problem • Overshadow [ASPLOS ’08] • Trusted hypervisor isolates an OS application from an untrusted kernel • Ensure that the OS follows its Hypervisor contract with the application 6
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(NULL, ..., F, offset); • Application expects pages from file F page table at address V 2. OS updates low-level state • Immediately • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 7
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(NULL, ..., F, offset); • Application expects pages from file F mmap() page table at address V 2. OS updates low-level state • Immediately 0x7FFCB... • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 7
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(file=F, offset=O); • Application expects pages from file F mmap() page table at address V 2. OS updates low-level state • Immediately 0x7FFCB... • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 8
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(file=F, offset=O); • Application expects pages from file F page table at address V 2. OS updates low-level state • Immediately • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 9
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(file=F, offset=O); • Application expects pages from file F page table page fault at address V 2. OS updates low-level state • Immediately • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 9
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(file=F, offset=O); • Application expects pages from file F page table page fault at address V 2. OS updates low-level state • Immediately set_pte() • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 9
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(file=F, offset=O); • Application expects pages from file F page table page fault at address V 2. OS updates low-level state • Immediately • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 9
Verifying OS behavior 1. Application asks OS to update high-level state App • V = mmap(file=F, offset=O); • Application expects pages from file F page table page fault at address V 2. OS updates low-level state • Immediately • On-demand (e.g. paging) 3. Do OS updates match application OS requests? • Did the OS map a frame containing data from F at the correct offset? Hypervisor 10
Verifying OS behavior • Application and hypervisor App communicate • Synchronize on high-level page table application state • Hypervisor interposes on low-level updates • Validate updates against expected state • Hypervisor requires deep OS visibility into OS, application (semantic gap) Hypervisor 11
Verifying OS behavior • Application and hypervisor App communicate • Synchronize on high-level page table application state • Hypervisor interposes on low-level updates set_pte() • Validate updates against expected state • Hypervisor requires deep OS visibility into OS, application (semantic gap) Hypervisor 11
• InkTag: secure applications on an untrusted OS • Paraverification: require active participation from the untrusted OS for simpler, more efficient hypervisor design 12
InkTag security guarantees • Control flow integrity • OS cannot change program counter, registers • Address space integrity • OS cannot read or modify application data • File I/O • Applications access the desired files • Privacy and integrity for file data • Built on address space integrity • Process control • Applications can fork(), exec() • Access control and naming • Applications can define access control policies, use string filenames • Consistency • OS-managed data and hypervisor-managed metadata remain in sync 13
InkTag security guarantees • Control flow integrity • OS cannot change program counter, registers • Address space integrity • OS cannot read or modify application data • File I/O • Applications access the desired files • Privacy and integrity for file data • Built on address space integrity • Process control • Applications can fork(), exec() • Access control and naming • Applications can define access control policies, use string filenames • Consistency • OS-managed data and hypervisor-managed metadata remain in sync 14
InkTag security guarantees • Control flow integrity • OS cannot change program counter, registers • Address space integrity • OS cannot read or modify application data • File I/O • Applications access the desired files • Privacy and integrity for file data • Built on address space integrity • Process control • Applications can fork(), exec() • Access control and naming • Applications can define access control policies, use string filenames • Consistency • OS-managed data and hypervisor-managed metadata remain in sync 15
InkTag security guarantees • Control flow integrity • OS cannot change program counter, registers • Address space integrity • OS cannot read or modify application data • File I/O • Applications access the desired files • Privacy and integrity for file data • Basic memory isolation mechanisms • Built on address space integrity • Challenges: why is this difficult? • Process control • • Paraverification: how can the untrusted OS help? Applications can fork(), exec() • Access control and naming • Applications can define access control policies, use string filenames • Consistency • OS-managed data and hypervisor-managed metadata remain in sync 16
Recommend
More recommend