diff --git a/SMBLibrary/Authentication/NTLM/Helpers/NTLMCryptography.cs b/SMBLibrary/Authentication/NTLM/Helpers/NTLMCryptography.cs index bc5471a..eb3c1fe 100644 --- a/SMBLibrary/Authentication/NTLM/Helpers/NTLMCryptography.cs +++ b/SMBLibrary/Authentication/NTLM/Helpers/NTLMCryptography.cs @@ -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 }); diff --git a/SMBLibrary/Authentication/NTLM/IndependentNTLMAuthenticationProvider.cs b/SMBLibrary/Authentication/NTLM/IndependentNTLMAuthenticationProvider.cs index 1c09ee2..539572c 100644 --- a/SMBLibrary/Authentication/NTLM/IndependentNTLMAuthenticationProvider.cs +++ b/SMBLibrary/Authentication/NTLM/IndependentNTLMAuthenticationProvider.cs @@ -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) diff --git a/SMBLibrary/Authentication/NTLM/Structures/Enums/NegotiateFlags.cs b/SMBLibrary/Authentication/NTLM/Structures/Enums/NegotiateFlags.cs index e53ccef..0d09ea5 100644 --- a/SMBLibrary/Authentication/NTLM/Structures/Enums/NegotiateFlags.cs +++ b/SMBLibrary/Authentication/NTLM/Structures/Enums/NegotiateFlags.cs @@ -13,10 +13,10 @@ namespace SMBLibrary.Authentication.NTLM Datagram = 0x00000040, // NTLMSSP_NEGOTIATE_DATAGRAM /// - /// 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 /// - LanManagerKey = 0x00000080, // NTLMSSP_NEGOTIATE_LM_KEY + LanManagerSessionKey = 0x00000080, // NTLMSSP_NEGOTIATE_LM_KEY NTLMSessionSecurity = 0x00000200, // NTLMSSP_NEGOTIATE_NTLM /// @@ -31,8 +31,8 @@ namespace SMBLibrary.Authentication.NTLM TargetTypeServer = 0x00020000, // NTLMSSP_TARGET_TYPE_SERVER /// - /// 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. /// ExtendedSessionSecurity = 0x00080000, // NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY diff --git a/SMBLibrary/Server/SMB1/NegotiateHelper.cs b/SMBLibrary/Server/SMB1/NegotiateHelper.cs index 2ffb964..5125565 100644 --- a/SMBLibrary/Server/SMB1/NegotiateHelper.cs +++ b/SMBLibrary/Server/SMB1/NegotiateHelper.cs @@ -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 | diff --git a/SMBLibrary/Server/SMB1/SessionSetupHelper.cs b/SMBLibrary/Server/SMB1/SessionSetupHelper.cs index 9a4d880..3f81b77 100644 --- a/SMBLibrary/Server/SMB1/SessionSetupHelper.cs +++ b/SMBLibrary/Server/SMB1/SessionSetupHelper.cs @@ -156,7 +156,7 @@ namespace SMBLibrary.Server.SMB1 } else { - authenticateMessage.NegotiateFlags |= NegotiateFlags.LanManagerKey; + authenticateMessage.NegotiateFlags |= NegotiateFlags.LanManagerSessionKey; } authenticateMessage.UserName = accountNameToAuth; authenticateMessage.LmChallengeResponse = lmChallengeResponse;