HDFI: Hardware-Assisted Data-flow Isolation

Slides:



Advertisements
Similar presentations
Defenses. Preventing hijacking attacks 1. Fix bugs: – Audit software Automated tools: Coverity, Prefast/Prefix. – Rewrite software in a type safe languange.
Advertisements

1 InfoShield: A Security Architecture for Protecting Information Usage in Memory Georgia Tech Weidong Shi – Georgia Tech Josh Fryman – Intel Corporation.
Integrity & Malware Dan Fleck CS469 Security Engineering Some of the slides are modified with permission from Quan Jia. Coming up: Integrity – Who Cares?
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Computer Security: Principles and Practice EECS710: Information Security Professor Hossein Saiedian Fall 2014 Chapter 10: Buffer Overflow.
Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Dec 5, 2007University of Virginia1 Efficient Dynamic Tainting using Multiple Cores Yan Huang University of Virginia Dec
1 A Real Problem  What if you wanted to run a program that needs more memory than you have?
Secure web browsers, malicious hardware, and hardware support for binary translation Sam King.
Breno de MedeirosFlorida State University Fall 2005 Buffer overflow and stack smashing attacks Principles of application software security.
Using DISE to Protect Return Addresses from Attack Marc L. Corliss, E Christopher Lewis, Amir Roth University of Pennsylvania.
LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks Feng Qin, Cheng Wang, Zhenmin Li, Ho-seop Kim, Yuanyuan.
HARDBOUND: ARCHITECURAL SUPPORT FOR SPATIAL SAFETY OF THE C PROGRAMMING LANGUAGE Kyle Yan Yu Xing 2014/10/15.
MemTracker Efficient and Programmable Support for Memory Access Monitoring and Debugging Guru Venkataramani, Brandyn Roemer, Yan Solihin, Milos Prvulovic.
1 RISE: Randomization Techniques for Software Security Dawn Song CMU Joint work with Monica Chew (UC Berkeley)
1 RAKSHA: A FLEXIBLE ARCHITECTURE FOR SOFTWARE SECURITY Computer Systems Laboratory Stanford University Hari Kannan, Michael Dalton, Christos Kozyrakis.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
A Portable Virtual Machine for Program Debugging and Directing Camil Demetrescu University of Rome “La Sapienza” Irene Finocchi University of Rome “Tor.
Secure Virtual Architecture John Criswell, Arushi Aggarwal, Andrew Lenharth, Dinakar Dhurjati, and Vikram Adve University of Illinois at Urbana-Champaign.
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
CS533 Concepts of Operating Systems Jonathan Walpole.
Mitigation of Buffer Overflow Attacks
Branch Regulation: Low-Overhead Protection from Code Reuse Attacks.
Exploitation possibilities of memory related vulnerabilities
Buffer Overflow Attack Proofing of Code Binary Gopal Gupta, Parag Doshi, R. Reghuramalingam, Doug Harris The University of Texas at Dallas.
Processes and Virtual Memory
Buffer overflow and stack smashing attacks Principles of application software security.
Exploiting Instruction Streams To Prevent Intrusion Milena Milenkovic.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
Protecting C and C++ programs from current and future code injection attacks Yves Younan, Wouter Joosen and Frank Piessens DistriNet Department of Computer.
December 1, 2006©2006 Craig Zilles1 Threads & Atomic Operations in Hardware  Previously, we introduced multi-core parallelism & cache coherence —Today.
Translation Lookaside Buffer
Mitigation against Buffer Overflow Attacks
Remix: On-demand Live Randomization
Virtualization Virtualize hardware resources through abstraction CPU
Memory Caches & TLB Virtual Memory
EnGarde: Mutually Trusted Inspection of SGX Enclaves
A Real Problem What if you wanted to run a program that needs more memory than you have? September 11, 2018.
143A: Principles of Operating Systems Lecture 6: Address translation (Paging) Anton Burtsev October, 2017.
Suman Jana *Original slides from Vitaly Shmatikov
nZDC: A compiler technique for near-Zero silent Data Corruption
Some Real Problem What if a program needs more memory than the machine has? even if individual programs fit in memory, how can we run multiple programs?
Jump Over ASLR: Attacking Branch Predictors to Bypass ASLR
Morgan Kaufmann Publishers
CSE 153 Design of Operating Systems Winter 2018
A System for Protecting the Integrity of Virtual Function Tables
Continuous, Low Overhead, Run-Time Validation of Program Executions
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Software Security Lesson Introduction
Translation Lookaside Buffer
Hardware Works, Software Doesn’t: Enforcing Modularity with Mondriaan Memory Protection Emmett Witchel Krste Asanović MIT Lab for Computer Science.
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Mengjia Yan† , Jiho Choi† , Dimitrios Skarlatos,
Translation Buffers (TLB’s)
Code-Pointer Integrity
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE451 Virtual Memory Paging Autumn 2002
Sai Krishna Deepak Maram, CS 6410
Translation Buffers (TLB’s)
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 471 Autumn 1998 Virtual memory
Paging and Segmentation
CSE 153 Design of Operating Systems Winter 2019
The University of Adelaide, School of Computer Science
Translation Buffers (TLBs)
Cache writes and examples
Review What are the advantages/disadvantages of pages versus segments?
Return-to-libc Attacks
2019 2학기 고급운영체제론 ZebRAM: Comprehensive and Compatible Software Protection Against Rowhammer Attacks 3 # 단국대학교 컴퓨터학과 # 남혜민 # 발표자.
Presentation transcript:

