Graphene-SGX. A Practical Library OS for Unmodified Applications on SGX. Chia-Che Tsai Donald E. Porter Mona Vij

Similar documents
Eleos: Exit-Less OS Services for SGX Enclaves

SCONE: Secure Linux Container Environments with Intel SGX

SGXBounds Memory Safety for Shielded Execution

A Comparison Study of Intel SGX and AMD Memory Encryption Technology

SafeBricks: Shielding Network Functions in the Cloud

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

FlexSC. Flexible System Call Scheduling with Exception-Less System Calls. Livio Soares and Michael Stumm. University of Toronto

Varys. Protecting SGX Enclaves From Practical Side-Channel Attacks. Oleksii Oleksenko, Bohdan Trach. Mark Silberstein

A Library Operating System for Compatibility. A Dissertation presented. Chia-Che Tsai. The Graduate School. in Partial Fulfillment of the

Leveraging Intel SGX to Create a Nondisclosure Cryptographic library

Advanced Systems Security: Virtual Machine Systems

CIS 4360 Secure Computer Systems SGX

Komodo: Using Verification to Disentangle Secure-Enclave Hardware from Software

Advanced Systems Security: Virtual Machine Systems

Deterministic Process Groups in

Intel Software Guard Extensions

CLASS AGENDA. 9:00 9:15 a.m. 9:15 10:00 a.m. 10:00 12:00 p.m. 12:00 1:00 p.m. 1:00 3:00 p.m. 3:00 5:00 p.m.

Introduction to SGX (Software Guard Extensions) and SGX Virtualization. Kai Huang, Jun Nakajima (Speaker) July 12, 2017

Shreds: S H R E. Fine-grained Execution Units with Private Memory. Yaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long Lu D S

BUILDING SECURE (CLOUD) APPLICATIONS USING INTEL S SGX

Information Flow Control For Standard OS Abstractions

Ryoan: A Distributed Sandbox for Untrusted Computation on Secret Data

EndBox: Scalable Middlebox Functions Using Client-Side Trusted Execution

SentinelOne Technical Brief

Iron: Functional encryption using Intel SGX

IX: A Protected Dataplane Operating System for High Throughput and Low Latency

Nested Virtualization and Server Consolidation

Agenda. Threads. Single and Multi-threaded Processes. What is Thread. CSCI 444/544 Operating Systems Fall 2008

ROTE: Rollback Protection for Trusted Execution

Influential OS Research Security. Michael Raitza

Flicker: An Execution Infrastructure for TCB Minimization

Accelerating Pointer Chasing in 3D-Stacked Memory: Challenges, Mechanisms, Evaluation Kevin Hsieh

Browser Security Guarantees through Formal Shim Verification

WearDrive: Fast and Energy Efficient Storage for Wearables

CPS 510 final exam, 4/27/2015

Town Crier. Authenticated Data Feeds For Smart Contracts. CS5437 Lecture by Kyle Croman and Fan Zhang Mar 18, 2016

INFLUENTIAL OPERATING SYSTEM RESEARCH: SECURITY MECHANISMS AND HOW TO USE THEM CARSTEN WEINHOLD

Massively Parallel Hardware Security Platform

FIPS Crypto In the IoT. Chris Conlon ICMC17, May 16-19, 2017 Westin Arlington Gateway Washington DC

RISCV with Sanctum Enclaves. Victor Costan, Ilia Lebedev, Srini Devadas

SentinelOne Technical Brief

VIAF: Verification-based Integrity Assurance Framework for MapReduce. YongzhiWang, JinpengWei

Looking ahead with IBM i. 10+ year roadmap

Comparison of SSL/TLS libraries based on Algorithms/languages supported, Platform, Protocols and Performance. By Akshay Thorat

OPERATING SYSTEM SUPPORT FOR REDUNDANT MULTITHREADING. Björn Döbel (TU Dresden)

Arachne. Core Aware Thread Management Henry Qin Jacqueline Speiser John Ousterhout

H.J. Lu, Sunil K Pandey. Intel. November, 2018

Lecture Notes for 04/04/06: UNTRUSTED CODE Fatima Zarinni.

ARCHITECTURING AND SECURING IOT PLATFORMS JANKO ISIDOROVIC MAINFLUX

OPERATING SYSTEM TRANSACTIONS

Intel Software Guard Extensions (Intel SGX) Memory Encryption Engine (MEE) Shay Gueron

NUMA replicated pagecache for Linux

The benefits and costs of writing a POSIX kernel in a high-level language

Research in OS: Light-weight contexts

Exception-Less System Calls for Event-Driven Servers

CSE 120 Principles of Operating Systems

Isolating Operating System Components with Intel SGX

Old, New, Borrowed, Blue: A Perspective on the Evolution of Mobile Platform Security Architectures

Mobile Platform Security Architectures A perspective on their evolution

