@@ -17,13 +17,40 @@ def initialize
17
17
super (
18
18
'Name' => 'ColdFusion Version Scanner' ,
19
19
'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 such as version 9
21
+ and 10, as well as the underlying OS.
21
22
} ,
22
- 'Author' => [ 'nebulus' ] ,
23
+ 'Author' =>
24
+ [
25
+ 'nebulus' , # Original
26
+ 'sinn3r' # Fingerprint() patch for Cold Fusion 10
27
+ ] ,
23
28
'License' => MSF_LICENSE
24
29
)
25
30
end
26
31
32
+
33
+ #
34
+ # Checks loginbackground.jpg for Cold Fusion 10. This is a patch to be able to detect
35
+ # Cold Fusion 10 correctly. We haven't been able to replace fingerprint(), because we
36
+ # don't have all the MD5s for loginbackground.jpg, not to mention some versions don't
37
+ # actually have it.
38
+ #
39
+ def cf10?
40
+ res = send_request_cgi ( {
41
+ 'uri' => '/CFIDE/administrator/images/loginbackground.jpg' ,
42
+ 'method' => 'GET'
43
+ } )
44
+
45
+ # Not the response we want at all, then let's assume it's not cf10
46
+ return false if not res or res . code . to_i != 200
47
+
48
+ jpg_md5 = Rex ::Text . md5 ( res . body )
49
+ return true if jpg_md5 == 'a4c81b7a6289b2fc9b36848fa0cae83c'
50
+
51
+ false
52
+ end
53
+
27
54
def fingerprint ( response )
28
55
29
56
if ( response . headers . has_key? ( 'Server' ) )
@@ -47,13 +74,18 @@ def fingerprint(response)
47
74
48
75
out = nil
49
76
77
+
78
+
50
79
if ( response . body =~ />\s *Version:\s *(.*)<\/ strong\> <br\s \/ / )
51
80
v = $1
52
81
out = ( v =~ /^6/ ) ? "Adobe ColdFusion MX6 #{ v } " : "Adobe ColdFusion MX7 #{ v } "
53
82
elsif ( response . body =~ /<meta name=\" Author\" content=\" Copyright 1995\- 2012 Adobe/ and response . body =~ /Administrator requires a browser that supports frames/ )
54
83
out = "Adobe ColdFusion MX7"
55
84
elsif ( response . body =~ /<meta name=\" Author\" content=\" Copyright \( c\) 1995\- 2006 Adobe/ )
56
85
out = "Adobe ColdFusion 8"
86
+ elsif cf10?
87
+ # Must check for Cold Fusion 10 before 9 to avoid FP
88
+ out = "Adobe ColdFusion 10"
57
89
elsif ( response . body =~ /<meta name=\" Author\" content=\" Copyright \( c\) 1995\- 2010 Adobe/ or
58
90
response . body =~ /<meta name=\" Author\" content=\" Copyright \( c\) 1995\- 2009 Adobe Systems\, Inc\. All rights reserved/ )
59
91
out = "Adobe ColdFusion 9"
0 commit comments