Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt Cyber Defense.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

ROP is Still Dangerous: Breaking Modern Defenses Nicholas Carlini et. al University of California, Berkeley USENIX Security 2014 Presenter: Yue Li Part.
Smashing the Stack for Fun and Profit
CS457 – Introduction to Information Systems Security Software 4 Elias Athanasopoulos
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.
CSc 352 Programming Hygiene Saumya Debray Dept. of Computer Science The University of Arizona, Tucson
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.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir.
Dr. XiaoFeng Wang Spring 2006 Packet Vaccine: Black-box Exploit Detection and Signature Generation XiaoFeng Wang, Zhuowei Li Jun Xu, Mike Reiter Chongkyung.
Exceptions Don’t Frustrate Your User – Handle Errors KR – CS 1401 Spring 2005 Picture – sysprog.net.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Review: Software Security David Brumley Carnegie Mellon University.
1 CHAPTER 8 BUFFER OVERFLOW. 2 Introduction One of the more advanced attack techniques is the buffer overflow attack Buffer Overflows occurs when software.
TaintCheck and LockSet LBA Reading Group Presentation by Shimin Chen.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
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.
1 Achieving Trusted Systems by Providing Security and Reliability (Research Project #22) Project Members: Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun.
Achieving Trusted Systems by Providing Security and Reliability Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun Xu, Shuo Chen, Nithin Nakka and Karthik Pattabiraman.
Assembly תרגול 8 פונקציות והתקפת buffer.. Procedures (Functions) A procedure call involves passing both data and control from one part of the code to.
Bro: A System for Detecting Network Intruders in Real-Time Presented by Zachary Schneirov CS Professor Yan Chen.
Lecture 16 Buffer Overflow
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Address Obfuscation: An Efficient Approach to Combat a Broad Range of Memory Error Exploits Sandeep Bhatkar, Daniel C. DuVarney, and R. Sekar Stony Brook.
On-Chip Control Flow Integrity Check for Real Time Embedded Systems Fardin Abdi Taghi Abad, Joel Van Der Woude, Yi Lu, Stanley Bak, Marco Caccamo, Lui.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
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-
Lecture 6: Buffer Overflow CS 436/636/736 Spring 2014 Nitesh Saxena *Adopted from a previous lecture by Aleph One (Smashing the Stack for Fun and Profit)
KGuard: Lightweight Kernel Protection against Return-to-User Attacks Authors: Vasileios P. Kemerlis Georgios Portokalidis Angelos D. Keromytis Presenter:
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt In ACM CCS’05.
Attacking Applications: SQL Injection & Buffer Overflows.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Computer Science Detecting Memory Access Errors via Illegal Write Monitoring Ongoing Research by Emre Can Sezer.
Mitigation of Buffer Overflow Attacks
Packet Vaccine: Black-box Exploit Detection and Signature Generation
Vigilante: End-to-End Containment of Internet Worms Authors : M. Costa, J. Crowcroft, M. Castro, A. Rowstron, L. Zhou, L. Zhang, and P. Barham In Proceedings.
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Presenter: Jianyong Dai Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookhot.
Lecture 8: Buffer Overflow CS 436/636/736 Spring 2013 Nitesh Saxena *Adopted from a previous lecture by Aleph One (Smashing the Stack for Fun and Profit)
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,
Part I The Basic Idea software sequence of instructions in memory logically divided in functions that call each other – function ‘IE’ calls function.
JMU GenCyber Boot Camp Summer, Introduction to Penetration Testing Elevating privileges – Getting code run in a privileged context Exploiting misconfigurations.
Information Leaks Without Memory Disclosures: Remote Side Channel Attacks on Diversified Code Jeff Seibert, Hamed Okhravi, and Eric Söderström Presented.
Where’s the FEEB?: Effectiveness of Instruction Set Randomization Nora Sovarel, David Evans, Nate Paul University of Virginia Computer Science USENIX Security.
On the Effectiveness of Address-Space Randomization Hovav Shacham, Matthew Page, Ben Pfaff, Eu-Jin Goh, Nagendra Modadugu, Dan Boneh.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
Foundations of Network and Computer Security J J ohn Black CSCI 6268/TLEN 5550, Spring 2013.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 11, 2011.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Evaluating the Fault Tolerance Capabilities of Embedded Systems via BDM M. Rebaudengo, M. Sonza Reorda Politecnico di Torino Dipartimento di Automatica.
CNIT 127: Exploit Development Ch 8: Windows Overflows Part 1.
Random Test Generation of Unit Tests: Randoop Experience
Week-14 (Lecture-1) Malicious software and antivirus: 1. Malware A user can be tricked or forced into downloading malware comes in many forms, Ex. viruses,
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Language-Based Security: Overview of Types Deepak Garg Foundations of Security and Privacy October 27, 2009.
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.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
The Hardware/Software Interface CSE351 Winter 2013
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Lecture 9: Buffer Overflow*
FIGURE Illustration of Stack Buffer Overflow
Format String Vulnerability
Presentation transcript:

Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Authors: Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookholt Cyber Defense Laboratory Department of Computer Science North Carolina State University Presenter: Radha Maldhure for CDA 6133 Spring’08

Overview Memory Corruption Address Space Randomization System Overview System Architecture State Transition of Program Diagnosis Signature Generation Experimental Evaluation Contribution Weakness Suggestions References

Memory Corruption Memory Location are unintentionally modified due to programming errors Attack: –Successful attack allows a remote code execution –Unsuccessful attack causes program crash or strange program behavior Most popular means to take control of target system Type: Buffer Overflow, Integer overflow

Memory Corruption: Example Memory Corruption by Buffer Overflow Code Ret Addr Local Var Local Buffer Attacker’s codeRet Add Process Memory layout for X Attacker’s Packet Stack frame for User_input() For example: User_input( ) is some routine in X Local Var Ret Addr

Address Space Randomization Code Ret Addr Argument Local Var Local Buffer Normal Memory Layout Memory layout with Randomizati on-on

Example: Memory corruption with ASR Memory Corruption by Buffer Overflow The return address points to wrong Memory location CRASH!!! Code Ret Addr Argument Local Var Local Buffer Ret Addr Stack frame

System Overview

System Architecture

Terms needed for Model Some definitions: Memory attack = multiple corrupting instruction Corrupting Instruction( c ) = tricked to overwrite critical program data Initial Corrupting Instruction( i ) = Corrupting program data based on network input Take over Instruction( t ) = Control flow transfer Instruction Faulting Instruction( f ) = Cause process to crash

State Transition of a randomized program under memory corruption attack initial corrupting instr c Normal Crash Security Compromise Inconsistent Execution Critical Data Corruption initial corrupting instr c (c=f) faulting instr f t with correct addr prediction Case 2 : K= Non-takeover instr i with incorrect addr prediction( i=f ) k t with incorrect addr prediction(t = f) Case 1 Case 3Case 4

Case1 buf Input to GetUserName( ) is large This causes buffer overflow and accesses illegal memory location and hence the system crashes!!!! hhhwdhw vhdvhvdhj hdhvdhvd dsadjvdvh vdqwdgg gdggdggg dwgfbfns Sample program int foo( int b, int *c ) { buf[10]; GetUserName(buf) (*c)++; return *c } b b c c Corrupting Instruction is the Faulting instruction( c = f )

Case 2 The attack corrupts some critical data without crash. However, process crashes when executing non-takeover instruction int foo( int b, int *c ) { buf[10]; GetUserName(buf) (*c)++; return *c } 0000 c b buf Stack frame Program crashes as third statement executes!!

Case c b Ret addr buf Jmp Invalid memory Stack frame Take-over instruction is the faulting instruction

Case c b Ret addr buf Jmp Invalid memory Stack frame Successfully executes take-over instruction, and continues to execute for some time before crash

Diagnosis Who? By monitor & Diagnosis engine on memory access violation exception How? –Identifying faulting instruction –Converting case 4 crashes –Tracing corrupting instruction

Identifying faulting Instruction Goal: Find address of faulting Instruction ‘f’ Two cases: Simple case: f = preceding instruction of current PC Complex case: f = indirect control flow transfer instruction PC = invalid memory address that causes access violation If not Complex case then its Simple case !!

Complex case C = { m } = indirect control flow instructions in program Decode and compute target addr(a) for m Instr a X x Y y a = Current PC registerUse break points Keep the instruction f = last instr before memory access violation

Converting Case 4 Eliminate the possibility of Case 4 crash –No way to differentiate cases –Uses random re-execution –Convert to other cases

Converting Case 4( condt.) Jmp 4000 Case4 Case3 Case 1 or Case 2 OR Jmp 4000 t Make invalid 4000 Memory access violation exception Converted Memory Layout-A Memory Layout-B

Tracing Corrupting Instruction Basic Idea Trace back to the instruction that writes corrupted data until network input data Not Sure How it works!!

Signature Generation Two types Pure Message Signature Use critical byte sequence from attack Unacceptable false positive rate Correlate Message Signature with program execution state Low false positive rate Speeds up message filtering High detection rate

Experimental Evaluation Effectiveness of Diagnosis

Contribution Automation improves the efficiency of problem diagnosis Model for defense and analysis of memory corruption attacks

Weaknesses Address Space Randomization is susceptible to brute- force attacks Implementation of the suggested prototype requires extensions Gives little information about the type of occurred memory corruption At some points, the explanation is difficult to understand

How To Improve Explanation and Diagrams must be accompanied with examples Few terms like memory corruption, address space randomization must be elaborated

References Wikipedia Address Space Layout Permutation, by Chongkyung Kil

QUESTIONS????