Use 48 as minimum length for NTLMv2's NtChallengeResponse

This commit is contained in:
Tal Aloni 2017-01-19 02:09:04 +02:00
parent d9b661f829
commit 0ee31e432b
2 changed files with 2 additions and 2 deletions

View file

@ -96,7 +96,7 @@ namespace SMBLibrary.Server
return this[index];
}
if (ntlmResponse.Length > 24)
if (ntlmResponse.Length >= 48)
{
byte[] clientNTProof = ByteReader.ReadBytes(ntlmResponse, 0, 16);
byte[] clientChallengeStructurePadded = ByteReader.ReadBytes(ntlmResponse, 16, ntlmResponse.Length - 16);

View file

@ -98,7 +98,7 @@ namespace SMBLibrary.Server.Win32
return true;
}
if (message.NtChallengeResponse.Length > 24)
if (message.NtChallengeResponse.Length >= 48)
{
byte[] clientNTProof = ByteReader.ReadBytes(message.NtChallengeResponse, 0, 16);
byte[] clientChallengeStructurePadded = ByteReader.ReadBytes(message.NtChallengeResponse, 16, message.NtChallengeResponse.Length - 16);