Skip to content

Commit 472f029

Browse files
committed
Fix random bug when workstation_name is < 6 chars
When the local workstation name is less than 6 characters, remote authentication against a Windows 2008r2 WinRM service always fails. This doesn't seem to affect authentication against IIS's negotiate implementation.
1 parent 773fd7a commit 472f029

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rex/proto/http/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def negotiate_auth(opts={})
480480
opts['headers']||= {}
481481

482482
ntlmssp_flags = ::Rex::Proto::NTLM::Utils.make_ntlm_flags(ntlm_options)
483-
workstation_name = Rex::Text.rand_text_alpha(rand(8)+1)
483+
workstation_name = Rex::Text.rand_text_alpha(rand(8)+6)
484484
domain_name = self.config['domain']
485485

486486
b64_blob = Rex::Text::encode_base64(

0 commit comments

Comments
 (0)