diff --git a/modules/auxiliary/scanner/http/cold_fusion_version.rb b/modules/auxiliary/scanner/http/cold_fusion_version.rb new file mode 100644 index 0000000000..3494aa2300 --- /dev/null +++ b/modules/auxiliary/scanner/http/cold_fusion_version.rb @@ -0,0 +1,123 @@ +## +# $Id$ +## + +## +# 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. +# http://metasploit.com/framework/ +## + +require 'msf/core' + +class Metasploit3 < Msf::Auxiliary + + include Msf::Exploit::Remote::HttpClient + include Msf::Auxiliary::Scanner + include Msf::Auxiliary::Report + + def initialize + super( + 'Name' => 'ColdFusion Version Scanner', + 'Version' => '$Revision$', + 'Description' => %q{ + This module attempts identify various flavors of ColdFusion as well as the underlying OS + }, + 'Author' => [ 'nebulus' ], + 'License' => MSF_LICENSE, + ) + end + + def fingerprint(response) + + if(response.headers.has_key?('Server') ) + if(response.headers['Server'] =~ /IIS/ or response.headers['Server'] =~ /\(Windows/) + os = "Windows (#{response.headers['Server']})" + elsif(response.headers['Server'] =~ /Apache\//) + os = "Unix (#{response.headers['Server']})" + else + os = response.headers['Server'] + end + end + + len = (response.body.length > 2500) ? 2500 : response.body.length + return nil if response.body.length < 100 + + title = "Not Found" + if(response.body =~ /