Yuanzhong Xu, Weidong Cui, Marcus Peinado

Slides:



Advertisements
Similar presentations
Virtualization Technology
Advertisements

Virtualisation From the Bottom Up From storage to application.
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Secure In-VM Monitoring Using Hardware Virtualization Monirul Sharif, Wenke Lee, Weidong Cui, and Andrea Lanzi Presented by Tyler Bletsch.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
1 Implementing an Untrusted Operating System on Trusted Hardware David Lie Chandramohan A. Thekkath Mark Horowitz University of Toronto, Microsoft Research,
4/14/2017 Discussed Earlier segmentation - the process address space is divided into logical pieces called segments. The following are the example of types.
Shielding Applications from an Untrusted Cloud Andrew Baumann, Marcus Peinado, and Galen Hunt. OSDI Fall 2014 Presenter: Kun Sun, Ph.D. Most slides.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Virtual Memory Virtual Memory Management in Mach Labels and Event Processes in Asbestos Ingar Arntzen.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Early OS security Overview by: Greg Morrisett Cornell University, Edited (by permission) for CSUS CSc250 by Bill Mitchell.
Towards Application Security On Untrusted OS
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
CS333 Intro to Operating Systems Jonathan Walpole.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker.
Native Client: A Sandbox for Portable, Untrusted x86 Native Code
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Lecture Topics: 11/17 Page tables TLBs Virtual memory flat page tables
Operating Systems COMP 4850/CISG 5550 Page Tables TLBs Inverted Page Tables Dr. James Money.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Virtual Memory Expanding Memory Multiple Concurrent Processes.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-8 Memory Management (2) Department of Computer Science and Software.
Author: Monirul Sharif, Wenke Lee, Weidong Cui, Andrea Lanzi Reportor: Chun-Chih Wu Advisor: Hsing-Kuo Pao Select: CCS09’
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
G53SEC 1 Reference Monitors Enforcement of Access Control.
Zeldovich et al. (both papers) Reading Group by Theo.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
Exploiting Cache-Timing in AES: Attacks and Countermeasures Ivo Pooters March 17, 2008 Seminar Information Security Technology.
Precomputation- based Prefetching By James Schatz and Bashar Gharaibeh.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Hardware.
Operating Systems: Wrap-Up Questions answered in this lecture: What is an Operating System? Why are operating systems so interesting? What techniques can.
Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.
Lecture 5 Rootkits Hoglund/Butler (Chapters 1-3).
CDA 5155 Virtual Memory Lecture 27. Memory Hierarchy Cache (SRAM) Main Memory (DRAM) Disk Storage (Magnetic media) CostLatencyAccess.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Preventing Page Faults from Telling Your Secrets Shweta Shinde Zheng Leong Chua Vishwesh Narayanan Prateek Saxena National University of Singapore.
CS161 – Design and Architecture of Computer
Translation Lookaside Buffer
143A: Principles of Operating Systems Lecture 6: Address translation (Paging) Anton Burtsev October, 2017.
Page Table Implementation
Chapter 8: Main Memory Source & Copyright: Operating System Concepts, Silberschatz, Galvin and Gagne.
CS510 Operating System Foundations
Bruhadeshwar Meltdown Bruhadeshwar
CSCI206 - Computer Organization & Programming
Ryoan: A Distributed Sandbox for Untrusted Computation on Secret Data
Guoxing Chen1* & Wenhao Wang2,3*, Tianyu Chen2, Sanchuan Chen1,
Bastion secure processor architecture
Virtual Memory Hardware
CSE 451: Operating Systems Autumn 2005 Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Sai Krishna Deepak Maram, CS 6410
SCONE: Secure Linux Containers Environments with Intel SGX
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Shielding applications from an untrusted cloud with Haven
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
CS703 - Advanced Operating Systems
Bruce Maggs (with some slides from Bryan Parno)
Bruce Maggs (with some slides from Bryan Parno)
MicroScope: Enabling Microarchitectural Replay Attacks
Meltdown & Spectre Attacks
Presentation transcript:

Controlled-Channel Attacks: Deterministic Side Channels for Untrusted Operating Systems Yuanzhong Xu, Weidong Cui, Marcus Peinado The University of Texas at Austin, Microsoft Research San Jose, CA May 19, 2015

Applications run on top of OS

Reasons to distrust the OS rootkit Large code bases, security bugs

Reasons to distrust the OS Hosted on untrusted cloud OS

“Shielding systems:” remove OS from trusted computing base (TCB) Use hypervisor or secure hardware to confine OS Hypervisor-based Overshadow [ASPLOS '08] InkTag [ASPLOS '13] Intel SGX-based Haven [OSDI '14] OS Hypervisor or SGX CPU

“Shielding systems:” remove OS from trusted computing base (TCB) Hypervisor or SGX protects application memory pages from OS Secrecy Integrity Protected app memory pages OS Hypervisor or SGX CPU

“Shielding systems:” backward-compatibility & functionality Run legacy applications, on a legacy OS (with small or no modifications) OS is still needed Memory management Storage Network … OS Efficient memory management Hypervisor or SGX CPU

“Shielding systems:” backward-compatibility & functionality Run legacy applications, on a legacy OS (with small or no modifications) OS is still needed Memory management Storage Network … Protected app memory pages Application page table OS Integrity Hypervisor or SGX CPU

Breaking the shield (1/3) JPEG decoding (libjpeg) OS Hypervisor (InkTag) or SGX CPU (Haven)

Breaking the shield (2/3) Font rendering (FreeType) The treasure is buried ten feet north of the third palm tree 100% accuracy English letters Common punctuation marks The treasure is buried ten feet north of the third palm tree OS Hypervisor (InkTag) or SGX CPU (Haven)

Breaking the shield (3/3) Spell checking (Hunspell) Folklore, legends, myths and fairy tales… 96% accuracy All words in novel “The Wizard of OZ” folklore *legend* myths and fairy *tale*… OS Hypervisor (InkTag) or SGX CPU (Haven)

How? “Controlled-channel attacks” – Side channel attacks from the OS Powerful due to the OS’ control over the applications

Side-channel attacks Traditional side channels: cache access, power consumption, network traffic… Victim 1 secret

Side-channel attacks Traditional side channels: cache access, power consumption, network traffic… System noise: context switches, TLB flushes, exceptions, page faults Victim secret

Side channels for the OS Under attacker’s control System noise: context switches, TLB flushes, exceptions, page faults Victim secret Noise-free channel OS

“Controlled-channel attacks” Page faults as a side channel Deterministic: OS controls page tables Set traps by making pages inaccessible Do not need timing Protected app memory pages Application page table Page faults OS Challenge: page-level granularity Hypervisor or SGX CPU

Input-dependent memory access Page X Page Y Page Z Page fault sequence X, Y Page fault sequence X, Z if (input) func1() func2()

Input-dependent memory access input = n Page X read array[n] N >= 4 Page fault sequence: X, Z N <= 3 Page fault sequence: X, Y Page Y Page Z array 1 2 3 4 5 6 7

Hunspell Open-source spell checker, used in

Hunspell – hash table Separate chaining Pointer array: index is hash code Assumption: Dictionary is known Load Page-level knowledge about layout PG 1 PG 2 PG 3 PG 4 PG 5 PG 6 PG 7 a side Page faults change attack channel size Linked lists Out of textbook. Standard data structure can leak data. Many other apps may also

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: 4

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: 4 7

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: 4 7 1

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: 4 7 1 5

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: 4 7 1 5 6

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: 4 7 1 5 6 3

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: 4 7 1 5 6 3 5

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 Input: side channel attack while (word) { n = hash(word); listnode = table[n]; while (listnode) { if (equal(listnode, word)) break; listnode = listnode->next; } if (listnode) success(); else failure(); word = get_next(); a side change attack channel size PG 5 PG 6 PG 7 Page faults: h 4 7 1 5 6 3 5 h h side channel attack

Hunspell – hash table lookup PG 1 PG 2 PG 3 PG 4 hash Hash function shuffles the order Low correlation between The address of the head pointer The addresses of the list nodes Low ambiguity a side change attack channel size Output of hash is uncorrelated to anything One page 512 pointers PG 5 PG 6 PG 7 Page faults: h 4 7 1 5 6 3 5 h h side channel attack

Attack results Implemented 3 attacks (Hunspell, FreeType, libjpeg) on both Haven and InkTag Hunspell (spell checking) ~96% accuracy for novel “The Wizard of Oz” FreeType (font rendering) 100% accuracy for any English input (letters and punctuation marks)

libjpeg results

Performance overhead Non-trivial overhead due to expensive page fault handling The attacks are still realistic to execute Hunspell: 2.94s to check the entire novel (39,719 words) FreeType: 0.52s to render 5 KB text Small run time may be hidden in noises

Thoughts on potential mitigations No great off-the-shelf solution Applications: rewrite to hide access patterns Manually (e.g., OpenSSL) or by compiler High cost for complex legacy apps: engineering effort & performance overhead Shielding systems: more restrictions over the OS Restrictions on memory management May affect functionality Rethink the challenges for Overshadow’s vision – protect legacy applications from legacy untrusted operating systems

Conclusion An untrusted OS can construct noise-free side channels. The page-fault side channel leaks large amounts of information about legacy applications. Controlled-channel attacks must be addressed in the design of shielding systems.