2010-04-30 08:40:19 +00:00
|
|
|
##
|
2013-10-15 18:50:46 +00:00
|
|
|
# This module requires Metasploit: http//metasploit.com/download
|
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2008-10-09 23:53:54 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
include Msf::Auxiliary::Scanner
|
|
|
|
include Msf::Auxiliary::Report
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'EMC AlphaStor Device Manager Service',
|
|
|
|
'Description' => 'This module queries the remote host for the EMC Alphastor Device Management Service.',
|
|
|
|
'Author' => 'MC',
|
|
|
|
'License' => MSF_LICENSE
|
|
|
|
)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
register_options([Opt::RPORT(3000),], self.class)
|
|
|
|
end
|
2008-10-09 23:53:54 +00:00
|
|
|
|
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def run_host(ip)
|
2008-10-09 23:53:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
connect
|
2008-10-09 23:53:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
pkt = "\x68" + Rex::Text.rand_text_alphanumeric(5) + "\x00" * 512
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
sock.put(pkt)
|
2008-10-09 23:53:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
select(nil,nil,nil,0.25)
|
2008-10-09 23:53:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
data = sock.get_once
|
2008-10-09 23:53:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
if ( data and data =~ /rrobotd:rrobotd/ )
|
|
|
|
print_status("Host #{ip} is running the EMC AlphaStor Device Manager.")
|
|
|
|
report_service(:host => rhost, :port => rport, :name => "emc-manager", :info => data)
|
|
|
|
else
|
|
|
|
print_error("Host #{ip} is not running the service...")
|
|
|
|
end
|
2008-10-09 23:53:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
disconnect
|
2008-10-09 23:53:54 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
2010-06-22 18:58:38 +00:00
|
|
|
end
|