2007-04-24 06:27:39 +00:00
|
|
|
##
|
2012-03-01 22:54:04 +00:00
|
|
|
# $Id$
|
2007-04-24 06:27:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2009-12-27 07:30:50 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-04-24 06:27:39 +00:00
|
|
|
# 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/
|
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
|
|
|
|
2007-04-24 06:27:39 +00:00
|
|
|
# Exploit mixins should be called first
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2012-02-03 21:43:21 +00:00
|
|
|
include Msf::Auxiliary::WmapScanServer
|
2007-04-24 06:27:39 +00:00
|
|
|
# Scanner mixin should be near last
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Auxiliary::Scanner
|
2007-04-24 06:27:39 +00:00
|
|
|
|
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'HTTP Version Detection',
|
2012-03-01 22:59:54 +00:00
|
|
|
'Version' => '$Revision$',
|
2007-04-24 06:27:39 +00:00
|
|
|
'Description' => 'Display version information about each system',
|
|
|
|
'Author' => 'hdm',
|
|
|
|
'License' => MSF_LICENSE
|
|
|
|
)
|
2012-03-18 05:07:27 +00:00
|
|
|
|
2012-02-03 21:43:21 +00:00
|
|
|
register_wmap_options({
|
|
|
|
'OrderID' => 0,
|
|
|
|
'Require' => {},
|
|
|
|
})
|
2007-04-24 06:27:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Fingerprint a single host
|
|
|
|
def run_host(ip)
|
|
|
|
begin
|
2012-04-23 07:44:56 +00:00
|
|
|
connect
|
2012-06-06 05:22:36 +00:00
|
|
|
|
2012-04-23 07:44:56 +00:00
|
|
|
res = send_request_raw({'uri' => '/', 'method' => 'GET' })
|
2012-04-23 07:39:02 +00:00
|
|
|
return if not res
|
2012-06-06 05:22:36 +00:00
|
|
|
|
2012-06-06 05:36:17 +00:00
|
|
|
fp = http_fingerprint(:response => res)
|
2012-01-12 00:11:30 +00:00
|
|
|
print_status("#{ip}:#{rport} #{fp}") if fp
|
2007-04-24 06:27:39 +00:00
|
|
|
rescue ::Timeout::Error, ::Errno::EPIPE
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2008-11-10 04:38:05 +00:00
|
|
|
end
|