metasploit-framework/modules/auxiliary/scanner/emc/alphastor_librarymanager.rb

46 lines
1.1 KiB
Ruby
Raw Normal View History

##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
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
include Msf::Auxiliary::Scanner
include Msf::Auxiliary::Report
2013-08-30 21:28:54 +00:00
def initialize
super(
'Name' => 'EMC AlphaStor Library Manager Service',
'Description' => 'This module queries the remote host for the EMC Alphastor Library Management Service.',
'Author' => 'MC',
'License' => MSF_LICENSE
)
register_options([Opt::RPORT(3500),])
2013-08-30 21:28:54 +00:00
end
2013-08-30 21:28:54 +00:00
def run_host(ip)
2013-08-30 21:28:54 +00:00
connect
2013-08-30 21:28:54 +00:00
pkt = "\x51" + "\x00" * 529
2013-08-30 21:28:54 +00:00
sock.put(pkt)
2013-08-30 21:28:54 +00:00
select(nil,nil,nil,1)
2013-08-30 21:28:54 +00:00
data = sock.get_once
2013-08-30 21:28:54 +00:00
if ( data and data =~ /robotd~robotd~CLIENT/ )
print_good("Host #{ip} is running the EMC AlphaStor Library Manager.")
2013-08-30 21:28:54 +00:00
report_service(:host => rhost, :port => rport, :name => "emc-library", :info => data)
else
print_error("Host #{ip} is not running the service...")
end
2013-08-30 21:28:54 +00:00
disconnect
2013-08-30 21:28:54 +00:00
end
end