CSC-682 Advanced Computer Security

Slides:



Advertisements
Similar presentations
Finding bugs: Analysis Techniques & Tools Symbolic Execution & Constraint Solving CS161 Computer Security Cho, Chia Yuan.
Advertisements

Interactive Configuration
GATEKEEPER MOSTLY STATIC ENFORCEMENT OF SECURITY AND RELIABILITY PROPERTIES FOR JAVASCRIPT CODE Salvatore Guarnieri & Benjamin Livshits Presented by Michael.
SMU SRG reading by Tey Chee Meng: Automatic Patch-Based Exploit Generation is Possible: Techniques and Implications by David Brumley, Pongsin Poosankam,
David Brumley, Pongsin Poosankam, Dawn Song and Jiang Zheng Presented by Nimrod Partush.
Bouncer securing software by blocking bad input Miguel Castro Manuel Costa, Lidong Zhou, Lintao Zhang, and Marcus Peinado Microsoft Research.
1 Detection of Injected, Dynamically Generated, and Obfuscated Malicious Code (DOME) Subha Ramanathan & Arun Krishnamurthy Nov 15, 2005.
Linear Obfuscation to Combat Symbolic Execution Zhi Wang 1, Jiang Ming 2, Chunfu Jia 1 and Debin Gao 3 1 Nankai University 2 Pennsylvania State University.
1 Topic 1 – Lesson 3 Network Attacks Summary. 2 Questions ► Compare passive attacks and active attacks ► How do packet sniffers work? How to mitigate?
1 Towards Automatic Discovery of Deviations in Binary Implementations with Applications to Error Detection and Fingerprint Generation David Brumley, Juan.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Impeding Malware Analysis Using Conditional Code Obfuscation Paper by: Monirul Sharif, Andrea Lanzi, Jonathon Giffin, and Wenke Lee Conference: Network.
1 Towards Automatic Discovery of Deviations in Binary Implementations with Applications to Error Detection and Fingerprint Generation David Brumley, Juan.
Introduction to Cryptography and Security Mechanisms: Unit 5 Theoretical v Practical Security Dr Keith Martin McCrea
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
The Superdiversifier: Peephole Individualization for Software Protection Mariusz H. Jakubowski Prasad Naldurg Chit Wei (Nick) Saw Ramarathnam Venkatesan.
1 Loop-Extended Symbolic Execution on Binary Programs Pongsin Poosankam ‡* Prateek Saxena * Stephen McCamant * Dawn Song * ‡ Carnegie Mellon University.
Methods For The Prevention, Detection And Removal Of Software Security Vulnerabilities Jay-Evan J. Tevis Department of Computer Science and Software Engineering.
By David Brumley, James Newsome, Dawn Song and Hao Wang and Somesh Jha.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Address Space Layout Permutation
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
1 All Your iFRAMEs Point to Us Mike Burry. 2 Drive-by downloads Malicious code (typically Javascript) Downloaded without user interaction (automatic),
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 8: Main Memory.
Exploitation: Buffer Overflow, SQL injection, Adobe files Source:
Computer Security and Penetration Testing
Foundations of Software Testing Chapter 5: Test Selection, Minimization, and Prioritization for Regression Testing Last update: September 3, 2007 These.
CSC-682 Cryptography & Computer Security Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Pompi Rotaru Based on an article.
COMPUTER SECURITY MIDTERM REVIEW CS161 University of California BerkeleyApril 4, 2012.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
November 19, 2008 CSC 682 Use of Virtualization to Thwart Malware Written by: Ryan Lehan Presented by: Ryan Lehan Directed By: Ryan Lehan Produced By:
Introduction Program File Authorization Security Theorem Active Code Authorization Authorization Logic Implementation considerations Conclusion.
W elcome to our Presentation. Presentation Topic Virus.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 31 Memory Management.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
COMPUTER SYSTEM FUNDAMENTAL Genetic Computer School COMPUTER AND INTERNET SECURITY LESSON 9.
Securing a Host Computer BY STEPHEN GOSNER. Definition of a Host  Host  In networking, a host is any device that has an IP address.  Hosts include.
Zero Day Attacks Jason Kephart. Purpose The purpose of this presentation is to describe Zero-Day attacks, stress the danger they pose for computer security.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Constraint Framework, page 1 Collaborative learning for security and repair in application communities MIT site visit April 10, 2007 Constraints approach.
Intercept X Early Access Program Sophos Tester
Shellcode COSC 480 Presentation Alison Buben.
Memory Management.
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Configuration Fuzzing for Software Vulnerability Detection
Module 30 (Unix/Linux Security Issues II)
Static Detection of Cross-Site Scripting Vulnerabilities
Automatic Patch-Based Exploit Generation
Matching Logic An Alternative to Hoare/Floyd Logic
Oyente: Making Smart Contracts Smarter
Secure Software Development: Theory and Practice
Chapter 5 Decisions. Chapter 5 Decisions ssential uestion: How are Boolean expressions or operators used in everyday life?
TriggerScope Towards detecting logic bombs in android applications
Chapter 8: Main Memory.
Nessus Vulnerability Scanning
UNIT 18 Data Security 1.
Lecture 09:Software Testing
Multistep Processing of a User Program
All You Ever Wanted to Know About Dynamic Taint Analysis & Forward Symbolic Execution (but might have been afraid to ask) Edward J. Schwartz, Thanassis.
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Coding Concepts (Basics)
Lecture 3: Main Memory.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
NP-COMPLETE Prof. Manjusha Amritkar Assistant Professor Department of Information Technology Hope Foundation’s International Institute of Information.
Outline System architecture Current work Experiments Next Steps
Model Checking and Its Applications
COMP755 Advanced Operating Systems
Presentation transcript:

