Successfully exploiting this issue allows remote attackers to execute arbitrary code or cause denial-of-service conditions on vulnerable version.

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

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

Software Fingerprinting for Automated Malicious Code Analysis

March 2012 White Paper: Police trojan study. Marcin Icewall Noga Sergio de los Santos

Off-by-One exploitation tutorial

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08

Return-oriented programming without returns

Reversing C++ Paul Vincent Sabanal. Mark Vincent Yason

Heap-based Buffer Overflow Vulnerability in Adobe Flash Player

Assembly Language: Function Calls" Jennifer Rexford!

Windows XP SP3 Registry Handling Buffer Overflow

CVE Adobe Flash Player Integer Overflow Vulnerability Analysis

How To Hack The Steam Voip On Pc Orchesterian Moonstone 2.5 (Windows) On Pc/Robert Kruber (Windows 2) On Linux (Windows 3.5) On A Pc

Application-Specific Attacks: Leveraging the ActionScript Virtual Machine

Static detection of C++ vtable escape vulnerabilities in binary code

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

White paper: August Marcin Icewall Noga

esrever gnireenigne tfosorcim seiranib

Computer Organization and Assembly Language

Buffer Overflows. Security 2011

Fighting malware on your own

Hotpatching and the Rise of Third-Party Patches

Stack Overflows. Mitchell Adair

64-Bit NASM Notes. Invoking 64-Bit NASM

Systems Design & Programming Data Movement Instructions. Intel Assembly

INTRODUCTION TO MALWARE & MALWARE ANALYSIS

Reverse Engineering and Computer Security

風 水. Heap Feng Shui in JavaScript. Alexander Sotirov.

Bypassing Windows Hardware-enforced Data Execution Prevention

The Beast is Resting in Your Memory On Return-Oriented Programming Attacks and Mitigation Techniques To appear at USENIX Security & BlackHat USA, 2014

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

Software Vulnerabilities

Syscall Proxying - Simulating remote execution Maximiliano Caceres <maximiliano.caceres@corest.com> Copyright 2002 CORE SECURITY TECHNOLOGIES

1. General function and functionality of the malware

TitanMist: Your First Step to Reversing Nirvana TitanMist. mist.reversinglabs.com

Linux exploit development part 2 (rev 2) - Real app demo (part 2)

Attacking Host Intrusion Prevention Systems. Eugene Tsyrklevich

Introduction. Figure 1 Schema of DarunGrim2

Stitching the Gadgets On the Ineffectiveness of Coarse-Grained Control-Flow Integrity Protection

Using fuzzing to detect security vulnerabilities

Defense in Depth: Protecting Against Zero-Day Attacks

For a 64-bit system. I - Presentation Of The Shellcode

WLSI Windows Local Shellcode Injection. Cesar Cerrudo Argeniss (

Analysis of Win32.Scream

Hacking Techniques & Intrusion Detection. Ali Al-Shemery arabnix [at] gmail

Attacking x86 Windows Binaries by Jump Oriented Programming

Violating Database - Enforced Security Mechanisms

Bypassing Browser Memory Protections in Windows Vista

Bypassing Memory Protections: The Future of Exploitation

CS61: Systems Programing and Machine Organization

Inside a killer IMBot. Wei Ming Khoo University of Cambridge 19 Nov 2010

Practical taint analysis for protecting buggy binaries

A Tiny Guide to Programming in 32-bit x86 Assembly Language

Diving into a Silverlight Exploit and Shellcode - Analysis and Techniques

What Happens In Windows 7 Stays In Windows 7

Removing Sentinel SuperPro dongle from Applications and details on dongle way of cracking Shub-Nigurrath of ARTeam Version 1.

Where s the FEEB? The Effectiveness of Instruction Set Randomization

Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011

Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com

Complete 8086 instruction set

Introduction to Reverse Engineering

Unix Security Technologies. Pete Markowsky <peterm[at] ccs.neu.edu>

The Leader in Cloud Security SECURITY ADVISORY

Security Research Advisory IBM inotes 9 Active Content Filtering Bypass

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Bypassing Anti- Virus Scanners

(General purpose) Program security. What does it mean for a pgm to be secure? Depends whom you ask. Takes a long time to break its security controls.

Structural Comparison of Executable Objects

Introduction to Intel x86 Assembly, Architecture, Applications, & Alliteration

Jordan University of Science and Technology

Custom Penetration Testing

Test Driven Development in Assembler a little story about growing software from nothing

Introduction. Application Security. Reasons For Reverse Engineering. This lecture. Java Byte Code

x64 Cheat Sheet Fall 2015

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Exploits: XSS, SQLI, Buffer Overflow

Hacking. The Edge Pieces. Ken Gottry May Ken Gottry

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

Computer Organization and Architecture

Nessus scanning on Windows Domain

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z)

