@@ -33,8 +33,8 @@ def initialize(info = {})
33
33
34
34
register_options (
35
35
[
36
- OptInt . new ( 'STARTRID ' , [ true , 'RID to start fuzzing at.' , 500 ] ) ,
37
- OptInt . new ( 'ENDRID ' , [ true , 'RID to stop fuzzing at.' , 3000 ] )
36
+ OptInt . new ( 'START_RID ' , [ true , 'RID to start fuzzing at.' , 500 ] ) ,
37
+ OptInt . new ( 'END_RID ' , [ true , 'RID to stop fuzzing at.' , 3000 ] )
38
38
] , self . class )
39
39
end
40
40
@@ -72,7 +72,7 @@ def run
72
72
end
73
73
74
74
# Get a list of windows users, groups, and computer accounts using SUSER_NAME()
75
- total_rids = datastore [ 'ENDRID ' ] - datastore [ 'STARTRID ' ]
75
+ total_rids = datastore [ 'END_RID ' ] - datastore [ 'START_RID ' ]
76
76
print_status ( "#{ peer } - Brute forcing #{ total_rids } RIDs via SQL injection, be patient..." )
77
77
domain_users = get_win_domain_users ( windows_domain_sid )
78
78
if domain_users . nil?
@@ -174,10 +174,10 @@ def get_win_domain_users(domain_sid)
174
174
175
175
windows_logins = [ ]
176
176
177
+ total_rids = datastore [ 'END_RID' ] - datastore [ 'START_RID' ]
177
178
# Fuzz the principal_id parameter (RID in this case) passed to the SUSER_NAME function
178
- ( datastore [ 'STARTRID' ] ..datastore [ 'ENDRID' ] ) . each do |principal_id |
179
- total_rids = datastore [ 'ENDRID' ] - datastore [ 'STARTRID' ]
180
- rid_diff = ( datastore [ 'ENDRID' ] - ( datastore [ 'ENDRID' ] - principal_id ) ) - datastore [ 'STARTRID' ]
179
+ ( datastore [ 'START_RID' ] ..datastore [ 'END_RID' ] ) . each do |principal_id |
180
+ rid_diff = principal_id - datastore [ 'START_RID' ]
181
181
if principal_id % 100 == 0
182
182
print_status ( "#{ peer } - #{ rid_diff } of #{ total_rids } RID queries complete" )
183
183
end
0 commit comments