HDFI: Hardware-Assisted Data-flow Isolation Chengyu Song1, Hyungon Moon2, Monjur Alam1, Insu Yun1, Byoungyoung Lee1, Taesoo Kim1, Wenke Lee1, Yunheung Paek2 1Georgia Institute of Technology 2Seoul National University

Memory corruption vulnerability Exploitation Trends: From Potential Risk to Actual Risk, RSA 2015

A simple stack overflow Code Injection ROP sp argv[1] ret addr buf

Defense mechanisms ret addr canary buf shadow stack sp isolation: segment, masking, virtual address, randomization flexibility: setjmp/longjmp, deep recursion, kernel stack, other control data non-control data

Limitations Software: lacks good isolation mechanisms in 64-bit world SFI and virtual address space: secure but expensive Address randomization: efficient but insecure Hardware: lacks flexibility Context saving/restoring (setjmp/longjmp), deep recursion, kernel stack, etc. Other data: code pointers, non-control data Data shadowing: adds overheads Breaks data locality, needs additional step to look up or reserved register(s) Occupies additional memory

Hardware-assisted data-flow isolation Secure and efficient Low performance overhead and strong security guarantees Flexible Capable of supporting different security model/mechanisms Fine-grained No more data-shadowing Practical Minimized hardware changes

Data-flow Integrity [OSDI’06] Runtime data-flow should not deviate from static data-flow graph argv[1] ret addr 5 3 Exception 5 buf 5 5 sp isolation: segment, masking, virtual address, randomization flexibility: setjmp/longjmp, deep recursion, kernel stack, other control data non-control data

ISA extension Tagged memory Machine word granularity Fixed tag size  currently only 1 bit (sensitive or not) Three new atomic instructions to enable DFI-style checks sdset1, ldchk0, ldchk1 New semantic of old instructions (backward compatible) sd : sdset0 ld : now tag check

Hardware extension Cache extension Memory Tagger Extra bits in the cache line for storing the tag (reusing existing cache coherence interconnect) Memory Tagger Emulating tagged memory without physically extending the main memory

Optimizations Memory Tagger introduces additional performance overhead Naive implementation: 2x memory accesses, 1 for data, 1 for tag Three optimization techniques Tag cache Tag valid bits (TVB) Meta tag table (MTT)

Return address protection Policy: return address should always have tag 1 Benefits: secure and supports context saving/restoring, deep recursion, modified return address, kernel stack

Various applications Application Security Policy (invariants) Integrity Protection Shadow Stack return address and register spills should has tag 1 (push / pop) vptr Protection vptr should has tag 1 (constructor / virtual function call) Code Pointer Separation code pointer should has tag 1 (CPI [OSDI’14]) C Library Enhancement important data/pointer should has tag 1 (manual modification) Kernel Protection sensitive kernel data should has tag 1 (Kenali [NDSS’16]) Leak Detection Heartbleed Prevention crypto keys should has tag 1 output buffer should has tag 0

Implementations Hardware Software (RISC-V toolchain) RISC-V RocketCore generator: 2198 LoC Instantiated on Xilinx Zynq ZC706 FPGA board Software (RISC-V toolchain) Assembler gas: 16 LoC Kernel modifications: 60 LoC Security applications: 170 LoC

Effectiveness of optimizations Memory bandwidth and latency SPEC CINT2000 Benchmark Tag Cache +TVB +MTT +TVB+MTT L1 hit 0% L1 miss 14.47% 5.26% Copy 13.14% 4.44% 11.84% 4.26% Scale 10.62% 4.79% 9.45% 4.67% Add 4.37% 1.26% 4.13% 1.2% Triad 9.66% 1.96% 8.8% 1.83% Benchmark Tag Cache +TVB +MTT +TVB+MTT 164.gzip 16.09% 2.18% 6.85% 1.87% 175.vpr 29.51% 3.26% 7.71% 1.43% 181.mcf 36.89% 3.08% 13.66% -0.11% 197.parser 16.11% 2.27% 7.61% 1.53% 254.gap 12.19% 1.04% 6.53% 0.71% 256.bzip2 14.52% 2.65% 3.63% 0.84% 300.twolf 26.71% 2.97% 7.37% 0.36%

Security experiments With synthesized attacks

Impacts on security solutions Hardware-enforced isolation Simplicity No data shadowing Usability Implementation/port is very easy Application Language LoC Shadow Stack C++ (LLVM 3.3) 4 VTable Protection 40 CPS 41 Kernel Protection C (Linux 3.14.41) 70 Library Protection C (glibc 2.22) 10 Heartbleed Prevention C (OpenSSL 1.0.1a) 2

Impacts on security solutions (cont.) Efficiency GCC (-O2) Clang (-O0) Benchmark Shadow stack (GCC) SS+CPS (Clang) 164.gzip 1.12% 2.42% 181.mcf 1.76% 3.54% 254.gap 3.34% 13.23% 256.bzip2 3.05% 4.61%

Q & A Thank you! highlight importance, not fully understanding don’t explain how other people’s work works don’t go line by line for the sok using running examples, e.g., shadow stack cut down to 15 slides using pictures stay high level, using pictures highlight the contributions think about questions may be asked, how difficult it is to adopt why DFI, what about tag propagation cut evaluations, 19, 20

Security analysis Attack surface Best practice Inaccuracy of data-flow analysis Deputy attacks Best practice CFI is necessary (e.g., CPS + shadow stack) Recursive protection of pointers Guarantee the trustworthiness of the written value Use runtime memory safety technique to compensate inaccuracy of static analysis