ensure that default_name, dns_host_name, and dns_domain_name are set

This commit is contained in:
Brent Cook 2016-09-13 18:32:59 -05:00
parent 245237d650
commit b5ae287235
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