Defeating public exploit protections (EMET v5.2 and more)

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

CS457 – Introduction to Information Systems Security Software 4 Elias Athanasopoulos
David Brumley Carnegie Mellon University Credit: Some slides from Ed Schwartz.
CS457 – Introduction to Information Systems Security Software 3 Elias Athanasopoulos
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
An in depth analysis of CVE
Andrew Roths Fermin J. Serna MSRC Engineering and MSEC Science Microsoft Corporation.
USING EMET TO DEFEND AGAINST TARGETED ATTACKS PRESENTED BY ROBERT HENSING – SENIOR CONSULTANT – MICROSOFT CORPORATION MICHAEL MATTES – SENIOR CONSULTANT.
Part III Counter measures The best defense is proper bounds checking but there are many C/C++ programmers and some are bound to forget  Are there any.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
CS351 © 2003 Ray S. Babcock Software Testing What is it?
Why Security Testing Is Hard Herbert H. Thompson Presenter: Alicia Young.
Nozzle: A Defense Against Heap-spraying Code Injection Attacks Paruj Ratanaworabhan, Cornell University Ben Livshits and Ben Zorn, Microsoft Research (Redmond,
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
2851A_C01. Microsoft Windows XP Service Pack 2 Security Technologies Bruce Cowper IT Pro Advisor Microsoft Canada.
RFC6520 defines SSL Heartbeats - What are they? 1. SSL Heartbeats are used to keep a connection alive without the need to constantly renegotiate the SSL.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Debugging Print And Imaging Drivers. Print driver team philosophy on driver quality There are tools to detect violations Wrongful development assumptions.
Introduction to Android Swapnil Pathak Advanced Malware Analysis Training Series.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Malicious Code Brian E. Brzezicki. Malicious Code (from Chapter 13 and 11)
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Secure Operating Systems Lesson B: Let’s go break something.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
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,
Briefing for: Hacking Windows Internals Cesar Cerrudo Argeniss.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Using Memory Management to Detect and Extract Illegitimate Code for Malware Analysis Carsten Willems 1, Thorsten Holz 1, Felix Freiling 2 1 Ruhr-University.
Exploitation possibilities of memory related vulnerabilities
Amit Malik SecurityXploded Research Group FireEye Labs.
Advanced x86: BIOS and System Management Mode Internals Conclusion Xeno Kovah && Corey Kallenberg LegbaCore, LLC.
Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions.
Information Leaks Without Memory Disclosures: Remote Side Channel Attacks on Diversified Code Jeff Seibert, Hamed Okhravi, and Eric Söderström Presented.
Lecture 13 Page 1 CS 236 Online Major Problem Areas for Secure Programming Certain areas of programming have proven to be particularly prone to problems.
Security Attacks Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
GHOST 2.0: What you need to know about the glibc getaddrinfo vulnerability (CVE ) Johannes B. Ullrich, Ph.D, SANS
Lecture 8 Page 1 CS 236, Spring 2008 Operating System Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Engineering Secure Software. Does Security Even Matter?  Find two other people near you Introduce yourself What is your favorite software development.
Exploitation Development and Implementation PRESENTER: BRADLEY GREEN.
By: Chuqing He. Android Overview - Purchased by Google in First Android Phone was sold in Oct Linux-based - Holds 75% of the worldwide.
Lec. Waleed Bin Shahid.  You might have noticed a lot of issues related to software implementation.  The ultimate requirement of developer(s) is to.
Shellcode COSC 480 Presentation Alison Buben.
Major Problem Areas for Secure Programming
Exploiting and Defense
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
CSCE 548 Secure Software Development Risk-Based Security Testing
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Yaoqi Jia, Zheng Leong Chua, Hong Hu,
Protecting Memory What is there to protect in memory?
CSC 495/583 Topics of Software Security Stack Overflows (2)
Secure Software Development: Theory and Practice
Trust Boundary Vulnerability Exploitation State of the Exploit
11/17/2018 9:32 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Term Project: A Survey on Attacking Method with Multimedia Files
Understanding your enemy!
Software Security Lesson Introduction
Efficient Memory Safety for TinyOS 2.1
The future of Software Security Dr. Si Chen
Spear Phishing Awareness
Outline Introduction Memory protection Buffer overflows
Return-to-libc Attacks
Presentation transcript:

Defeating public exploit protections (EMET v5.2 and more) Raghav Pande Researcher @ FireEye

Disclaimer The Content, Demonstration, Source Code and Programs presented here is "AS IS" without any warranty or conditions of any kind. Also the views/ideas/knowledge expressed here are solely mine and have nothing to do with the company or the organization in which i am currently working. However in no circumstances neither me nor SecurityXploded is responsible for any damage or loss caused due to use or misuse of the information presented here.

Content Introduction to Exploitation Public Protections Bypass Precisely Targeted

Why Exploits? Difficult to understand No proper intel Can own a Researcher and Newbie alike You really need to know your stuff

Information Tools used are public and free EMET (Microsoft) Anti Exploit (Malware Bytes) Hitman Alert (Surfright) Note: They do a very good job in protecting end users, But nothing is perfect. Kudos to them!

Introduction to Exploitation Exploits are crafted pieces of Art which can elevate a Software Bug and grant you one time access to Code Execution. Loopholes or Logic Bugs Memory Corruption Information Disclosure

Introduction to Exploitation Details Pre Exploitation or Setup Spray Corruption of Meta-Information InfoLeak Exploitation Corruption Payload Execution ROP CodeExecution Post Exploitation Malware

Possible Protections Pre Exploitation or Setup Exploitation Spray Exploitation Payload Execution ROP detection CodeExecution detection Post Exploitation Malware

Public Protections 3rd Party support MemProt Rop Shellcode Protection CallerCheck StackPivot SimExecFlow LoadLibrary Shellcode Protection OS & Processor supported ASLR (Enforced) DEP (Enforced)

Exploitation CVE-2012-1876 IE exploit Corruption of HeapData by Overflow ROP Shellcode to pop calc.exe Hurdles Rop Detection Shellcode Detection ASLR DEP

Exploitation Defeat DEP by ROP Defeat ASLR by memory leak (provided in sample exploit) Crux of Exploitation Detection techniques Exploitation Detection Hurdles left ROP Shellcode Defeating protections from Stack based exploits is for next meetup probably.

Exploitation In the End Most of browser based vulnerabilities can be used to cover ASLR by leaking memory to form a valid ROP Chain. Nearly all exploits come down to 1. Spray 2. ROP 3. Shellcode So we will focus on bypassing these only.

Protections StackPivot Check (ROP)

Protections CallerCheck & SimExecFlow Check (ROP)

Protections Payload Check (Shellcode)

Protections EAF Check (EMET)

Differentiate EMET MBAE HITMAN Alert Rop StackPivot Yes Rop CallerCheck Yes (Full) Yes (Dummed) Rop SimExecFlow No Payload (Shellcode) ControlFlow Integrity (Rop) EAF Image Highjack

Bypassing StackPivot CallerCheck SimExecFlow EAF/Payload Check CFI

Bypassing Stackpivot

Bypassing Stackpivot

Bypassing CallerCheck & SimExecFlow

Bypassing CFI Null out LBR before ApiCall Borrow functions (hard, unless automated) Be Creative (what we did) Note: We bypassed a public implementation of CFI, doesn’t mean if its implemented another way it can still be bypassed the same way.

Bypassing CFI

Bypassing Payload Check

Bypassing All protections In All public exploit mitigation toolkits (Generic) DEMO time

Bypassing All protections StackPivot

Targeted Bypassing EMET 0x779fe695 + poi(0x779fe695 + 1) => 0x37df11d0

Targeted Bypassing EMET 0x37df11d0+0x26 => Preserved Function Prologue Jumping into Preserved Function Prologue bypasses Hook and forms a valid api call chain

Targeted Bypassing “Other Tools” Just like EMET we can bypass other public and free toolkits as well. However, That is not the scope of this presentation. =)

Conclusion An attacker who has studied the system can break anything & everything. Best method of protecting yourself is using a custom protection, and never letting the adversary know what you use.

Queries?