Microsoft Patch Analysis



Similar documents
Bruh! Do you even diff? Diffing Microsoft Patches to Find Vulnerabilities

Reverse Engineering and Computer Security

Introduction. Figure 1 Schema of DarunGrim2

Skeletons in Microsoft s Closet - Silently Fixed Vulnerabilities. Andre Protas Steve Manzuik

Abysssec Research. 1) Advisory information. 2) Vulnerable version

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Microsoft Security Bulletin MS Important

esrever gnireenigne tfosorcim seiranib

Kaspersky Endpoint Security 10 for Windows. Deployment guide

The Leader in Cloud Security SECURITY ADVISORY

Microsoft Security Bulletin MS Critical

============================================================= =============================================================

APPLICATION SECURITY RESPONSE: WHEN HACKERS COME A-KNOCKING

What Happens In Windows 7 Stays In Windows 7

Defense in Depth: Protecting Against Zero-Day Attacks

Towards Unifying Vulnerability Information for Attack Graph Construction

Spooks in the Machine

Sandbox Roulette: Are you ready for the gamble?

TECHNICAL NOTE 08/04 IINTRODUCTION TO VULNERABILITY ASSESSMENT TOOLS

Format string exploitation on windows Using Immunity Debugger / Python. By Abysssec Inc

Windows Remote Access

Melde- und Analysestelle Informationssicherung MELANI Torpig/Mebroot Reverse Code Engineering (RCE)

Bug hunting. Vulnerability finding methods in Windows 32 environments compared. FX of Phenoelit

Hardware and Software Requirements for Installing California.pro

Security Vulnerabilities and Patches Explained IT Security Bulletin for the Government of Canada

Persist It Using and Abusing Microsoft s Fix It Patches

Intro to Patching. Thomas Cameron, Chief Architect, Western US, Red Hat twitter: thomasdcameron IRC: choirboy on Freenode

MWR InfoSecurity Security Advisory. Symantec s Altiris Deployment Solution File Transfer Race Condition. 7 th January 2010

Supported Platforms and Software Requirements Effective on 7 May HULFT-DataMagic for Windows Ver.2.2.0

Cesar Cerrudo Argeniss

Medical Device Security: The Transition From Patient Privacy To Patient Safety. Scott Erven

The operating system requirements listed in this document include the most current patches and service packs.

CPNI TECHNICAL NOTE 04/2008 VULNERABILITY ASSESSMENT TOOLS

MWR InfoSecurity Advisory. Interwoven Worksite ActiveX Control Remote Code Execution. 10 th March Contents

How To Use A Policy Auditor (Macafee) To Check For Security Issues

OSMOSIS. Open Source Monitoring Security Issues HACKITO ERGO SUM 2014 / April 2014 / Paris

Unified Windows Device Management in the Enterprise

Windows XP Pro Service Pack 3 Approved Window Update Description Update. XP Service Pack 3 (KB936929) Windows Internet Explorer 7 for Windows XP

CERTIFIGATE. Front Door Access to Pwning hundreds of Millions of Androids. Avi Bashan. Ohad Bobrov

ivos Technical Requirements V For Current Clients as of June 2014

BMC Client Management - SCAP Implementation Statement. Version 12.0

More Than A Microsoft World. Marc Maiffret Co-Founder Chief Hacking Officer

inforouter V8.0 Server & Client Requirements

Feedback-Driven Binary Code Diversification

Mobile Application Hacking for Android and iphone. 4-Day Hands-On Course. Syllabus

CSIS Security Research and Intelligence Advisory Microsoft GDI+ Integer division by zero flaw handling.ico files VU# CVE

Database's Security Paradise. Joxean Koret

76% Secunia Vulnerability Review. Key figures and facts from a global IT-Security perspective. Published February 26, secunia.

HP OpenView Patch Manager using Radia Version 3.0

Webapps Vulnerability Report

NCS 430 Penetration Testing Lab #2 Tuesday, February 10, 2015 John Salamy

Secunia Vulnerability Review

INNOV-04 The SANS Top 20 Internet Security Vulnerabilities

2013 Ruby on Rails Exploits. CS 558 Allan Wirth

Understanding the Windows SMB NTLM Authentication Weak Nonce Vulnerability

Hotpatching and the Rise of Third-Party Patches

Patch Assessment Content Update Release Notes for CCS Version: Update