Writing Exploits III

Web Application Threats and Vulnerabilities Web Server Hacking and Web Application Vulnerability

CS 161 Computer Security

Windows Assembly Programming Tutorial

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

There s a kernel security researcher named Dan Rosenberg whose done a lot of linux kernel vulnerability research

Classification of Security Issues

Firefox, Opera, Safari for Windows BMP file handling information leak. September Discovered by: Mateusz j00ru Jurczyk, Hispasec Labs

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering

A Museum of API Obfuscation on Win32

- Table of Contents -

Vigilante: End-to-End Containment of Internet Worms

MWR InfoSecurity Security Advisory. BT Home Hub SSID Script Injection Vulnerability. 10 th May Contents

Overview of IA-32 assembly programming. Lars Ailo Bongo University of Tromsø

Intel 8086 architecture

An introduction to the Return Oriented Programming. Why and How

Security Research Advisory SugarCRM Cross-Site Scripting Vulnerability

Securing software by enforcing data-flow integrity

Transcription:

Abysssec Research 1) Advisory information Title Version Analysis Vendor Impact Contact Twitter CVE : Novell iprint Client Browser Plugin call-back-url stack overflow : iprint Client plugin v5.42 (XP SP3) : http://www.abysssec.com : http://www.novell.com : Critical : shahin [at] abysssec.com, info [at] abysssec.com : @abysssec : CVE-2010-1527 2) Vulnerable version Novell iprint Client 5.42 Novell iprint Client 5.32 Novell iprint Client 5.30 Novell iprint Client 5.08 Novell iprint Client 5.06 Novell iprint Client 5.04 3) Vulnerability information Class 1- Stack overflow Impact Successfully exploiting this issue allows remote attackers to execute arbitrary code or cause denial-of-service conditions on vulnerable version. User interaction is required in order to open a malformed page.

Remotely Exploitable Yes Locally Exploitable Yes 4) Vulnerabilities detail By sending varius parameters to the active control by using <param> tags we can instruct the plugin client for varius tasks. The vulnerability occurs when using 'op-client-interface-version' as operation and 'url' as result-type parameters. Because result-type is url there is a function that makes a longer string by combining "op-clientinterface-version", the result-type string url and the string indicating version of the client plugin. Here is part of the sub_01110001 function which is responsible for generating the result string..text:100017da.text:100017da loc_100017da: ; CODE XREF: sub_10001710+97j.text:100017da cmp eax, 5.text:100017DD jnz short loc_10001819.text:100017df push 0.text:100017E1 lea ecx, [esp+218h+var_210].text:100017e5 call sub_1003eec2.text:100017ea mov edx, [esi+10ch].text:100017f0 push eax.text:100017f1 lea ecx, [esp+218h+var_20c].text:100017f5 mov eax, off_100620f8[edx*4].text:100017fc push eax.text:100017fd push offset asuccesssinterf ; "Success{%s}interfaceVersion:%s".text:10001802 push ecx ; LPSTR.text:10001803 call ds:wsprintfa.text:10001809 push offset aippclientpingr ; "ippclientping=reply".text:1000180e push esi.text:1000180f call sub_100076d0.text:10001814 add esp, 18h.text:10001817 jmp short loc_1000186d.text:10001819 ; ---------------------------------------------------------------------------.text:10001819.text:10001819 loc_10001819: ; CODE XREF: sub_10001710+cdj

.text:10001819 cmp eax, 6.text:1000181C jnz short loc_1000186d.text:1000181e push 0.text:10001820 lea ecx, [esp+218h+var_210].text:10001824 call sub_1003eec2.text:10001829 mov edx, [esi+10ch].text:1000182f mov ecx, [esi+1ach].text:10001835 push eax.text:10001836 mov eax, off_100620f8[edx*4].text:1000183d lea edx, [esp+218h+var_20c].text:10001841 push eax.text:10001842 push ecx.text:10001843 push offset as?successsinte ; "%s?success{%s}interfaceversion:%s".text:10001848 push edx ; LPSTR.text:10001849 call ds:wsprintfa As demonstrated in the above code in address loc_10001819, the function checks value of eax register against 6. There are also other part of the functions that this register is checked against 7,5,2 which in the moment this value represent the result-type. This code is set earlier in function sub_100020ba and, 6 is for result-type of url. So after checking this value the program transfer to our vulnerable part of the program. The flaw here is wsprintfa copies 3 string with the format string "%s?success{%s}interfaceversion:%s" to a fixed length buffer and there is no bound checking on the final string copied to the buffer and of course the first parameter of format string is our url which indicated by call-back-url parameter. In case of long url it can cause a buffer overflow and simply overwrite EIP regisrer. Here is a simple html example that can trigger this vulnerability: <object ID='target' classid='clsid:36723f97-7aa0-11d4-8919-ff2d71d0d32c'> <param name='operation' value='op-client-interface-version' /> <param name='result-type' value='url' /> <param name='call-back-url' value='aaaaaaaaaaaaaa ' /> <! 1000*A long buffer --> </object> Patch analysis: In the patched version before using vulnerable wsprintfa a new block is added which by using repne scasb instructions checks length of the strings. Here is a simple implementation of repne scasb instruction for calculating length of a string:

