Land #7307, ensure that default_name, dns_host_name, and dns_domain_name are set

bug/bundler_fix 4.12.25
Brendan 2016-09-13 18:50:27 -05:00
commit 8aff490aec
No known key found for this signature in database
GPG Key ID: ECC0F0A52E65F268
1 changed files with 8 additions and 1 deletions

View File

@ -840,7 +840,6 @@ NTLM_UTILS = Rex::Proto::NTLM::Utils
flags: ntlmssp_flags
)
blob = @ntlm_client.init_context.serialize
native_data = ''
@ -901,6 +900,14 @@ NTLM_UTILS = Rex::Proto::NTLM::Utils
# Save the temporary UserID for use in the next request
temp_user_id = ack['Payload']['SMB'].v['UserID']
blob_data = NTLM_UTILS.parse_ntlm_type_2_blob(blob)
#netbios name
self.default_name = blob_data[:default_name] || ''
#dns name
self.dns_host_name = blob_data[:dns_host_name] || ''
#dns domain
self.dns_domain_name = blob_data[:dns_domain_name] || ''
type3 = @ntlm_client.init_context([blob].pack('m'))
type3_blob = type3.serialize
self.signing_key = @ntlm_client.session_key