Trust Boundary Vulnerability Exploitation State of the Exploit

Slides:



Advertisements
Similar presentations
State of the Exploit Matt Miller / Trust Boundary VulnerabilityExploitation.
Advertisements

Introduction to Memory Management. 2 General Structure of Run-Time Memory.
Defenses. Preventing hijacking attacks 1. Fix bugs: – Audit software Automated tools: Coverity, Prefast/Prefix. – Rewrite software in a type safe languange.
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.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Nibin Varghese iViZ Security, Kolkata Reverse Engineering for Exploit Writers.
Breno de MedeirosFlorida State University Fall 2005 Buffer overflow and stack smashing attacks Principles of application software security.
Intro to Exploitation Stack Overflows James McFadyen UTD Computer Security Group 10/20/2011.
Run-Time Storage Organization
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.
In vfprintf(), if (fmt points to “%n”) then **ap = (character count) Achieving Trusted Systems by Providing Security and Reliability FORMAL REASONING ON.
Andrea Bittau, Adam Belay, Ali Mashtizadeh, David Maziéres, Dan Boneh
Software Development and Software Loading in Embedded Systems.
Lecture 16 Buffer Overflow
Address Obfuscation: An Efficient Approach to Combat a Broad Range of Memory Error Exploits Sandeep Bhatkar, Daniel C. DuVarney, and R. Sekar Stony Brook.
Address Space Layout Permutation
A Survey of Dynamic Techniques for Detecting Device Driver Errors Olatunji Ruwase LBA Reading Group 18 th May 2010.
Computer Science Detecting Memory Access Errors via Illegal Write Monitoring Ongoing Research by Emre Can Sezer.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 10 “Buffer Overflow”.
CNIT 127: Exploit Development Ch 4: Introduction to Format String Bugs.
Defending Browsers against Drive-by Downloads:Mitigating Heap-Spraying Code Injection Attacks Authors:Manuel Egele, Peter Wurzinger, Christopher Kruegel,
MICHALIS POLYCHRONAKIS(COLUMBIA UNIVERSITY,USA), KOSTAS G. ANAGNOSTAKIS(NIOMETRICS, SINGAPORE), EVANGELOS P. MARKATOS(FORTH-ICS, GREECE) ACSAC,2010 Comprehensive.
Buffer Overflow Attack Proofing of Code Binary Gopal Gupta, Parag Doshi, R. Reghuramalingam, Doug Harris The University of Texas at Dallas.
What is exactly Exploit writing?  Writing a piece of code which is capable of exploit the vulnerability in the target software.
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.
SEH overwrite and its exploitability Shuichiro Suzuki Fourteenforty Research Institute Inc. Research Engineer.
Buffer Overflows Taught by Scott Coté.-. _ _.-. / \.-. ((___)).-. / \ /.ooM \ / \.-. [ x x ].-. / \ /.ooM \ -/ \ /-----\-----/---\--\ /--/---\-----/-----\ / \-
Web Security Firewalls, Buffer overflows and proxy servers.
By Anand George SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)
CNIT 127: Exploit Development Ch 8: Windows Overflows Part 1.
1 Introduction to Information Security , Spring 2016 Lecture 2: Control Hijacking (2/2) Avishai Wool.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Variables Bryce Boe 2012/09/05 CS32, Summer 2012 B.
Shellcode COSC 480 Presentation Alison Buben.
Mitigation against Buffer Overflow Attacks
Protecting Memory What is there to protect in memory?
Data Watch Presenter Information Jason Puncher and François Tétreault
Chapter 1 Introduction.
Chapter 6 CS 3370 – C++ Functions.
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
CSC 495/583 Topics of Software Security Heap Exploitation
Implementing Processes and Threads
Introduction to Information Security
Jump Over ASLR: Attacking Branch Predictors to Bypass ASLR
Chapter 1 Introduction.
Exam Review.
CSC 495/583 Topics of Software Security Return-oriented programming
Bruhadeshwar Meltdown Bruhadeshwar
The Hardware Interface
Continuous, Low Overhead, Run-Time Validation of Program Executions
High Coverage Detection of Input-Related Security Faults
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Computer Organization & Compilation Process
Jihyun Park, Changsun Park, Byoungju Choi, Gihun Chang
Chap. 8 :: Subroutines and Control Abstraction
Chap. 8 :: Subroutines and Control Abstraction
Software Security Lesson Introduction
CSC 495/583 Topics of Software Security Format String Bug (2) & Heap
Smashing the Stack for Fun and Profit
Von Neumann model - Memory
The future of Software Security Dr. Si Chen
Foundations and Definitions
Outline Introduction Memory protection Buffer overflows
Return-to-libc Attacks
Presentation transcript:

