示例#1
0
 /// <summary>
 /// update the lm challenge response
 /// </summary>
 /// <param name="targetInfo">the challenge packet</param>
 /// <param name="lmChallengeResponse">the lm challenge response</param>
 /// <summary>
 private void UpdateLmChallengeResponse(
     ICollection <AV_PAIR> targetInfo,
     ref byte[] lmChallengeResponse
     )
 {
     // If NTLM v2 authentication is used and the CHALLENGE_MESSAGE TargetInfo field (section 2.2.1.2) has an MsvAvTimestamp present,
     // the client SHOULD NOT send the LmChallengeResponse and SHOULD send Z(24) instead
     if (NlmpUtility.IsNtlmV2(this.client.Config.Version) && targetInfo != null && NlmpUtility.AvPairContains(targetInfo, AV_PAIR_IDs.MsvAvTimestamp))
     {
         lmChallengeResponse = NlmpUtility.Z(24);
     }
 }
示例#2
0
        //If the ClientChannelBindingsUnhashed (section 3.1.1.2) is not NULL
        private void InitializeMsAvChannelBindings(
            ICollection <AV_PAIR> targetInfo
            )
        {
            // update the MsAvChannelBinding of targetInfo
            // add an AV_PAIR structure (section 2.2.2.1) and set the AvId field to MsvAvChannelBindings and the Value field to Z(16).
            var value = NlmpUtility.Z(16);

            if (NlmpUtility.AvPairContains(targetInfo, AV_PAIR_IDs.MsvChannelBindings))
            {
                NlmpUtility.UpdateAvPair(
                    targetInfo, AV_PAIR_IDs.MsvChannelBindings, (ushort)value.Length, value);
            }
            else
            {
                NlmpUtility.AddAVPair(
                    targetInfo, AV_PAIR_IDs.MsvChannelBindings, (ushort)value.Length, value);
            }
        }