1 Information Security – Theory vs. Reality 0368-4474, Winter 2015-2016 Lecture 1: Introduction, Architectural side channels 1/2 Lecturer: Eran Tromer.

Slides:



Advertisements
Similar presentations
Distributed System Lab.1 Hey, You, Get Off of My Cloud: Exploring Information Leakage in Third-Party Compute Clouds Thomas Ristenpart ¤, Eran Tromer, Hovav.
Advertisements

Rohit Kugaonkar CMSC 601 Spring 2011 May 9 th 2011
Lecture 5: Cloud Security: what’s new? Xiaowei Yang (Duke University)
Lecture 4: Cloud Computing Security: a first look Xiaowei Yang (Duke University)
Ragib Hasan Johns Hopkins University en Spring 2010 Lecture 3 02/15/2010 Security and Privacy in Cloud Computing.
1 Hardware Support for Isolation Krste Asanovic U.C. Berkeley MURI “DHOSA” Site Visit April 28, 2011.
Hey, You, Get Off of My Cloud: Exploring Information Leakage in Third-Party Compute Clouds Yan Qiang,
Virtualization and Cloud Computing. Definition Virtualization is the ability to run multiple operating systems on a single physical system and share the.
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
Practical Timing Side Channel Attacks Against Kernel Space ASLR
Resource-Freeing Attacks: Improve Your Cloud Performance (at Your Neighbor's Expense) (Venkat)anathan Varadarajan, Thawan Kooburat, Benjamin Farley, Thomas.
Public Clouds (EC2, Azure, Rackspace, …) VM Multi-tenancy Different customers’ virtual machines (VMs) share same server Provider: Why multi-tenancy? Improved.
Hey You, Get Off My Cloud: Exploring information Leakage in third party compute clouds T.Ristenpart, Eran Tromer, Hovav Shacham and Steven Savage ACM CCS.
Secure web browsers, malicious hardware, and hardware support for binary translation Sam King.
By Christopher Moran, Nicoara Talpes 1.  Solution is addressed to VMs that are web servers  Web servers should not have confidential information anyway.
1 Information Security – Theory vs. Reality , Winter 2011 Lecture 1: Introduction Eran Tromer.
MS DB Proposal Scott Canaan B. Thomas Golisano College of Computing & Information Sciences.
Hey, You, Get Off of My Cloud: Exploring Information Leakage in Third-Party Compute Clouds by Thomas Ristenpart et al. defended by Ning Xia & Najim Yaqubie.
Full AES key extraction in 65 milliseconds using cache attacks
Cryptanalysis through Cache Address Leakage Eran Tromer Adi Shamir Dag Arne Osvik.
Hey, You, Get Off of My Cloud: Exploring Information Leakage in Third-Party Compute Clouds By Thomas Ristenpart Eran Tromer Hovav Shacham Stefan Savage.
Scheduler-based Defenses against Cross-VM Side- channels Venkat(anathan) Varadarajan, Thomas Ristenpart, and Michael Swift 1 D EPARTMENT OF C OMPUTER S.
Virtualization and the Cloud
Authors: Thomas Ristenpart, et at.
Virtualization for Cloud Computing
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
5205 – IT Service Delivery and Support
1 Instant replay  The semester was split into roughly four parts. —The 1st quarter covered instruction set architectures—the connection between software.
Hey, You, Get Off of My Cloud: Exploring Information Leakage in Third-Party Compute Clouds Written by Thomas Ristenpart Eran Tromer Hovav Shacham Stehan.
1 Introduction to Information Security , Spring 2013 Lecture 9: Trusted computing architecture (cont.) Side-channel attacks Eran Tromer Slides.
Computer System Architectures Computer System Software
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
M.A.Doman Short video intro Model for enabling the delivery of computing as a SERVICE.
Cosc 4010 Sandboxing. Last lecture Last time, we covered chroot, which is a method to "sandbox" a problem. –Not full proof by any means. Many simple mistakes.
CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
1 Information Security – Theory vs. Reality , Winter Lecture 1: Introduction Eran Tromer with guest appearance by Daniel Genkin.
Ragib Hasan University of Alabama at Birmingham CS 491/691/791 Fall 2012 Lecture 4 09/10/2013 Security and Privacy in Cloud Computing.
Thomas Ristenpart,Eran Tromer, Horav Shahcham and Stefan Savage
HEY, YOU, GET OFF OF MY CLOUD: EXPLORING INFORMATION LEAKAGE IN THIRD-PARTY COMPUTE CLOUDS Eran Tromer MIT Hovav Shacham UCSD Stefan Savage UCSD ACM CCS.
A paper by Thomas Ristenpart, Eran Tromer, Hovav Shacham, and Stefan Savage, Proceedings of the ACM Conference on Computer and Communications Security,
Welcome to CPS 210 Graduate Level Operating Systems –readings, discussions, and programming projects Systems Quals course –midterm and final exams Gateway.
Exploiting Cache-Timing in AES: Attacks and Countermeasures Ivo Pooters March 17, 2008 Seminar Information Security Technology.
Architectural Side Channels in Cloud Computing
Cache Attacks and Countermeasures:
1 Information Security – Theory vs. Reality , Winter Lecture 1: Introduction Eran Tromer with guest appearance by Daniel Genkin.
Wireless and Mobile Security
Cloud Computing is a Nebulous Subject Or how I learned to love VDF on Amazon.
1 Information Security – Theory vs. Reality , Winter Lecture 3: Power analysis, correlation power analysis Lecturer: Eran Tromer.
RSA Key Extraction via Low- Bandwidth Acoustic Cryptanalysis Daniel Genkin, Adi Shamir, Eran Tromer.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
References: “Hey, You, Get Off My Cloud: Exploring Information Leakage in Third-Party Compute Clouds” by Thomas Ristenpart, Eran Tromer – UC San Diego;
Hey, You, Get Off of My Cloud Thomas Ristenpart, Eran Tromer, Hovav Shacham, Stefan Savage Presented by Daniel De Graaf.
1 Information Security – Theory vs. Reality , Winter Lecture 12: Trusted computing architecture (cont.), Eran Tromer Slides credit:
Network Security Lecture 3 Secret Key Cryptography
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
Unit 2 VIRTUALISATION. Unit 2 - Syllabus Basics of Virtualization Types of Virtualization Implementation Levels of Virtualization Virtualization Structures.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Thomas Ristenpart , Eran Tromer, Hovav Shacham ,Stefan Savage CCS’09
Mapping/Topology attacks on Virtual Machines
Virtual Machine Monitors
Overview on Hardware Security
Hey, You, Get Off of My Cloud
Written by : Thomas Ristenpart, Eran Tromer, Hovav Shacham,
Information Security – Theory vs
Bruhadeshwar Meltdown Bruhadeshwar
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Outline Using cryptography in networks IPSec SSL and TLS.
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Exploring Information Leakage in Third-Party Compute Clouds
Presentation transcript:

1 Information Security – Theory vs. Reality , Winter Lecture 1: Introduction, Architectural side channels 1/2 Lecturer: Eran Tromer

2 Course agenda

3 Course duties Questionnaire (on course website) Material: everything covered in class (including whiteboard and discussions), and assigned reading as specified. Exercises –5 exercises, submitted in individually. –30% of grade –All mandatory –No late submissions Final project Lecture summaries: up to 5% bonus

4 Resources Course website: Recommended Facebook group: istvr1516 Mailing list (see website) The course material is not covered by any single book. For background and discussion of physical attacks, see: Ross Anderson, Security Engineering, 2 nd ed. Additional reading material during the semester.

5 Course agenda Advanced topics in applied cryptography and information security, focusing on all the ways our convenient abstractions and careful designs fail in reality – and what to do about it.

6 Tentative topics Attacks Software side-channel attacks Physical side-channel attacks Fault attacks Hardware security Defense Leakage-resilient cryptography Fully-homomorphic encryption Computationally-sound proofs with applications to Bitcoin Multiparty computation Obfuscation

7 Today: Side-channel attacks

8 Types of undesired information flow Inadvertent information channels between processes running on the same system: Side channels Covert channels collaborate to circumvent mandatory access controls Most generally: Violate information flow control attackervictim receiversender

9 Cryptographic algorithms vs. the real world An example

10 Cryptographic algorithms Model: Formal security definitions (CPA, CCA1, CCA2, …) Well-studied algorithms (RSA, AES, DES, …) Algorithmic attacks are believed infeasible. Input: (plaintext, key) Output (ciphertext)

11 ENGULF [Peter Wright, Spycatcher, p. 84] In 1956, a couple of Post Office engineers fixed a phone at the Egyptian embassy in London.

12 ENGULF (cont.) “The combined MI5/GCHQ operation enabled us to read the Egyptian ciphers in the London Embassy throughout the Suez Crisis.”

13 Architectural side-channel attacks

14 Cloud Computing (Infrastructure as a Service) Instant virtual machines

15 Public Clouds (Amazon EC2, Microsoft Azure, Rackspace Mosso) Instant virtual machines... for anyone

16 Virtualization Instant virtual machines... for anyone …on the same hardware.

17 Virtualization What if someone running on that hardware is malicious?

18 A Tale of Virtualization and Side Channels

19 Virtualization: textbook description Hardware Virtual machine manager Process OS Virtual memory 20 mattresses

20 Cross-talk through architectural channels Hardware Virtual machine manager Process OS Virtual memory

21 Cross-talk through architectural channels Hardware Virtual machine manager Process OS Virtual memory Contention for shared hardware resources

22 Cross-talk through architectural channels Hardware Virtual machine manager OS Virtual memory cache Contention for shared hardware resources Example: contention for CPU data cache AttackerVictim

23 Cross-talk through architectural channels Hardware Virtual machine manager OS Virtual memory cache Contention for shared hardware resources Example: contention for CPU data cache AttackerVictim <1 ns latency

24 Cross-talk through architectural channels Hardware Virtual machine manager OS Virtual memory cache Contention for shared hardware resources Example: contention for CPU data cache AttackerVictim <1 ns latency

25 Cross-talk through architectural channels Hardware Virtual machine manager OS Virtual memory cache Contention for shared hardware resources Example: contention for CPU data cache AttackerVictim <1 ns latency~100 ns latency DRAM

26 Cross-talk through architectural channels Hardware Virtual machine manager OS Virtual memory cache Contention for shared hardware resources Example: contention for CPU data cache leaks memory access patterns. AttackerVictim <1 ns latency~100 ns latency

27 Cross-talk through architectural channels Hardware Virtual machine manager OS Virtual memory cache Contention for shared hardware resources Example: contention for CPU data cache leaks memory access patterns. This is sensitive information! Can be used to steal encryption keys in few milliseconds of measurements. AttackerVictim

28 CPU parallelism in is ubiquitous: Multicore Simultaneous multithreading (“HyperThreading”) SMP This trend is fundamental: CPU transistor count keeps growing exponentially, but clock rate and on-chip bandwidth aren’t. The multicore/multithread world Parallelism aggravates architectural side channels. Hardware Virtual machine manager OS Virtual memory AttackerVictim Core Inter-core and inter-thread crosstalk

29 Cache attacks CPU core contains small, fast memory cache shared by all applications. Attacker app Victim app CPU Slow DRAM main memory secret key Contention for this shared resources mean Attacker can observe slow-down when Victim accesses its own memory. From this, Attacker can deduce the memory access patterns of Victim. The cached data is subject to memory protection… cache But the metadata leaks information about memory access patterns: addresses and timing.

30 char p[16], k[16]; // plaintext and key int32 Col[4]; // intermediate state const int32 T0[256],T1[256],T2[256],T3[256]; // lookup tables... /* Round 1 */ Col[0]  T0[p[ 0]  k[ 0]]  T1[p[ 5]  k[ 5]]  T2[p[10]  k[10]]  T3[p[15]  k[15]]; Col[1]  T0[p[ 4]  k[ 4]]  T1[p[ 9]  k[ 9]]  T2[p[14]  k[14]]  T3[p[ 3]  k[ 3]]; Col[2]  T0[p[ 8]  k[ 8]]  T1[p[13]  k[13]]  T2[p[ 2]  k[ 2]]  T3[p[ 7]  k[ 7]]; Col[3]  T0[p[12]  k[12]]  T1[p[ 1]  k[ 1]]  T2[p[ 6]  k[ 6]]  T3[p[11]  k[11]]; Example: breaking AES encryption via address leakage ( NIST FIPS 197; used by WPA2, IPsec, SSH, SSL, disk encryption, …) lookup index = plaintext  key Complications: Multiple indices per cache line Uncertain messages Noise Requires further cryptographic and statistical analysis. How to learn addresses?

31 Associative memory cache DRAM cache memory block (64 bytes) cache line (64 bytes) cache set (4 cache lines)

32 Victim’s memory DRAM cache S-box table

33 Detecting victim’s memory accesses DRAM cache Attacker memory S-box table

34 Measurement technique Attacker can exploit cache-induced crosstalk as an input or as an output: Effect of the cache on the victim Effect of victim on the cache Attacker Victim Attacker Victim

35 Evict+Time: Measuring effect of cache on encryption Attacker manipulates cache states and measures effect on victim’s running time. DRAM cache T0 Attacker memory 1. Victim’s data fully cached 2. Attacker evicts victim’s block 3. Attacker times the victim’s next run. Slowdown?

36 Prime+Probe: Measuring effect of encryption on cache Attacker checks which of its own data was evicted by the victim. DRAM cache Attacker memory 1. Fill cache with attacker’s data S-box table

37 Prime+Probe: Measuring effect of encryption on cache Attacker checks which of its own data was evicted by the victim. DRAM cache Attacker memory 2. Trigger a single encryption S-box table 1. Fill cache with attacker’s data

38 Prime+Probe: Measuring effect of encryption on cache Attacker checks which of its own data was evicted by the victim. DRAM cache Attacker memory 2. Trigger a single encryption 3. Access attacker memory again and see which cache sets are slow S-box table 1. Fill cache with attacker’s data

39 Experimental results [Osvik Shamir Tromer 05] [Tromer Osvik Shamir 09] Attack on OpenSLL AES encryption library call: Full key extracted from 13ms of measurements (300 encryptions) Attack on an AES encrypted filesystem (Linux dm-crypt): Full key extracted from 65ms of measurements (800 I/O ops) Measuring a “black box” OpenSSL encryption on Athlon 64, using 10,000 samples. Horizontal axis: evicted cache set. Vertical axis: p[0] (left), p[5] (right). Brightness: encryption time (normalized) Secret key byte k[0]=0x00Secret key byte k[5]=0x50

40 Extension: “Hyper Attacks” Obtaining parallelism: –HyperThreading (simultaneous multithreading) –Multi-core, shared caches, cache coherence –(Also: interrupts, scheduler) Attack vector: –Monitor cache statistics in real time –Encryption process is not communicating with anyone (no I/O, no IPC). –No special measurement equipment –No knowledge of either plaintext of ciphertext

41 “Hyper Attack” attack on AES (independent process doing batch encryption of text): Recovery of 45.7 key bits in one minute. Experimental results

42 Implications?

43 Implications Multiuser systems (e.g, Android) Untrusted code, even if sandboxed (e.g., ActiveX, Java applets, managed.NET, JavaScript, Google Native Client, Silverlight) Digital right management The trusted path is leaky (even if verified by TPM attestation, etc.) Remote network attacks Virtual machines

44 Process OS services OS kernel Virtualization CPUMemoryDevices OS services Hypervisor Touted for its security benefits: Isolation Sandboxing Management Monitoring Recovery Forensics (replay) All true. But many side-channel attacks are oblivious to virtualization. (It’s the same underlying hardware!) This creates inherent new risks. Key Untrusted Code US patent 6,922,774 (NSA)

45 Architectural attacks in cloud computing: difficulties How can the attacker reach a target VM? How to exploit it? Practical difficulties: –Core migration –Extra layer of page-table indirection –Coarse hypervisor scheduler –Load fluctuations –Choice of CPU Is the “cloud” really vulnerable?

46 Demonstrated using Amazon EC2 as cast study: Cloud cartography Mapping the structure of the “cloud” and locating a target on the map. Placement vulnerabilities An attacker can place his VM on the same physical machine as a target VM (40% success for a few dollars). Cross-VM exfiltration Once VMs are co-resident, information and secret keys can be exfiltrated across VM boundary.

47 Cloud cartography Where in the world is the target VM, and how can I get there? On EC2, VMs can be co-resident only if they have identical creation parameters: –Region (US/Europe) –Availability zone (data center) –Instance type (machine pool) The cloud-internal IP addresses assigned to VMs are strongly correlated with their creation parameters. Mapping out this correlation:

48 Cloud cartography (example) IP address (position) vs. zone (color) IP address (position) vs. instance type (color) zone 2zone 3zone 1 Deduced: Heuristic rules for mapping IP address to creation parameters.

49 Achieving co-residence Overall strategy: –Derive target’s creation parameters –Create similar VMs until co-residence is detected. Improvement: –Target fresh (recently-created) instances, exploiting EC2’s sequential assignment strategy –Conveniently, one can often trigger new creation of new VMs by the victim, by inducing load (e.g., RightScale). Success in hitting a given (fresh) target: ~40% for a few dollars Reliable across EC2 zones, accounts and times of day.

50 Detecting co-residence EC2-specific: –Internal IP address are close Xen-specific: –Obtain and compare Xen Dom0 address Generic: –Network latency –Cross-VM architectural channels: send HTTP requests to target and observe correlation with cache utilization

51 Exploiting co-residence: cross-VM attacks Demonstrated: [Ristenpart Tromer Shaham Savage ‘09] [Zhang Juels Reiter Ristenpart ‘12] –Measuring VMs load (average/transient) –Estimating web server traffic –Robust cross-VM covert channel –Detecting keystroke timing in an SSH session across VMs (on a similarly-configured Xen box) → keystroke recovery [Song Wagner Tian 01] –Stealing ElGamal secret keys [Zhang Juels Reiter Ristenpart 2012] –Stealing RSA secret keys [Inci Gulmezoglu Irazoqui Eisenbarth Sunar 2015] –Stealing AES secret keys [Irazoqui Inci Eisenbarth Sunar 2014] http requests per minute measurement

52 Architectural attacks (continued)

53 L3 Flush+Reload attack [Yarom Falkner 2014] Target outermost cache, shared between all CPU cores (typically L3) RSA key extraction from GnuPG Target specific memory block (instead of cache set) Exploits memory deduplication (content- based page sharing) –Common code, libraries, data across VMs –Supposedly safe (nominally, no new information flow)

54 L3 flush+reload attack (cont.)