Intel Software Guard Extensions (Intel SGX) Developer Guide

And Then There Were More:

The Challenges of X86 Hardware Virtualization. GCC- Virtualization: Rajeev Wankar 36

Kubernetes The Path to Cloud Native

Sealing and Attestation in Intel Software Guard Extensions (SGX)

Tales of the Tail Hardware, OS, and Application-level Sources of Tail Latency

PageVault: Securing Off-Chip Memory Using Page-Based Authen?ca?on. Blaise-Pascal Tine Sudhakar Yalamanchili

Process Address Spaces and Binary Formats

THE SECURE MACHINE: EFFICIENT SECURE EXECUTION ON UNTRUSTED PLATFORMS

Tolerating Malicious Drivers in Linux. Silas Boyd-Wickizer and Nickolai Zeldovich

A Multi-OS Cross-Layer Study of Bloating in User Programs, Kernel and Managed Execution Environments

WORKLOAD CHARACTERIZATION OF INTERACTIVE CLOUD SERVICES BIG AND SMALL SERVER PLATFORMS

A Case Study in Optimizing GNU Radio s ATSC Flowgraph

OS Structure. Kevin Webb Swarthmore College January 25, Relevant xkcd:

SFO17-403: Optimizing the Design and Implementation of KVM/ARM

DIY Hosting for Online Privacy

Big and Fast. Anti-Caching in OLTP Systems. Justin DeBrabant

Practical Techniques to Obviate Setuid-to-Root Binaries

ARMlock: Hardware-based Fault Isolation for ARM

HKG net_mdev: Fast-path userspace I/O. Ilias Apalodimas Mykyta Iziumtsev François-Frédéric Ozog

Operating System Security

IAGO ATTACKS: WHY THE SYSTEM CALL API IS A BAD UNTRUSTED RPC INTERFACE

Maru: Hardware-Assisted Secure Cloud Computing

CS 261 Fall Mike Lam, Professor. Virtual Memory

HPMMAP: Lightweight Memory Management for Commodity Operating Systems. University of Pittsburgh

My VM is Lighter (and Safer) than your Container

Lecture 3 MOBILE PLATFORM SECURITY

Making the Box Transparent: System Call Performance as a First-class Result. Yaoping Ruan, Vivek Pai Princeton University

New Approaches to Connected Device Security

Sugar: Secure GPU Acceleration in Web Browsers

Recommendations for TEEP Support of Intel SGX Technology

Authenticated Storage Using Small Trusted Hardware Hsin-Jung Yang, Victor Costan, Nickolai Zeldovich, and Srini Devadas

Unikernels as Processes

SWAP: EFFECTIVE FINE-GRAIN MANAGEMENT

Performance implication of elliptic curve TLS

csci3411: Operating Systems

MiniBox: A Two-Way Sandbox for x86 Native Code

Beyond TrustZone PSA Reed Hinkel Senior Manager Embedded Security Market Development

Slalom: Fast, Verifiable and Private Execution of Neural Networks in Trusted Hardware

Practical and Efficient Exploit Mitigation for Embedded Devices

9 GENERATION INTEL CORE DESKTOP PROCESSORS

Transcription:

Graphene-SGX A Practical Library OS for Unmodified Applications on SGX Chia-Che Tsai Donald E. Porter Mona Vij

Intel SGX: Trusted Execution on Untrusted Hosts Processing Sensitive Data (Ex: Medical Records) Public Cloud Client Machines App confidentiality & integrity on machines you have no control

Porting Apps to SGX is Not Exactly Painless OS functionality available but not trusted Porting: novice hell Crypto Functions (Ex: WolfSSL) Microservices (Ex: lighttpd) Language Runtimes (Ex: OpenJDK) Some SGX frameworks (SCONE/Panoply) target here Still some porting effort (Ex: recompiling) An effortless option for wide-ranged Ubuntu apps?

Open SGX framework for Unmodified Linux Apps Graphene-SGX: No reprogramming or recompiling Servers / Command-line apps / Runtimes (Apache, NGINX, GCC, R, Python, OpenJDK, Memcached, ) Multi-process APIs (fork, IPC, ) Not meant to be perfect, but a quick, practical option (or to avoid app changes)

Talk Outline How does Graphene-SGX protect unmodified applications? Why should you try Graphene-SGX? What is the right way for porting applications to SGX?

The Graphene LibOS Project [Eurosys14] An open libos for reusing Linux applications (github.com/oscarlab/graphene) Inspired by Drawbridge[ASPLOS11] and Haven[OSDI14] Gradually adopted by labs / industry Active development & tech support (doing our best!) Unmodified Application Process LibOS Process 145 Linux syscalls (growing) LibOS Easy to port to new OS/platform

Intel SGX (Software Guard Extensions) Enclave Sensitive Data Signed App Completely isolated from OS App Process SGX instructions (ECREATE/EINIT) Untrusted OS

