2007-04-14 05:22:22 +00:00
|
|
|
##
|
2008-10-02 05:23:59 +00:00
|
|
|
# $Id$
|
2007-04-14 05:22:22 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-04-14 05:22:22 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Auxiliary
|
2007-04-14 05:22:22 +00:00
|
|
|
|
|
|
|
# Exploit mixins should be called first
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::DCERPC
|
2007-04-14 05:22:22 +00:00
|
|
|
|
|
|
|
# Scanner mixin should be near last
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Auxiliary::Scanner
|
2007-04-14 05:22:22 +00:00
|
|
|
|
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'Endpoint Mapper Service Discovery',
|
2007-05-07 04:48:45 +00:00
|
|
|
'Version' => '$Revision$',
|
2007-04-14 05:22:22 +00:00
|
|
|
'Description' => %q{
|
|
|
|
This module can be used to obtain information from the
|
|
|
|
Endpoint Mapper service.
|
|
|
|
},
|
|
|
|
'Author' => 'hdm',
|
|
|
|
'License' => MSF_LICENSE
|
|
|
|
)
|
|
|
|
|
|
|
|
deregister_options('RHOST')
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(135)
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Obtain information about a single host
|
|
|
|
def run_host(ip)
|
|
|
|
begin
|
|
|
|
|
|
|
|
ids = dcerpc_endpoint_list()
|
|
|
|
return if not ids
|
|
|
|
ids.each do |id|
|
|
|
|
next if not id[:prot]
|
|
|
|
line = "#{id[:uuid]} v#{id[:vers]} "
|
|
|
|
line << "#{id[:prot].upcase} "
|
|
|
|
line << "(#{id[:port]}) " if id[:port]
|
|
|
|
line << "(#{id[:pipe]}) " if id[:pipe]
|
|
|
|
line << "#{id[:host]} " if id[:host]
|
|
|
|
line << "[#{id[:note]}]" if id[:note]
|
|
|
|
print_status(line)
|
|
|
|
end
|
|
|
|
|
|
|
|
rescue ::Interrupt
|
|
|
|
raise $!
|
|
|
|
rescue ::Exception => e
|
2008-12-19 07:11:08 +00:00
|
|
|
print_status("Error: #{e}")
|
2007-04-14 05:22:22 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|