xor xor not repne scasb not dec ecx, ecx eax,eax ecx ecx ecx The above code return length of a string represented by edi register in ecx register. The following code is the block added to the patched version, which calculate length of the strings and after addition of these lengths in case of greater than 511 the function will be returned and wsprintfa would not be executed..text:1000181d loc_1000181d: ; CODE XREF: sub_10001710+cej.text:1000181d cmp eax, 6.text:10001820 jnz loc_10001915.text:10001826 push esi.text:10001827 push edi.text:10001828 mov ecx, 8.text:1000182D mov esi, offset as?successsinte ; "%s?success{%s}interfaceversion:%s".text:10001832 lea edi, [esp+24ch+var_230].text:10001836 xor eax, eax.text:10001838 rep movsd.text:1000183a movsw.text:1000183c lea edi, [esp+24ch+var_230].text:10001840 or ecx, 0FFFFFFFFh.text:10001843 repne scasb.text:10001845 mov edx, [ebx+10ch].text:1000184b push eax.text:1000184c not ecx.text:1000184e mov ebp, off_100630f8[edx*4].text:10001855 dec ecx.text:10001856 mov esi, ecx.text:10001858 lea ecx, [esp+250h+var_23c].text:1000185c sub esi, 6.text:1000185F call sub_1003f392.text:10001864 mov edi, [ebx+1ach].text:1000186a mov edx, eax.text:1000186c or ecx, 0FFFFFFFFh.text:1000186F xor eax, eax.text:10001871 repne scasb.text:10001873 not ecx.text:10001875 dec ecx.text:10001876 mov edi, edx.text:10001878 mov eax, ecx

.text:1000187a or ecx, 0FFFFFFFFh.text:1000187D mov [esp+24ch+var_234], eax.text:10001881 xor eax, eax.text:10001883 repne scasb.text:10001885 not ecx.text:10001887 dec ecx.text:10001888 mov [esp+24ch+var_238], edx.text:1000188c mov edx, ecx.text:1000188e mov edi, ebp.text:10001890 or ecx, 0FFFFFFFFh.text:10001893 add edx, esi.text:10001895 repne scasb.text:10001897 mov eax, [esp+24ch+var_234].text:1000189b pop edi.text:1000189c not ecx.text:1000189e dec ecx.text:1000189f add edx, eax.text:100018a1 add ecx, edx.text:100018a3 pop esi.text:100018a4 cmp ecx, 1FFh.text:100018AA jbe short loc_100018da.text:100018ac lea ecx, [esp+244h+var_23c].text:100018b0 mov [esp+244h+var_4], 0FFFFFFFFh.text:100018BB call sub_1003f03c.text:100018c0 pop ebp.text:100018c1 or eax, 0FFFFFFFFh.text:100018C4 pop ebx.text:100018c5 mov ecx, [esp+23ch+var_c].text:100018cc mov large fs:0, ecx.text:100018d3 add esp, 23Ch.text:100018D9 retn.text:100018da ; ---------------------------------------------------------------------------.text:100018da.text:100018da loc_100018da: ; CODE XREF: sub_10001710+19aj.text:100018da mov ecx, [esp+244h+var_238].text:100018de mov eax, [ebx+1ach].text:100018e4 push ecx.text:100018e5 push ebp.text:100018e6 push eax.text:100018e7 lea edx, [esp+250h+var_230].text:100018eb lea eax, [esp+250h+var_20c].text:100018ef push edx ; LPCSTR.text:100018F0 push eax ; LPSTR.text:100018F1 call ds:wsprintfa.text:100018f7 lea ecx, [esp+258h+var_20c].text:100018fb push 200h

The patch calculate length of url, length of version of activex string, length of operation and length of the format string 6 by using repne scasb 4 times. The reason in the last one there is a -6 because the format string characters will be replaced. After that it sum all of these lengths in address 1000189F by using add instruction and store the final length in ecx register. A little later this value is checked against 1FFh(511). Exploit: For the purpose of exploitation it is simple to fine the exact location of overwritten EIP and take control of the program but because of possibility of using javascript and allocating dynamic memory it is better to use the more general heap spray method that is more relible. The point here is using <script> tag before loading the activex object.