Skip to content

Commit a486fff

Browse files
author
jvazquez-r7
committed
Land rapid7#1872, @wchen-r7's improvement of cold_fusion_version
2 parents 8cb1bde + 9688845 commit a486fff

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

modules/auxiliary/scanner/http/cold_fusion_version.rb

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ def initialize
1717
super(
1818
'Name' => 'ColdFusion Version Scanner',
1919
'Description' => %q{
20-
This module attempts identify various flavors of ColdFusion as well as the underlying OS
20+
This module attempts identify various flavors of ColdFusion up to version 10
21+
as well as the underlying OS.
2122
},
22-
'Author' => [ 'nebulus' ],
23+
'Author' =>
24+
[
25+
'nebulus', # Original
26+
'sinn3r' # Fingerprint() patch for Cold Fusion 10
27+
],
2328
'License' => MSF_LICENSE
2429
)
2530
end
@@ -30,7 +35,7 @@ def fingerprint(response)
3035
if(response.headers['Server'] =~ /IIS/ or response.headers['Server'] =~ /\(Windows/)
3136
os = "Windows (#{response.headers['Server']})"
3237
elsif(response.headers['Server'] =~ /Apache\//)
33-
os = "Unix (#{response.headers['Server']})"
38+
os = "Unix (#{response.headers['Server']})"
3439
else
3540
os = response.headers['Server']
3641
end
@@ -43,7 +48,8 @@ def fingerprint(response)
4348
title = $1
4449
title.gsub!(/\s/, '')
4550
end
46-
return nil if( title == 'Not Found' or not title =~ /ColdFusionAdministrator/)
51+
52+
return nil if( title == 'Not Found' or not title =~ /ColdFusionAdministrator/)
4753

4854
out = nil
4955

@@ -54,8 +60,12 @@ def fingerprint(response)
5460
out = "Adobe ColdFusion MX7"
5561
elsif(response.body =~ /<meta name=\"Author\" content=\"Copyright \(c\) 1995\-2006 Adobe/)
5662
out = "Adobe ColdFusion 8"
63+
elsif(response.body =~ /<meta name=\"Author\" content=\"Copyright \(c\) 1995\-2010 Adobe/ and
64+
response.body =~ /1997\-2012 Adobe Systems Incorporated and its licensors/)
65+
out = "Adobe ColdFusion 10"
5766
elsif(response.body =~ /<meta name=\"Author\" content=\"Copyright \(c\) 1995\-2010 Adobe/ or
58-
response.body =~ /<meta name=\"Author\" content=\"Copyright \(c\) 1995\-2009 Adobe Systems\, Inc\. All rights reserved/)
67+
response.body =~ /<meta name=\"Author\" content=\"Copyright \(c\) 1995\-2009 Adobe Systems\, Inc\. All rights reserved/ or
68+
response.body =~ /<meta name=\"Author\" content=\"Copyright \(c\) 1997\-2012 Adobe Systems\, Inc\. All rights reserved/)
5969
out = "Adobe ColdFusion 9"
6070
elsif(response.body =~ /<meta name=\"Keywords\" content=\"(.*)\">\s+<meta name/)
6171
out = $1.split(/,/)[0]
@@ -76,8 +86,8 @@ def run_host(ip)
7686
url = '/CFIDE/administrator/index.cfm'
7787

7888
res = send_request_cgi({
79-
'uri' => url,
80-
'method' => 'GET',
89+
'uri' => url,
90+
'method' => 'GET',
8191
})
8292

8393
return if not res or not res.body or not res.code

0 commit comments

Comments
 (0)