2007-04-24 06:27:39 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2007-04-24 06:27:39 +00:00
|
|
|
##
|
|
|
|
|
2009-11-26 20:39:15 +00:00
|
|
|
require 'rex/proto/http'
|
2007-04-24 06:27:39 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Auxiliary
|
2009-12-27 07:30:50 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
# Exploit mixins should be called first
|
|
|
|
include Msf::Exploit::Remote::HttpClient
|
|
|
|
include Msf::Auxiliary::WmapScanServer
|
|
|
|
# Scanner mixin should be near last
|
|
|
|
include Msf::Auxiliary::Scanner
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'HTTP Version Detection',
|
2013-10-11 19:54:38 +00:00
|
|
|
'Description' => 'Display version information about each system.',
|
2013-08-30 21:28:54 +00:00
|
|
|
'Author' => 'hdm',
|
|
|
|
'License' => MSF_LICENSE
|
|
|
|
)
|
|
|
|
|
|
|
|
register_wmap_options({
|
|
|
|
'OrderID' => 0,
|
|
|
|
'Require' => {},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
# Fingerprint a single host
|
|
|
|
def run_host(ip)
|
|
|
|
begin
|
2014-03-23 17:42:20 +00:00
|
|
|
connect
|
|
|
|
res = send_request_raw({ 'uri' => '/', 'method' => 'GET' })
|
|
|
|
fp = http_fingerprint(:response => res)
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("#{ip}:#{rport} #{fp}") if fp
|
|
|
|
rescue ::Timeout::Error, ::Errno::EPIPE
|
2014-03-23 17:42:20 +00:00
|
|
|
ensure
|
|
|
|
disconnect
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
|
|
|
end
|
2007-04-24 06:27:39 +00:00
|
|
|
|
2008-11-10 04:38:05 +00:00
|
|
|
end
|