CSC-682 Advanced Computer Security Automatic Patch-Based Exploit Generation : techniques and implications Based on an article by : Pongsin Poosankam David Brumley Dawn Song Jiang Zheng Presented by : Pompi Rotaru

Formulating the problem One study revealed that for Windows Update it takes 24 hours for 80 % of the PC to check for updates Given a program P and a patched version of the program P' automatically generate an exploit for the potentially unknown vulnerability present in P but fixed in P' These type of attacks are possible because patch updates usually stagger over hours or longer periods of time This study is focused on automatically generated exploits for 5 Microsoft programs based upon patches provided via Windows Update

Definitions Φ = (safety policy) is a first-order logic Boolean predicate from the programs state space to one of two values: safe or unsafe. x = an input P = version of a program containing a vulnerability P' = version of a program where the vulnerability was patched F = the weakest precondition (is a constraint formula) Generate an input x such that : Φ (P(x)) = unsafe Φ (P'(x)) = safe

Challenges Often the code is available in binary format What changes have occurred from P to P' ? Need to automatically generate inputs which exploit the vulnerability in the original unpatched program What is the speed at which exploits can be generated from patches in order to design adequate security defences ?

How it works (hacker's perspective) A new patch reveals some information about an existing vulnerability, and having early access to a patch may confer advantages to an attacker over hosts who have not yet received the patch An exploit is generated within a few minutes It can generate polymorphic exploit variants The tool addressed the binary and the libraries If the attack succeeds then : crash the program and cause denial of service hijack control of the program 

How it works (victim's perspective) User visits a malicious web site that uses inputs that take advantage of that unpatched vulnerability User visits a legitimate web site that has been hacked

General concept APEG is based on the observation that input-validation bugs are usually fixed by adding the missing sanitization checks

The approach : step by step 1. Identify the new sanitization checks added in P' ; compute the differences between the two versions 2. Generate a candidate exploit x which fails the new check in P' by: Calculating the weakest precondition to fail the new check in P' Use a solver to find x such that F(x) = true. x is the candidate exploit 3. Verify a candidate exploit is a real exploit by running Φ(P(x)) 4. (optional) Generate polymorphic variants

Differencing Two Binaries We look for difference between the P and P' versions It is based on purely syntactic analysis of the disassembled binary Since not all the differences are possible exploits, they prioritized the new checks that appear in procedures that have changed very little

Generate candidate exploit - Dynamic Generating a constraint formula from a sample execution Dynamic approach considers a single path at a time The number of exploitable paths is typically only a fraction of all possible execution paths Dynamic approach produces formulas that are typically the smallest of the three approaches Dynamic approach is usually the fastest for producing candidate exploits

Generate candidate exploit - Static Generating a constraint formula over a CFG Encompasses multiple paths without enumerating them individually Perform program chopping on the program CFG in order to create a CFG that only includes paths to the new check Computing a formula over the CFG is more efficient than computing a separate formula for each path in the CFG separately Formulas are typically larger and therefore take longer to solve, because they include all instructions in the CFG fragment

Generate candidate exploit - Combined Combination of dynamic and static analysis We combine information about code paths we know how to execute via known inputs, and additional code paths we wish to explore using static analysis Provides a way of considering a subset of paths so that the generated formula is small enough for the solver to generate a candidate exploit

Verifying the exploits Goal : inputs taking on a satisfying assignment will make the program execution reach the point of the new check and fail the new check They used STP (a decision procedure that supports bit level operations), as a solver to generate candidate exploits from the constraint formula After a predefined timeout they move to build another constraint formula covering other paths Verification is done using an off-the-shelf dynamic-taint analysis-style exploit detector that returns unsafe when the candidate exploit is verified

Generating Polymorphic Exploits There are potentially many different exploits, with each individual exploit called a polymorphic variant We need to find new input exploit x' and a new function F' such that F'(x') = true

Evaluation Done for 5 vulnerable Microsoft programs which have patches available Name of the program/routine that is affected Vulnerability is exploited (memory allocation, information disclosure) Time required to generate an exploit (sec … min) Count the functions that were changed or added (21 chg. + 5 add.) Select one of the functions for attack Generate the exploit Addition details (repeatedly launching an attack until the memory layout matches what the exploit expects)

How to mitigate such attacks 3 solutions to mitigate this type of attacks Make it hard to find new checks (through obfuscation) Make it so everyone can download the update before anyone can apply it (using encryption) Make it so everyone can download the patch at the same time (using P2P)

Conclusions APEG is possible in several real-world cases An exploit can be generated within a few minutes Each analysis exploit approach was proven to be useful in certain situations Can generate polymorphic exploit variants The technique described may not work in all cases The current patch distribution schemes are insecure, and should be redesigned to defend against APEG questions ?!?