Host Hardening. Presented by. Douglas Couch & Nathan Heck Security Analysts for ITaP 1

All your private keys are belong to us

ASL IT SECURITY XTREME XPLOIT DEVELOPMENT

The Hacker Strategy. Dave Aitel Security Research

Year end Report for 2006 *

Software Vulnerability Assessment

Deep Security Vulnerability Protection Summary

Applications Life-cycle Management

Payment Card Industry (PCI) Data Security Standard

How to scan/exploit a ssl based webserver. by xxradar. mailto:xxradar@radarhack.com. Version 1.

Oracle Business Intelligence Publisher. 1 Oracle Business Intelligence Publisher Certification. Certification Information 10g Release 3 (

System requirements. Java SE Runtime Environment(JRE) 7 (32bit) Java SE Runtime Environment(JRE) 6 (64bit) Java SE Runtime Environment(JRE) 7 (64bit)

Product Documentation. Preliminary Evaluation of the OpenSSL Security Advisory (0.9.8 and 1.0.1)

If you know the enemy and know yourself, you need not fear the result of a hundred battles.

Unicenter Patch Management

FREQUENTLY ASKED QUESTIONS

Managed Backup Service Supported Platforms

Assuria Auditor The Configuration Assurance, Vulnerability Assessment, Change Detection and Policy Compliance Reporting Solution for Enterprise

Database Auditing: Best Practices. Rob Barnes, CISA Director of Security, Risk and Compliance Operations

Penetration Testing Report Client: Business Solutions June 15 th 2015

Security Patch Management

6. Exercise: Writing Security Advisories

noway.toonux.com 09 January 2014

Faking Extended Validation SSL Certificates in Internet Explorer 7

Penetration Testing. NTS330 Unit 1 Penetration V1.0. February 20, Juan Ortega. Juan Ortega, juaorteg@uat.edu. 1 Juan Ortega, juaorteg@uat.

Virtualization System Security

Automated Patching. Paul Asadoorian IT Security Specialist Brown University

Detecting the Presence of Virtual Machines Using the Local Data Table

Actuality of SMBRelay in Modern Windows Networks

Appendix F: Instructions for Downloading Microsoft Access Runtime

Sandy. The Malicious Exploit Analysis. Static Analysis and Dynamic exploit analysis. Garage4Hackers

Web Application Security Payloads. Andrés Riancho Director of Web Security OWASP AppSec USA Minneapolis

Custom Penetration Testing

DATA BREACH RISK INTELLIGENCE FOR HIGHER ED. Financial prioritization of data breach risk in the language of the C-suite

Nessus scanning on Windows Domain

Medical Device Security Health Group Digital Output

Microsoft Update Management. Sam Youness Microsoft

Leveraging SANS and NIST to Evaluate New Security Tools

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

ModSecurity as Universal Cross-platform Web Protection Tool

Compromise-as-a-Service

Orientation Course - Lab Manual

Release Notes. Platform Compatibility. Supported Operating Systems and Browsers: AMC. WorkPlace

Transcription:

Microsoft Patch Analysis Patch Tuesday - Exploit Wednesday Yaniv Miron aka Lament 1

/ About Me Yaniv Miron aka Lament Security Researcher and Consultant Found security vulnerabilities in IBM, Oracle, Microsoft and Apache products as in other products. CISO Certified from the Technion (Israel Institute of Technology) Certified Locksmith 2

Agenda (1/2) Microsoft Patches What is Patch Tuesday What is Exploit Wednesday Microsoft Advisories What is binary and file diffing Patch Analysis in general Microsoft Patch Analysis 3

Agenda (2/2) Tools of the trade Diffing tools Explanation about the next step after Microsoft Patch Analysis: Exploit Wednesday DEMO-The actual process of Microsoft Patch Analysis diffing Q&A 4

Exclude! What is Reversing, Reverse Engineering, RE? What are Exploits? What are Patches? What are [Fill here a basic thing]? 5

Microsoft Patches As part of the monthly security bulletin release cycle, Microsoft provides the Microsoft Security Bulletin Advance Notification Service. This advance notification includes information about the number of new security updates being released, the software affected and severity levels. 6

Microsoft Patches Names There is a constant concept in the Microsoft Security Bulletins names. For example: MS10-005 MS -Microsoft 10 - The year the bulletin published (2010). 005 -The bulletin number in this year (5th bulletin of the 2010 year). 7

Patch Tuesday Microsoft Patches usually released on the second Tuesday of the month Hence: Patch Tuesday 8

Exploit Wednesday Microsoft Exploits usually released on the second Wednesday of the month (Dayafter the Patch Tuesday) Hence: Exploit Wednesday 9

Microsoft Advisories Microsoft Security Bulletin: http://www.microsoft.com/technet/security/curr ent.aspx 10

Microsoft Advisories [2] [1] Read the *ENTIRE* information page [2] Fuck that -I m a 31337 Might work sometimes http://www.microsoft.com/technet/security/bulletin/ ms10-feb.mspx 11

Microsoft Advisories [3] *And* read between the lines 12

CVE Common Vulnerabilities and Exposures CVE is a dictionary of publicly known information security vulnerabilities and exposures. http://cve.mitre.org 13

Security Focus The SecurityFocus Vulnerability Database provides security professionals information on vulnerabilities for all platforms and services. BugTraq is a high volume, full disclosure mailing list for the detailed discussion and announcement of computer security vulnerabilities. http://www.securityfocus.com 14

Diffing Diffing is typically used to show the changes between one version of a file and a former version of the same file. 15

Why Diffing? Do you install patches?! We have a patch, why do we need to waste time with diffing? Not installing patches Signing vulnerabilities Finding similar vulnerabilities 16

Patch Analysis Three main ways: Installing the patch, checking the system before and after. Diffing the patch/files with a patch/files from a new OS. i.e. XP vs. Vista Diffing the patch files vs. the old files. 17

Microsoft Patch Analysis [1] Diffing the patch files vs. the old files. (QFE vs. GDR diagram from http://blogs.technet.com/instan/archive/2009/03/04/qfe-vs-gdr-ldr-hotfixes.aspx) 18

Microsoft Patch Analysis [2] GDR - General Distribution Releases Contains only security related changes that have been made to the binary. QFE -Quick Fix Engineering Contains both security related changes that have been made to the binary as well as any functionality changes that have been made to it. 19

Tools of the Trade IDA Pro 5.5 TurboDiff Hex-Rays UltraCompare Windows XP Pro SP3 20

IDA Pro IDA Pro 5.5 IDA Pro is a Windows or Linux hosted multiprocessor disassembler and debugger. http://www.hex-rays.com/idapro/ 21

TurboDiff TurboDiff version turbodiff_v1.0.1 Turbodiff is a binary diffing tool developed as an IDA plugin. It discovers and analyzes differences between the functions of two binaries. http://corelabs.coresecurity.com/index.php? module=wiki&action=view&type=tool&name =turbodiff 22

Hex-Rays Hex-Rays Decompiler - converts executable programs into a human readable C-like pseudocode text. http://www.hex-rays.com/decompiler.shtml 23

Ultra Compare UltraCompare Professional is folder/file compare utility loaded with features to enable you to compare text files and folders. http://www.ultraedit.com/products/ultracom pare.html 24

Windows XP Pro SP3 Windows XP Pro SP3 fully patched until February 8th 2010 and the MS10-002 patch, including it installed. http://www.microsoft.com/windows/window s-xp/ 25

Diffing Tools CoreLabs TurboDiff Zynamics BinDiff -$$$ eeye Binary Diffing Suite (EBDS) Many more 26

Zynamics BinDiff [1] Zynamics BinDiff -$$$ Zynamics BinDiff uses a graph-theoretical approach to allow comparison of executables by identifying identical and similar functions. http://www.zynamics.com/bindiff.html 27

Zynamics BinDiff [2] 28

Zynamics BinDiff [3] 29

TEST CASE: MS10-005 TEST CASE: MS10-005 30

TEST CASE: MS10-005 Our test case is Microsoft Patch number MS10-005 that publish in February 9 th 2010. http://www.microsoft.com/technet/security/ bulletin/ms10-feb.mspx 31

What do we know? [1] The vulnerability is in Microsoft Paint. The vulnerability is by using JPG. 32

MS10-005 Patch Info. Vulnerability in Microsoft Paint Could Allow Remote Code Execution (978706) http://www.microsoft.com/technet/security/ bulletin/ms10-005.mspx 33

Affected Software We will focus on Windows XP SP3 34

What do we know? [2] What do we know [1] The vulnerability is in Microsoft Paint. The vulnerability is by using JPG. The vulnerability is under Windows XP SP3. (In our case). What else missing? 35

CVE-2010-0028 CVE-2010-0028 Integer overflow in Microsoft Paint in Windows 2000 SP4, XP SP2 and SP3, and Server 2003 SP2 allows remote attackers to execute arbitrary code via a crafted JPEG (.JPG) file, aka "MS Paint Integer OverflowVulnerability." 36

What do we know? [3] What do we know [1] The vulnerability is in Microsoft Paint. The vulnerability is by using JPG. What do we know [2] The vulnerability is under Windows XP SP3. (In our case). The vulnerability is an Integer Overflow. 37

BID 38042 Security Focus BID #38042 Microsoft Paint JPEG Image Processing Integer Overflow Vulnerability Microsoft Paint is prone to a remote integer-overflow vulnerability. An attacker can exploit this issue to execute arbitrary code with the privileges of the currently logged-in user. Failed exploit attempts will result in a denial-of-service condition. 38

BID 38042 39

Integer Overflow Integer overflow occurs when an arithmetic operation attempts to create a numeric value that is larger than can be represented within the available storage space. For instance, adding 1 to the largest value that can be represented constitutes an integer overflow. 40

Integer Overflow [2] 8 bits: maximum value 2^8 1 = 255 16 bits: maximum value 2^16 1 = 65,535 32 bits: maximum value 2^32 1 = 4,294,967,295 64 bits: maximum value 2^64 1 = 18,446,744,073,709,551,615 41

Common integral data types [1] From http://en.wikipedia.org/wiki/integer_%28computer_science%29 42

Common integral data types [2] From http://en.wikipedia.org/wiki/integer_%28computer_science%29 43

Common integral data types [3] From http://en.wikipedia.org/wiki/integer_%28computer_science%29 44

Integer Overflow [3] The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295 or 2,147,483,648 through 2,147,483,647. Signed / Unsigned 45

Integer Overflow [4] 9 9 9 9 + 1 1 0 0 0 0 46

Fixing Integer Overflows May different ways. SOME ARE BETTER. One of them: (32 bit signed int) a=20 b=3 a+b<a? NO c=2,147,483,640 d=55 c+d<c? YES (Integer Overflow) 47

Extract the Patch Example: KBArticleNumber /X:C:\ExtractedPackage Our line: C:\MS10-005\Download>WindowsXP-KB978706- x86-enu.exe /x:c:\ms10-005\extracted 48

Patch Files The extracted files are: Folders: SP2GDR SP2QFE SP3GDR SP3QFE update Files: spmsg.dll spuninst.exe 49

SP3GDR Files The extracted files are: mspaint.exe Only one file. 50

MS10-005 Paint vs. Before Paint The MS10-005 Patch mspaint.exe version: 5.1.2600.5918 (xpsp_sp3_gdr.091216-2054) The pre-ms10-005 un-patched mspaint.exe version: 5.1.2600.5512 (xpsp.080413-2105) 51

The diffing Take information from the un-patched and patched mspaint.exe. Compare the information taken. 52

Diffing Results 53

Changed Function [1] Un-patched mspaint.exe function 54

Changed Function [2] Patched mspaint.exe function 55

Diffing Graphs [1] Un-patched mspaint.exe 56

Diffing Graphs [2] Patched mspaint.exe 57

Diffing Graphs [3] 58

Diffing Graphs [4] 59

Diffing ASM 60

Diffing Pseudocode 61

The Fix [1] 62

The Fix [2] If Integer Overflow -> Error code 80004005h 63

Exploit Wednesday Using JPG file format Large Pixel Size (Integer Overflow) Exploit in Python DoS PoC 64

JPG File Format [1] From http://en.wikipedia.org/wiki/jpeg 65

JPG File Format [2] From http://en.wikipedia.org/wiki/jpeg 66

Building the PoC Exploit [1] Using a temp JPG file. 67

Building the PoC Exploit [2] Hexdump the JPG file. 68

Building the PoC Exploit [3] Hexdump the JPG file. 69

Building the PoC Exploit [4] 70

Building the PoC Exploit [5] 71

Exploit Uses Phishing via email Creating a JPG with the Open in Paint picture. 72

DEMO! LIVE DEMO! 73

# E [0] F # Thank you! Questions? >> Yaniv Miron aka Lament lament@ilhack.org http://www.ilhack.org/lament In god we trust, all others we monitor. 74