Skip to content

Commit 1e5f867

Browse files
committed
Report the correct JtR type
1 parent 862c6a9 commit 1e5f867

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/exploit/remote/smb/server/hash_capture.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ def report_ntlm_type3(address:, ntlm_type1:, ntlm_type2:, ntlm_type3:)
4444

4545
combined_hash << ":#{client_hash}"
4646
combined_hash << ":#{bin_to_hex(challenge)}"
47+
jtr_format = JTR_NTLMV1
4748
when :ntlmv2
4849
hash_type = 'NTLMv2-SSP'
4950
client_hash = "#{bin_to_hex(ntlm_message.ntlm_response[0...16])}:#{bin_to_hex(ntlm_message.ntlm_response[16..-1])}"
5051

5152
combined_hash << ":#{bin_to_hex(challenge)}"
5253
combined_hash << ":#{client_hash}"
54+
jtr_format = JTR_NTLMV2
5355
end
5456

5557
return if hash_type.nil?
@@ -62,8 +64,6 @@ def report_ntlm_type3(address:, ntlm_type1:, ntlm_type2:, ntlm_type3:)
6264
print_line "[SMB] #{hash_type} Hash : #{combined_hash}"
6365
print_line
6466

65-
jtr_format = ntlm_message.ntlm_version == :ntlmv1 ? JTR_NTLMV1 : JTR_NTLMV2
66-
6767
if active_db?
6868
origin = create_credential_origin_service(
6969
{

0 commit comments

Comments
 (0)