LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks - F. Qin, C. Wang, Z. Li, H. Kim, Y. Zhou, Y. Wu (UIUC,

Slides:



Advertisements
Similar presentations
Programming Technologies, MIPT, April 7th, 2012 Introduction to Binary Translation Technology Roman Sokolov SMWare
Advertisements

Defenses. Preventing hijacking attacks 1. Fix bugs: – Audit software Automated tools: Coverity, Prefast/Prefix. – Rewrite software in a type safe languange.
Using Instruction Block Signatures to Counter Code Injection Attacks Milena Milenković, Aleksandar Milenković, Emil Jovanov The University of Alabama in.
Integrity & Malware Dan Fleck CS469 Security Engineering Some of the slides are modified with permission from Quan Jia. Coming up: Integrity – Who Cares?
Exploring Security Vulnerabilities by Exploiting Buffer Overflow using the MIPS ISA Andrew T. Phillips Jack S. E. Tan Department of Computer Science University.
Computer Security: Principles and Practice EECS710: Information Security Professor Hossein Saiedian Fall 2014 Chapter 10: Buffer Overflow.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 11 – 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
Computer Organization and Architecture
CMSC 414 Computer and Network Security Lecture 22 Jonathan Katz.
Virtual Memory Hardware Support
Stack-Based Buffer Overflows Attacker – Can take over a system remotely across a network. local malicious users – To elevate their privileges and gain.
TaintCheck and LockSet LBA Reading Group Presentation by Shimin Chen.
Securing software by enforcing data-flow integrity Manuel Costa Joint work with: Miguel Castro, Tim Harris Microsoft Research Cambridge University of Cambridge.
LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks Feng Qin, Cheng Wang, Zhenmin Li, Ho-seop Kim, Yuanyuan.
1 RAKSHA: A FLEXIBLE ARCHITECTURE FOR SOFTWARE SECURITY Computer Systems Laboratory Stanford University Hari Kannan, Michael Dalton, Christos Kozyrakis.
Lecture 16 Buffer Overflow
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
Buffer Overflow Attacks. Memory plays a key part in many computer system functions. It’s a critical component to many internal operations. From mother.
Efficient Software-Based Fault Isolation—sandboxing Presented by Carl Yao.
Secure Virtual Architecture John Criswell, Arushi Aggarwal, Andrew Lenharth, Dinakar Dhurjati, and Vikram Adve University of Illinois at Urbana-Champaign.
University of Maryland Compiler-Assisted Binary Parsing Tugrul Ince PD Week – 27 March 2012.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Introduction: Exploiting Linux. Basic Concepts Vulnerability A flaw in a system that allows an attacker to do something the designer did not intend,
Buffer Overflow Detection Stuart Pickard CSCI 297 June 14, 2005.
CS533 Concepts of Operating Systems Jonathan Walpole.
Memory Management 3 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
Mitigation of Buffer Overflow Attacks
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 10 “Buffer Overflow”.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Buffer Overflow CS461/ECE422 Spring Reading Material Based on Chapter 11 of the text.
Buffer Overflow Proofing of Code Binaries By Ramya Reguramalingam Graduate Student, Computer Science Advisor: Dr. Gopal Gupta.
Microprocessors The ia32 User Instruction Set Jan 31st, 2002.
Buffer Overflow Group 7Group 8 Nathaniel CrowellDerek Edwards Punna ChalasaniAxel Abellard Steven Studniarz.
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
Efficient Software Based Fault Isolation Author: Robert Wahobe,Steven Lucco,Thomas E Anderson, Susan L Graham Presenter: Maitree kanungo Date:02/17/2010.
Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.
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.
A Survey on Runtime Smashed Stack Detection 坂井研究室 M 豊島隆志.
Buffer Overflows Taught by Scott Coté.-. _ _.-. / \.-. ((___)).-. / \ /.ooM \ / \.-. [ x x ].-. / \ /.ooM \ -/ \ /-----\-----/---\--\ /--/---\-----/-----\ / \-
Foundations of Network and Computer Security J J ohn Black CSCI 6268/TLEN 5550, Spring 2013.
Efficient Software-Based Fault Isolation Authors: Robert Wahbe Steven Lucco Thomas E. Anderson Susan L. Graham Presenter: Gregory Netland.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
G. Venkataramani, I. Doudalis, Y. Solihin, M. Prvulovic HPCA ’08 Reading Group Presentation 02/14/2008.
VM: Chapter 7 Buffer Overflows. csci5233 computer security & integrity (VM: Ch. 7) 2 Outline Impact of buffer overflows What is a buffer overflow? Types.
Chapter 10 Buffer Overflow 1. A very common attack mechanism o First used by the Morris Worm in 1988 Still of major concern o Legacy of buggy code in.
CS703 - Advanced Operating Systems By Mr. Farhan Zaidi.
A Framework For Trusted Instruction Execution Via Basic Block Signature Verification Milena Milenković, Aleksandar Milenković, and Emil Jovanov Electrical.
Qin Zhao1, Joon Edward Sim2, WengFai Wong1,2 1SingaporeMIT Alliance 2Department of Computer Science National University of Singapore
Mitigation against Buffer Overflow Attacks
Memory COMPUTER ARCHITECTURE
Lecture 12 Virtual Memory.
COAL Chapter 1,2,3.
Memory Protection: Kernel and User Address Spaces
CSCI206 - Computer Organization & Programming
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Defending against Stack Smashing attacks
Architectural Support for OS
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Architectural Support for OS
Chapter 11 Processor Structure and function
Understanding and Preventing Buffer Overflow Attacks in Unix
Return-to-libc Attacks
Presentation transcript:

LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks - F. Qin, C. Wang, Z. Li, H. Kim, Y. Zhou, Y. Wu (UIUC, Intel, Ohio State) Shimin Chen (LBA Reading Group Presentation)

Motivation Many security tools target specific types of vulnerabilities: e.g. StackGuard, LibSafe both target stack smashing attacks Less effective for unknown vulnerabilities Information flow tracking can help Detect security attacks Detect information leaking  Problems with existing information flow tracking approaches

Problems with Existing Approaches(1) Compile time analysis for type-safe languages No runtime overhead  Not applicable to legacy application or C/C++  Often can only detect info leaking not security attacks Binary-code instrumentation No restrictions on programming language or library  High runtime overhead Source-code instrumentation Lower runtime overhead than binary instrumentation  Cannot handle 3 rd -party library  Require manual annotations for library routines

Problems with Existing Approaches(2) Hardware approaches: Minos [Crandall&Chong’04] h/w based taintcheck Dynamic Info Flow Tracking[Suh et al. 04] h/w based taintcheck RIFLE [Vachharajani et al. 04] h/w based infomation leaking protection

Minos [Crandall&Chong’04]Dynamic Info Flow Tracking [Suh et al. 04]

Problems with Existing Approaches(2) Hardware approaches: Minos [Crandall&Chong’04] Dynamic Info Flow Tracking[Suh et al. 04] RIFLE [Vachharajani et al. 04] Low performance overhead  Non-trivial h/w extensions (tags for registers and memory locations, tag computations, etc.)

Proposal in This Paper: LIFT Dynamic binary instrumentation with aggressive optimizations: Fast Path Merged Check Fast Switch Achieves 6.2% overhead for server apps and 3.6X overhead for SPEC INT

Outline Introduction Basic Implementation Optimizations Evaluation Summary

Basic Implementation TaintCheck using StarDBT 1 tag bit per byte for memory and general register A dedicated register for register tags How to protect the tag space? Tags for the tag space Set read-only page permission If app directly changes tag, then the taintcheck tries to modify tag for the tag, triggering a fault

Example Save context: 5 insts Get [ecx] tag: 11 insts Set ebx tag: 2 insts Restore context: 2 insts App instruction

Outline Introduction Basic Implementation Optimizations Fast Path Merged Check Fast Switch Evaluation Summary

Fast Path (FP) Optimization Safe->Safe dominates server application: Idea: at the beginning of a hot trace, if all live-in and live-out are safe, then no need to track info flow S: safe; U: unsafe

More Details on FP Live-in and Live-out for registers: Compute (once) a bit vector mask per trace At trace beginning, AND mask with current reg tags, if 0 use fast version Memory reference: Checks tag before every memory ref If 0, continue with fast version If 1, switch to the same instruction in slow version Turn off the optimization for a trace if it rarely works

Merged Check Improve fast path optimization further Idea: combine multiple tag checks into one Both temporal locality and spatial locality For each hot trace, examine memory references: Address computed by register (with version) & offset Temporal: same register & same offset Spatial: same register & slightly different offset Use one tag check before the first inst of each group

Fast Switch Optimization Reduce overhead for binary instrumentation Cost of saving and restoring condition flags (eflags) Replace pushf/popf with lahf/sahf Carefully code to only use SF, ZF, AF, PF, CF Liveness analysis of eflags bits If eflags bits are dead, do not need to save

Outline Introduction Basic Implementation Optimizations Evaluation Summary

Methodology Dual-processor Xeon, 64-bit mode, 3.0GHz, 512KB L2, 1GB memory Windows XP 64-bit version Client machine for server application: dual-processor Xeon 21.2 GHz running Linux 2.6.9, 100Mbps Implemented LIFT on StarDBT (by Intel) Security exploits: Apache, Savant, Putty, 18-exploit Attack benchmark Performance: 7 SPEC INT benchmarks & Apache

Security Attach Detection Results of the other columns are from [Wilander & Kamkar, NDSS’03]

Overhead with Apache Results Overhead

Overhead with SPEC INT

How frequent is fast path used?

How effective is merged check optimization?

Summary Propose three optimizations for TaintCheck Fast Path Merged Check Fast Switch Fast Switch is the most effective? Cannot be explained by the code example? Different from LBA results Guess: pure register operation dominates in EM64T? Techniques useful for LBA

Thank You!

Backup Slides

LibSafe Transparent Run-Time Defense against Stack Smashing Attacks – USENIX 2000 (Bell Labs) Libsafe: intercept all unsafe lib calls (gets, getwd, realpath, scanf, fscanf, strcpy, strcat, etc.), replace with safe versions that do not have buffer overflows How large is dest buffer? Up to the frame pointer!!! LD_PRELOAD or /etc/ld.so.preload LibVerify: copy a function code to heap, then execute a prelog + the copy + epilog, where epilog checks return address

StackGuard Change GCC extension (gcc function_prologue and function_epilogue functions) Push a randomized canary word next to return addr Verify the canary before return Alternatively, can use virtual page protection + trap handler to monitor overwrites to return addresses – MemGuard (high overhead) Adaptively use the two

RIFLE IFS (Information Flow System) Each data has label x, each location has label y Check if rule x->y exists for every operation Static checking: label variables then check labels, expression label is a join of labels of the variables in the expression. Cannot handle unsafe language and legacy prog Rules and labels are defined by programmers not users!!!

Dynamic IFS Track the propagation of labels, then enforce the policy at output points. Static IFS and dynamic IFS can leak the same amount of information (if program seg faults are allowed) But dynamic IFS cannot handle the potential info leak through not-taken branches Therefore, dynamic IFS must be conservative to be secure

RIFLE (1) Convert programs targeted for a conventional ISA to programs for an information-flow security ISA. IFS ISA augments all state defined in the base ISA with space to store a label; this includes augmenting both registers and memory. In addition to these base semantics, each instruction in the IFS ISA will use the augmented state to track explicit information flows. To allow translated programs to track implicit flows, the IFS ISA also defines additional security registers to hold auxiliary labels and instructions to manipulate these security registers and the labels affixed to general purpose registers.

RIFLE(2) IFS ISA: Every register and mem location is augmented with a label Additional label registers Common instruction + label compute and assign Branch instruction + put label into label register then use it to deal with implicit control-flow tracking Binary Translation OS enforcement: check the label of output data Evaluation: based on the Liberty Simulation Environment to simulate an IA64 processor

Minos Every 32-bit memory word is enhanced with 1 bit tag OS sets the tag when loading a page Instructions also compute the tag value Control transfer checks the tag and may trap

Extra bits

Minos(2) Implementation and evaluation is based on the Bochs emulator

Dynamic Info Flow Tracking 1 bit per byte Extend processor registers and memory locations Meta data for a page can be all-0, all-1, 1 bit per 4B, or 1 bit per byte. OS determine 4B or 1B meta data on first store to the page: if the store < 4B then use 1B meta data, else use 4B meta data.

More Evaluation: based on simpleScalar tool set Dealing with legitimate uses of spurious data: e.g. switch statement – jump table (compare against a bound then is safe)