Intel SGX (Software Guard Extensions) Encrypted & signed in DRAM Enclave Sensitive Data Signed App App Process Secret Key Untrusted OS

Intel SGX (Software Guard Extensions) Enclave Sensitive Data Signed App App Process Enclave app requirements: 1. Signed initial code 2. No direct syscalls 3. Checking untrusted inputs Untrusted OS Unmodified Linux app: (1) Dynamic linked (2) Built with syscall usage

Running Unmodified App with Graphene-SGX $ SGX=1./pal_loader httpd [args] Graphene Loader Untrusted OS

Running Unmodified App with Graphene-SGX httpd User Libs GNU libc Linux syscalls Graphene LibOS Signed by developers as a CPU-verifiable signature (Signing tool provided) Enclave Interface (28 calls) Untrusted OS

Running Unmodified App with Graphene-SGX httpd User Libs GNU libc Linux syscalls Graphene LibOS Enclave Interface (28 calls) Enclave app requirements: 1. Signed initial code 2. No direct syscalls 3. Checking untrusted inputs key research problem Untrusted OS

Checking Untrusted Inputs from the OS Checking untrusted syscalls is subtle [Checkoway, 2013] Graphene-SGX: Narrowing to a fixed interface (28 calls) Redefining an interface suitable for checking Examples: Reading an integrity-sensitive file (Ex: library/script/config) See paper: multi-process APIs

Ex: Reading an Integrity-Sensitive File LibOS httpd GNU libc read mmap dlopen Linux syscalls User Libs FileMap(file,off,size) Enclave Interface Untrusted OS Manifest Checksums File Chunk Ask for explicit inputs Checksums given in a signed manifest Copy & verify in enclave

Checking All 28 Enclave Calls Examples # Result Explanation (1) Reading a file (2) Inter-proc coordination 18 Fully Checked (1) File checksums (2) CPU attest. + crypto: inter-proc TLS connection Yielding a thread 6 Benign Nothing to check (1) Polling handles (2) File attributes 4 Unchecked Future work

Summary Graphene-SGX turns an unmodified app into enclave app A app-specific signature authenticating all binaries Syscalls implemented inside enclaves Narrowing & redefining untrusted OS inputs to checkable values

Why (and When) You Should Try Graphene-SGX Unmodified apps / needs dynamic loading When alternatives don t offer OS functionality you want Graphene-SGX: Rich OS functionality (145 syscalls so far) Blow up enclave size & TCB (trusted computing base)? Performance?

Comparison with Other SGX Frameworks Graphene-SGX SCONE [OSDI16] Panoply [NDSS17] Approach LibOS Shim Layers: redirect & check system APIs Functionality vs checks Can grow without extending checks Using more system APIs = more checks

Trusted Computing Base Graphene-SGX SCONE [OSDI16] Panoply [NDSS17] LibOS/shim 53 kloc 97 kloc 10kLoC Choice of libc GNU libc (1.1 MLoC) musl (88 kloc) No libc in enclave Not fundamental to libos, but more by the choice of libc

Graphene-SGX Performance Baselines: Linux, Graphene (without SGX) Workloads: Server: Apache with 5 worker processes Command-line: R benchmarks Evaluation Setup: 4-core 3.20 GHz Intel i5 CPU + 8 GB RAM

Average Response Time (S) Apache with 5 Processes (w/ IPC Semaphore) Linux Graphene (without SGX) Graphene-SGX 6 better Graphene-SGX: Impact by enclave exits & checking OS inputs 4 2 30% loss Graphene: little effect (~5%) on top throughput 0 0 2 4 6 8 10 12 Throughput (k.req/s) better

Overhead to Linux R Benchmarks Linux Graphene (without SGX) Graphene-SGX 10x 0% better Graphene-SGX: Memory-intensive impact (app behavior) ~1x overhead Workloads Graphene: ~0% overhead

Graphene-SGX Performance Discussion Latency overhead less than ~1x unless memory-intensive LibOS memory cost only 5-15 MB Cause: Enclave exits & checks (can improve) App memory usage (reduce with configuration / partitioning)

In the End: A Developer s Guide for SGX Porting 1. Explore / POC with Graphene-SGX 2. 3. Compile out code & syscalls SCONE / Panoply Other tools: Eleos, T-SGX Partitioning (Glamdring) Optimize performance & security Keep safe interface to OS Reduce memory footprint & enclave exits Take care of vulnerabilities (side channels!)

Conclusion Graphene-SGX quick, practical Linux-to-SGX porting option Usability: Rich Linux functionality with multi-process Performance: Less than ~1x overheads (normal cases) Security: (1) Reduce OS interaction to checkable services (2) LibOS TCB comparable to other options Graphene library OS: github.com/oscarlab/graphene (chitsai@cs.stonybrook.edu)