Address Obfuscation: An Efficient Approach to Combat a Broad Range of Memory Error Exploits Sandeep Bhatkar, Daniel C. DuVarney, and R. Sekar Stony Brook.

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

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.
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
Buffer Overflow Prevention ”\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e \x89\xe3\x50\x53\x50\x54\x53\xb0\x3b\x50\xcd\x80” Presented to CRAB April.
Memory Management Questions answered in this lecture: How do processes share memory? What is static relocation? What is dynamic relocation? What is segmentation?
Breno de MedeirosFlorida State University Fall 2005 Buffer overflow and stack smashing attacks Principles of application software security.
1 CHAPTER 8 BUFFER OVERFLOW. 2 Introduction One of the more advanced attack techniques is the buffer overflow attack Buffer Overflows occurs when software.
Software-based Code Attestation for Wireless Sensors.
Beyond Stack Smashing: Recent Advances in Exploiting Buffer Overruns Jonathan Pincus Microsoft Research Brandon Baker Microsoft Carl Hartung CSCI 7143:
Security Protection and Checking in Embedded System Integration Against Buffer Overflow Attacks Zili Shao, Chun Xue, Qingfeng Zhuge, Edwin H.-M. Sha International.
Anomaly Detection Using Call Stack Information Security Reading Group July 2, 2004 Henry Feng, Oleg Kolesnikov, Prahlad Fogla, Wenke Lee, Weibo Gong Presenter:
Achieving Trusted Systems by Providing Security and Reliability Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun Xu, Shuo Chen, Nithin Nakka and Karthik Pattabiraman.
1 RISE: Randomization Techniques for Software Security Dawn Song CMU Joint work with Monica Chew (UC Berkeley)
Lecture 16 Buffer Overflow
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Address Space Layout Permutation
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
Computer Security and Penetration Testing
KGuard: Lightweight Kernel Protection against Return-to-User Attacks Authors: Vasileios P. Kemerlis Georgios Portokalidis Angelos D. Keromytis Presenter:
Buffer Overflow Detection Stuart Pickard CSCI 297 June 14, 2005.
Computer Science Detecting Memory Access Errors via Illegal Write Monitoring Ongoing Research by Emre Can Sezer.
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”.
Branch Regulation: Low-Overhead Protection from Code Reuse Attacks.
{ Enhanced Operating System Security Through Efficient and Fine-grained Address Space Randomization Cristiano Giuffrida, Anton Kuijsten & Andrew S.Tanenbaum.
CNIT 127: Exploit Development Ch 4: Introduction to Format String Bugs.
Enhanced Operating System Security Through Efficient and Fine-grained Address Space Randomization Vikram Reddy Enukonda.
Buffer Overflow Attack-proofing by Transforming Code Binary Gopal Gupta Parag Doshi, R. Reghuramalingam The University of Texas at Dallas 11/15/2004.
Exploitation possibilities of memory related vulnerabilities
RUN-Time Organization Compiler phase— Before writing a code generator, we must decide how to marshal the resources of the target machine (instructions,
Buffer Overflow Proofing of Code Binaries By Ramya Reguramalingam Graduate Student, Computer Science Advisor: Dr. Gopal Gupta.
Buffer Overflow Attack Proofing of Code Binary Gopal Gupta, Parag Doshi, R. Reghuramalingam, Doug Harris The University of Texas at Dallas.
Lecture 9: Buffer Ovefflows and ROP EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
Protecting C Programs from Attacks via Invalid Pointer Dereferences Suan Hsi Yong, Susan Horwitz University of Wisconsin – Madison.
+ Dynamic memory allocation. + Introduction We often face situations in programming where the data is dynamics in nature. Consider a list of customers.
Information Leaks Without Memory Disclosures: Remote Side Channel Attacks on Diversified Code Jeff Seibert, Hamed Okhravi, and Eric Söderström Presented.
Introduction Program File Authorization Security Theorem Active Code Authorization Authorization Logic Implementation considerations Conclusion.
On the Effectiveness of Address-Space Randomization Hovav Shacham, Matthew Page, Ben Pfaff, Eu-Jin Goh, Nagendra Modadugu, Dan Boneh.
Efficient software-based fault isolation Robert Wahbe, Steven Lucco, Thomas Anderson & Susan Graham Presented by: Stelian Coros.
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 豊島隆志.
Group 9. Exploiting Software The exploitation of software is one of the main ways that a users computer can be broken into. It involves exploiting the.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 11, 2011.
VM: Chapter 7 Buffer Overflows. csci5233 computer security & integrity (VM: Ch. 7) 2 Outline Impact of buffer overflows What is a buffer overflow? Types.
Beyond Stack Smashing: Recent Advances In Exploiting Buffer Overruns Jonathan Pincus and Brandon Baker Microsoft Researchers IEEE Security and.
Buffer Overflows: Attacks and Defenses for the Vulnerability of the Decade Crispin Cowan SANS 2000.
Chapter 10 Chapter 10 Implementing Subprograms. Implementing Subprograms  The subprogram call and return operations are together called subprogram linkage.
Protecting C and C++ programs from current and future code injection attacks Yves Younan, Wouter Joosen and Frank Piessens DistriNet Department of Computer.
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt Cyber Defense.
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.
@Yuan Xue Worm Attack Yuan Xue Fall 2012.
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Code Generation Instruction Selection Higher level instruction -> Low level instruction Register Allocation Which register to assign to hold which items?
Shellcode COSC 480 Presentation Alison Buben.
Mitigation against Buffer Overflow Attacks
Remix: On-demand Live Randomization
Buffer Overflow Buffer overflows are possible because C doesn’t check array boundaries Buffer overflows are dangerous because buffers for user input are.
Protecting Memory What is there to protect in memory?
The Hardware/Software Interface CSE351 Winter 2013
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Advanced Buffer Overflow: Pointer subterfuge
Software Security Lesson Introduction
Format String.
Smashing the Stack for Fun and Profit
Tim Ehrlich Growing Arrays in C.
Understanding and Preventing Buffer Overflow Attacks in Unix
Return-to-libc Attacks
Presentation transcript:

Address Obfuscation: An Efficient Approach to Combat a Broad Range of Memory Error Exploits Sandeep Bhatkar, Daniel C. DuVarney, and R. Sekar Stony Brook University Department of Computer Science USENIX Security Symposium, 2003 Tracy Wagner CDA 6938 March 22, 2007

Outline Introduction Attack Goals and Methods Address Obfuscation Transformations Implementation Concerns Effectiveness Performance Conclusion Strengths/Weaknesses/Future Work

Introduction Exploits of memory programming errors Stack smashing Integer overflow Heap overflow Double-free vulnerability C/C++ low level control Require precise knowledge of victim program

Introduction Address Obfuscation Make relative or absolute addresses of program code and data impossible to predict On execution, virtual addresses are randomized Exploits become non-deterministic Effective against large-scale attacks Randomization strategies for both data and code locations

Attack Goals Cause the target program to execute attack code Attack Code Injected Code – provided by attacker Existing Code – already part of program

How Do We Attack? Direct Change Control Flow of Program – change a code pointer Return address – stack Function pointers – stack, heap, static area Global offset table (GOT) Indirect Change Security-Critical Data used in the course of execution Arguments to system calls Variables holding sensitive data

How Do We Attack? Address-Dependent Attacks Can corrupt code-pointer or data-pointer Overwrite pointer value with the absolute address of attacker-defined data or code Relative Address-Dependent Attacks Corrupts non-pointer data Need to know relative distance between buffer and location of item to corrupt

Address Obfuscation Goal is to Randomize: Absolute locations of all code and data Relative distances between data items Transformations Randomize Base Addresses of Memory Regions Permute the Order of Variables/Routines Introduce Random Gaps Between Objects

Base Address Randomization Changing the base addresses of code and data by a random amount Over a large range (1 – 100 million) results in highly unpredictable virtual addresses Does not increase the physical memory requirements Some virtual address space becomes unusable

Base Address Randomization Base address of stack All stack addresses randomized Subtract a large random value from stack pointer Base address of heap Randomizes absolute locations of data Allocate a large block of random size

Base Address Randomization Starting address of DLLs Randomize location of all code and static data Prevents existing code attacks, static data corruption Locations of routines and static data Randomize all functions and associated static data in the executable Similar to DLL randomization

Variable/Routine Permutations Three possible transformations Order of local variables in stack frame Order of static variables Order of routines in shared libraries or in executable Defends against relative distance exploits Difficult to predict distances

Random Gaps Between Objects When relative order of objects cannot be changed Add random padding: Stack frames Between malloc requests Variables in static area Gaps within routines (add jump instructions)

Implementation - Timing Performing Transformations Compile-time, link-time, installation- time, load-time Higher performance when closer to compile-time Delaying transformations: Can apply to third party software System tools not modified

Implementation - Timing Determining Randomization Amounts Transformation time Beginning of program execution Continuously, during execution Continuously is most secure Performance or compatibility issues may force other choices Transformation time – necessary to re-transform code periodically

Effectiveness Not foolproof, but will increase work Defends against attacks which involve overwriting a single value without ability to read memory contents Can be defeated in specific instances Program allows reading of memory contents Double pointer attack Partial overwrite attack

Performance Static relocation at link-time (1) Dynamic relocation at load-time (2) Transformations Relocate base of stack, heap, and code regions Introduce random gaps within stack frames for each routine, at the end of each malloc-requested block

Performance Static relocation at link-time essentially no runtime overhead Dynamic relocation at load-time has noticeable overhead but provides broad protection for DLL distribution

Conclusion Addresses root cause of buffer overflow exploits Predictable location of data Generic mechanism providing wide range of applications Causes attacker to start from scratch for each system attack Slows the spread of self-replicating attacks

Strengths Developed and analyzed range of transformations that can be implemented with low runtime overheads Permits randomization of variable and routine locations Protects against a wide range of attacks Easily applied to existing code, selective applications

Weaknesses Transformation time randomizations introduce opportunity for local attacker Adding jump instructions to skip over inserted gaps within routines would provide more information to attacker Programs have to be periodically re- obfuscated because some randomizations have been fixed at transformation times Vulnerable to some specially crafted attacks in current implementation

Future Work Further implementation of described transformations Improve randomization at binary level Tool to work with existing binaries Add information section to binary Move towards randomizing at start of program execution and continuously changing during execution to avoid necessity of re-obfuscation