Переглянути джерело

NTLM: NegotiateFlags: Renamed LanManagerKey to LanManagerSessionKey

Tal Aloni 7 роки тому
батько
коміт
f973e56d25

+ 1 - 1
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 });

+ 2 - 2
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)

+ 5 - 5
SMBLibrary/Authentication/NTLM/Structures/Enums/NegotiateFlags.cs

@@ -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

+ 1 - 1
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 |

+ 1 - 1
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;