Matt Miller / mmiller@leviathansecurity.com Trust Boundary Vulnerability Exploitation State of the Exploit Matt Miller / mmiller@leviathansecurity.com

What is the state of the exploit? Where do generic exploitation techniques stand in 2008? Formidable mitigations exist (ASLR, NX, GS) Many techniques impractical or impossible Exploits are more reliant on vuln-specific qualities How can we evaluate the relevance & feasibility of current & future techniques? Exploitability analysis Function pointers in heap / Dowd’s bug

Exploitability analysis Studying the qualities that influence exploitation If a vulnerability exists, how exploitable would it be? Research directions Exploitation properties Simulating exploitation Independent of a particular vulnerability

Exploitation Properties

What are exploitation properties? Specific qualities that enable or inhibit exploitation techniques Objectively derived from a program Vulnerability independent Intuitively known, but not formally defined Exploits have always relied on exploitation properties

Relating to exploitation techniques Exploitation techniques have pre-conditions that must be satisfied SEH overwrite must be able to overwrite EH record Exploitation properties help determine the satisfiability of those pre-conditions Function called in EH scope == TRUE Satisfiability determines effective exploitability

Examples of exploitation properties Processor supports NX Function called in EH scope Function uses GS T F T F T F Talk about the degree of inhibition – for example, ASLR inhibits exploitation techniques 1/256 – this should be captured Execute code from NX region SEH overwrite Return address overwrite Inhibits Enables

Deriving exploitation property values Dynamic analysis Hardware properties (NX supported?) Operating system properties (ASLR supported?) Process properties (NX enabled?) Static analysis Binary module properties (Relocateable?) Function properties (GS enabled?) Case study next

Case study: MS07-017 (ANI) Animated cursor vulnerability found by Alexander Sotirov in late 2006 Stack-based buffer overflow First highly exploitable issue to affect Vista Why was it so exploitable?

MS07-017 vulnerability details 01: int LoadAniIcon(struct MappedFile* file, ...) { 02: struct ANIChunk chunk; 03: struct ANIHeader header; // 36 byte structure 04: while (1) { 05: // read the first 8 bytes of the chunk 06: ReadTag(file, &chunk); 07: switch (chunk.tag) { 08: case ’anih’: 09: // read chunk.size bytes into header 10: ReadChunk(file, &chunk, &header); Credit to Sotirov for the pseudo-code

Exploitation properties of MS07-017 Inhibitors Enablers OS properties ASLR present SafeSEH present Hardware properties NX supported Function properties GS not present Called in EH scope Partial overwrite is feasible Process properties NX support disabled

Statically detecting MS07-017 MS07-017 could have been found with the help of exploitability analysis Find instances of code enabling reliable exploitation techniques No GS, EH scope, partial overwrite feasible, etc Resultant set would include the function containing the ANI vulnerability Vulnerability analysis can narrow this set

Automatically assessing exploitability Recap Exploitation techniques have pre-conditions that must be satisfied Exploitation properties provide objective values for these pre-conditions How can we better assess exploitability with this information?

Simulated Exploitation

Simulating exploitation Consider exploitation as a state machine Abstract execution states Exploitation techniques are transitions Exploitability is derived from the degree to which pre-conditions are satisfied

Simulating exploitation Vulnerability side-effects represent the pre-conditions of the initial state Extent of memory corruption Pattern of memory corruption Precision can vary Memory corruption of a stack buffer 256 byte overwrite at &local with pattern A-Z

High-level exploitation NFA Coalesce NxN Memory Corruption Overwrite Exception Handler Overwrite Frame Pointer Overwrite Return Address Overwrite Function Pointer Control of Frame Pointer Control of Instruction Pointer Instruction pointer from Frame pointer Code execution from Instruction pointer Control of Code Execution

Exploitation technique pre-conditions Region of corruption = Stack Range of corruption intersects with the address of a return address Guard stack presence = FALSE Memory Corruption Overwrite return address Control of Instruction Pointer ASLR presence = FALSE NX presence = FALSE if instruction pointer in non-executable region Address of useful code is known Code execution from instruction pointer Control of Code Execution

Conclusion

Uses for exploitability analysis Identify regions of code that may be highly exploitable given the presence of a vulnerability Program risk assessment Evaluate the effectiveness of exploitation techniques & mitigations Automatic exploit generation using post-conditions from simulated exploitation Unlikely to compete with human talent 

Future work Research additional exploitation properties Further develop analysis tools Dynamic analysis of hardware, OS, and process state Further develop exploitation simulator Basic exploit generator using post-conditions

Additional reading on exploitation properties Thanks! Additional reading on exploitation properties http://uninformed.org/?v=9&a=4 Trust Boundary Vulnerability Exploitation