示例#1
0
        /// <summary>
        /// Create and send Auth Error Kpassword Request
        /// </summary>
        /// <param name="newPwd">The new password to change</param>
        public void SendAuthErrorKpasswordRequest(string newPwd)
        {
            KpasswordRequest pwdRequest = this.CreateAuthErrorKpasswordRequest(newPwd);

            this.SendPdu(pwdRequest);
            this.testSite.Log.Add(LogEntryKind.Comment, "Send Auth Error Kpassword request.");
        }
示例#2
0
        /// <summary>
        /// Create and send malformed Kpassword Request
        /// </summary>
        /// <param name="newPwd">The new password to change</param>
        public void SendMalformedKpasswordRequest(string newPwd)
        {
            KpasswordRequest pwdRequest = this.CreateKpasswordRequest(newPwd);

            //Change the protocol version number(hex constant 0x0001) to be 0xff80
            pwdRequest.version = KerberosUtility.ConvertEndian(0xff80);
            this.SendPdu(pwdRequest);
            this.testSite.Log.Add(LogEntryKind.Comment, "Send malformed Kpassword request.");
        }
示例#3
0
        public KpasswordRequest CreateAuthErrorKpasswordRequest(string newPwd)
        {
            //Generate the subkey, which will be used to encrypt/decrypt KRB-PRIV message
            EncryptionKey subkey = KerberosUtility.MakeKey((EncryptionType)this.Context.Ticket.SessionKey.keytype.Value, "Password01!", "This is a salt");

            Context.Subkey = subkey;

            Authenticator    authenticator = CreateAuthenticator(this.Context.Ticket, null, subkey);
            KpasswordRequest request       = new KpasswordRequest(this.Context.Ticket, authenticator, newPwd, true);

            return(request);
        }