mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-19 18:59:23 +02:00
NTLM: NegotiateFlags: Renamed LanManagerKey to LanManagerSessionKey
This commit is contained in:
parent
46d5aa2982
commit
f973e56d25
5 changed files with 10 additions and 10 deletions
|
@ -210,7 +210,7 @@ namespace SMBLibrary.Authentication.NTLM
|
|||
{
|
||||
if ((negotiateFlags & NegotiateFlags.ExtendedSessionSecurity) == 0)
|
||||
{
|
||||
if ((negotiateFlags & NegotiateFlags.LanManagerKey) > 0)
|
||||
if ((negotiateFlags & NegotiateFlags.LanManagerSessionKey) > 0)
|
||||
{
|
||||
byte[] k1 = ByteReader.ReadBytes(lmowf, 0, 7);
|
||||
byte[] k2 = ByteUtils.Concatenate(ByteReader.ReadBytes(lmowf, 7, 1), new byte[] { 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD });
|
||||
|
|
|
@ -78,9 +78,9 @@ namespace SMBLibrary.Authentication.NTLM
|
|||
{
|
||||
challengeMessage.NegotiateFlags |= NegotiateFlags.ExtendedSessionSecurity;
|
||||
}
|
||||
else if ((negotiateMessage.NegotiateFlags & NegotiateFlags.LanManagerKey) > 0)
|
||||
else if ((negotiateMessage.NegotiateFlags & NegotiateFlags.LanManagerSessionKey) > 0)
|
||||
{
|
||||
challengeMessage.NegotiateFlags |= NegotiateFlags.LanManagerKey;
|
||||
challengeMessage.NegotiateFlags |= NegotiateFlags.LanManagerSessionKey;
|
||||
}
|
||||
|
||||
if ((negotiateMessage.NegotiateFlags & NegotiateFlags.Sign) > 0)
|
||||
|
|
|
@ -13,10 +13,10 @@ namespace SMBLibrary.Authentication.NTLM
|
|||
Datagram = 0x00000040, // NTLMSSP_NEGOTIATE_DATAGRAM
|
||||
|
||||
/// <summary>
|
||||
/// LanManagerKey and ExtendedSessionSecurity are mutually exclusive
|
||||
/// If both are set then LanManagerKey must be ignored
|
||||
/// LanManagerSessionKey and ExtendedSessionSecurity are mutually exclusive
|
||||
/// If both are set then LanManagerSessionKey must be ignored
|
||||
/// </summary>
|
||||
LanManagerKey = 0x00000080, // NTLMSSP_NEGOTIATE_LM_KEY
|
||||
LanManagerSessionKey = 0x00000080, // NTLMSSP_NEGOTIATE_LM_KEY
|
||||
NTLMSessionSecurity = 0x00000200, // NTLMSSP_NEGOTIATE_NTLM
|
||||
|
||||
/// <summary>
|
||||
|
@ -31,8 +31,8 @@ namespace SMBLibrary.Authentication.NTLM
|
|||
TargetTypeServer = 0x00020000, // NTLMSSP_TARGET_TYPE_SERVER
|
||||
|
||||
/// <summary>
|
||||
/// LanManagerKey and ExtendedSessionSecurity are mutually exclusive
|
||||
/// If both are set then LanManagerKey must be ignored.
|
||||
/// LanManagerSessionKey and ExtendedSessionSecurity are mutually exclusive
|
||||
/// If both are set then LanManagerSessionKey must be ignored.
|
||||
/// NTLM v2 requires this flag to be set.
|
||||
/// </summary>
|
||||
ExtendedSessionSecurity = 0x00080000, // NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace SMBLibrary.Server.SMB1
|
|||
negotiateMessage.NegotiateFlags = NegotiateFlags.UnicodeEncoding |
|
||||
NegotiateFlags.OEMEncoding |
|
||||
NegotiateFlags.Sign |
|
||||
NegotiateFlags.LanManagerKey |
|
||||
NegotiateFlags.LanManagerSessionKey |
|
||||
NegotiateFlags.NTLMSessionSecurity |
|
||||
NegotiateFlags.AlwaysSign |
|
||||
NegotiateFlags.Version |
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace SMBLibrary.Server.SMB1
|
|||
}
|
||||
else
|
||||
{
|
||||
authenticateMessage.NegotiateFlags |= NegotiateFlags.LanManagerKey;
|
||||
authenticateMessage.NegotiateFlags |= NegotiateFlags.LanManagerSessionKey;
|
||||
}
|
||||
authenticateMessage.UserName = accountNameToAuth;
|
||||
authenticateMessage.LmChallengeResponse = lmChallengeResponse;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue