Example #1
0
 public NegotiateMessage(byte[] buffer)
 {
     Signature      = ByteReader.ReadAnsiString(buffer, 0, 8);
     MessageType    = (MessageTypeName)LittleEndianConverter.ToUInt32(buffer, 8);
     NegotiateFlags = (NegotiateFlags)LittleEndianConverter.ToUInt32(buffer, 12);
     DomainName     = AuthenticationMessageUtils.ReadAnsiStringBufferPointer(buffer, 16);
     Workstation    = AuthenticationMessageUtils.ReadAnsiStringBufferPointer(buffer, 24);
     if ((NegotiateFlags & NegotiateFlags.Version) > 0)
     {
         Version = new NTLMVersion(buffer, 32);
     }
 }
 public ChallengeMessage(byte[] buffer)
 {
     Signature       = ByteReader.ReadAnsiString(buffer, 0, 8);
     MessageType     = (MessageTypeName)LittleEndianConverter.ToUInt32(buffer, 8);
     TargetName      = AuthenticationMessageUtils.ReadUnicodeStringBufferPointer(buffer, 12);
     NegotiateFlags  = (NegotiateFlags)LittleEndianConverter.ToUInt32(buffer, 20);
     ServerChallenge = ByteReader.ReadBytes(buffer, 24, 8);
     // Reserved
     TargetInfo = AuthenticationMessageUtils.ReadBufferPointer(buffer, 40);
     if ((NegotiateFlags & NegotiateFlags.Version) > 0)
     {
         Version = new NTLMVersion(buffer, 48);
     }
 }
Example #3
0
 public AuthenticateMessage(byte[] buffer)
 {
     Signature                 = ByteReader.ReadAnsiString(buffer, 0, 8);
     MessageType               = (MessageTypeName)LittleEndianConverter.ToUInt32(buffer, 8);
     LmChallengeResponse       = AuthenticationMessageUtils.ReadBufferPointer(buffer, 12);
     NtChallengeResponse       = AuthenticationMessageUtils.ReadBufferPointer(buffer, 20);
     DomainName                = AuthenticationMessageUtils.ReadUnicodeStringBufferPointer(buffer, 28);
     UserName                  = AuthenticationMessageUtils.ReadUnicodeStringBufferPointer(buffer, 36);
     WorkStation               = AuthenticationMessageUtils.ReadUnicodeStringBufferPointer(buffer, 44);
     EncryptedRandomSessionKey = AuthenticationMessageUtils.ReadBufferPointer(buffer, 52);
     NegotiateFlags            = (NegotiateFlags)LittleEndianConverter.ToUInt32(buffer, 60);
     if ((NegotiateFlags & NegotiateFlags.Version) > 0)
     {
         Version = new NTLMVersion(buffer, 64);
     }
 }