MCSE Training Kit (Exam 70-220): Designing Microsoft Windows 2000 Network Security: Designing Microsoft(r) Windows(r) 2000 Network Security (IT-Training Kits)

Windows 2000 is designed to use Kerberos v5 as the default authentication protocol. Kerberos v5 provides more flexibility in authentication than the NTLM authentication protocol did.


After this lesson, you will be able to

Estimated lesson time: 45 minutes


Reviewing Kerberos Components

This lesson examines in detail how Kerberos authentication is used as the default authentication mechanism for Windows 2000–based computers. Before we start looking into design considerations of how Kerberos authentication works and how you can optimize and secure Kerberos authentication, let's look at the core components of Kerberos authentication. The components of the Kerberos v5 protocol include

These four components allow Kerberos authentication to take place between Windows 2000 clients and Windows 2000 DCs.

Designing Kerberos Authentication

Kerberos provides the following advantages over the NTLM protocol:

Understanding the Kerberos Message Exchanges

Three different message exchanges are used within Kerberos. All Kerberos authentication transactions will be composed from these three message exchanges.

The Kerberos message exchanges are

NOTE


In the case of a failed authentication, all three message exchanges would replace the response sent from the KDC or the target server to the client with a Kerberos Error message (KRB_ERROR) that explains why the authentication attempt failed.

Analyzing Kerberos Authentication

Kerberos authentication is used in a Windows 2000 network in many circumstances. The following sections outline the transactions that occur as Kerberos authentication takes place.

Initial Authentication with the Network

The Authentication Service Exchange is used when a user initially logs on to the network. This exchange provides the user with a logon session key and a TGT that will be used to acquire service tickets during the session. The process involves a message sent from the client computer to the server (KRB_AS_REQ) and a response sent from the server to the client (KRB_AS_REP). The information contained within the KRB_AS_REP is encrypted with the user's long-term key so that only the user can decrypt the session key and the TGT within the response message. Each user shares a long-term key with the KDC. The long-term key is derived from the account's password.

The Importance of Time in Kerberos Transactions

In Windows 2000 the current time of the client is included in any client requests sent to a target server or to the KDC. The time is compared with the target server's current time. By default, if the difference between the two times is greater than 5 minutes, the connection attempt is considered invalid. In this instance, the connection attempt is considered to be a replay attack.

To ensure that all computers in a forest have synchronized clocks, Windows 2000 uses the Windows Time Synchronization Service (W32time.exe) that's based on the Simple Network Time Protocol (SNTP).

The following processes occur in order to ensure time synchronization:

  1. The Primary Domain Controller (PDC) emulator in the forest root domain is considered the authoritative time source for the entire forest. The PDC emulator should synchronize its clock to an Internet Network Time Protocol (NTP) time source using the following command:

    net time /setsntp:<NTP host name>

  2. For every other domain in the forest, the PDC emulator in that domain contacts the PDC emulator in the parent domain for clock synchronization. If the domain is parallel to the forest root domain (a separate tree in the forest), the PDC emulator contacts the PDC emulator in the forest root domain for time synchronization.
  3. Within each domain, all DCs synchronize their clocks with the PDC emulator of their domain.

All client computers in the domain synchronize their clocks with the authenticating DC. If the authenticating DC's clock is ahead of the local time or the time difference between the two clocks is more than 2 minutes, the time is immediately reset to match the DC's clock. If the authenticating DC's clock is behind the current time, the computer's clock is recalibrated over the next 20 minutes until the times match.

The Kerberos authentication exchange, shown in Figure 3.3, proceeds as follows:

Figure 3.3 The Kerberos authentication exchange

  1. The user presses Ctrl+Alt+Del to display the Windows 2000 Login dialog box. Within the dialog box, the user enters his login name, password, and the domain he wants to authenticate to.
  2. The client computer queries the DNS server to find a _Kerberos service locator (SRV) resource record based on the client's domain and site. The returned SRV resource record is for a KDC that's at the client's local site for the domain the user wants to log on to.
  3. The user sends a Kerberos Authentication Service Request (KRB_AS_REQ) to the DC indicated in the returned SRV resource record. The user's account information and the current computer time are encoded using the long-term key shared between the user's account and the KDC. As mentioned earlier, this long-term key is based on the user's password.
  4. The authentication service at the KDC authenticates the user, generates a TGT for the user, and then sends back the TGT to the user in a Kerberos Authentication Service Response (KRB_AS_REP) message.

This provides the user with the proper TGT. If the user is using a Windows 2000–based computer, he must now acquire a service ticket for that computer, as shown in Figure 3.4.

Figure 3.4 Acquiring a service ticket for the computer that the user logs on to

The following steps explain how to acquire the service ticket for the computer:

  1. The user sends a Ticket Granting Service Exchange Request (KRB_TGS_REQ) to the KDC to acquire a service ticket for his computer. The KRB_TGS_REQ contains an authenticator and the TGT that was issued to the user.
  2. The Ticket Granting Service of the KDC checks the TGT and the authenticator. If both are valid, the Ticket Granting Service generates a service ticket and sends it back to the user using a Ticket Granting Service Response (KRB_TGS_REP).
  3. At the client computer, the service ticket is presented to the Local Security Authority, which will create an access token for the user. From then on, any process acting on behalf of the user can access the local machine's resources.

Network Authentication

Having initially authenticated with the network, the user has to authenticate with other computers as he accesses resources on those other computers. Each and every time that the user connects to a resource or service on a remote computer, he has to perform a network authentication as shown in Figure 3.5.

Figure 3.5 Network authentication

The following steps outline the authentication sequence that takes place when a user connects to a remote resource on the network:

  1. The user sends a Ticket Granting Service Request (KRB_TGS_REQ) to the KDC to acquire a service ticket for the target computer. The KRB_TGS_REQ includes the TGT and an authenticator.
  2. The Ticket Granting Service of the KDC checks the authenticator and the TGT, generates a new service ticket, and sends it back to the user using a Kerberos Ticket Granting Service Response (KRB_TGS_REP). The service ticket is encrypted using the long-term key between the KDC and the target service.
  3. The user sends the service ticket and an authenticator to the target server using a Kerberos Application Request (KRB_AP_REQ).
  4. The target server verifies the ticket with the authenticator, decrypts the session key using the master key that's shared with the KDC, and sends back an authenticator to the user in a Kerberos Application Response (KRB_AP_REP). This authenticator provides mutual authentication of the user and server.

Smart Card Authentication

Windows 2000 supports the use of smart card authentication by using PKINIT extensions for Kerberos. This allows public/private keys to be used to authen-ticate the user when he logs on to the network in place of the standard Kerberos Authentication Service Request and Response. KRB_AS_REQ and KRB_AS_REP are replaced with the PA_PK_AS_REQ and PA_PK_AS_REP messages.

Table 3.3 shows how the Kerberos Authentication Service uses the client's public key and private key when smart cards are used for logon.

Table 3.3 Private and Public Key Usage for Smart Card Logon

Process Key Used
Client-side encryption of the preauthentication data Private key
KDC-side decryption of the preauthentication data Public key
KDC-side encryption of session key Public key
Client-side decryption of session key Private key

When the smart card is inserted into the computer, the process shown in Figure 3.6 takes place:

Figure 3.6 Smart card authentication

  1. The user starts the logon process by introducing a smart card and by authenticating to the card using the user PIN code. The smart card contains the user's public key credentials, private/public key pair, and certificate.
  2. A modified Kerberos Authentication Service Request (PA_PK_AS_REQ) message is sent to the KDC. This request contains the user principal name and time stamp and a copy of the user's certificate. The user principal name and time stamp are signed by the user's private key.
  3. The KDC validates the request by verifying the user's certificate and the digital signature with the Certification Authority (CA) that issued the certificate.
  4. The KDC queries Active Directory to determine the mapping between the certificate included in the PA_PK_AS_REQ and a Windows 2000 SID. When the mapping is determined, the KDC will issue a TGT for the corresponding SID.
  5. The KDC sends the TGT back to the user in a modified Kerberos Authentication Service Response (PA_PK_AS_REP). Within the response, the session key is encrypted with the user's public key. This ensures that only the correct user can decrypt the session key.
  6. The user retrieves the session key by decrypting the session key with the private key located on the smart card.

Multiple Domain Authentication

Your forest often needs to have more than one domain. If it does, authentication will be accomplished by using TGTs, referral tickets (TGTs for other domains), and service tickets. Figure 3.7 shows the typical process that occurs when a user accesses a resource in another domain.

Figure 3.7 Authentication in a multiple-domain environment

The following process would take place if a user in the west.microsoft.com domain attempted to access a network share on the computer named srv1.east.microsoft.com:

  1. The user sends a Ticket Granting Service Request (KRB_TGS_REQ) to the KDC in his domain to acquire a service ticket for the srv1.east.microsoft.com computer. Because the target computer is in a different domain, the KDC that receives the request looks at the trust relationships that exist for the domain. Because no explicit trust relationship exists between the west.microsoft.com domain and the east.microsoft.com domain, only the default transitive trusts of a Windows 2000 forest, the KDC issues a TGT referral ticket to the microsoft.com domain in the KRB_TGS_REP packet that's sent back to the client. The TGT is encrypted using the interdomain key between the west.microsoft.com domain and the microsoft.com domains.

    TIP


    If users in the west.microsoft.com domain frequently access resources in the east.microsoft.com domain, you could shorten the length of this process transaction by creating a shortcut trust, or cross-link trust, between the west.microsoft.com and east.microsoft.com domains. If you did this, the TGT issued at this stage would be for the east.microsoft.com domain.

  2. The user sends a KRB_TGS_REQ message to a KDC located in the microsoft.com domain to acquire a service ticket for the srv1.east .microsoft.com computer. Because the target computer is in a different domain, the KDC that receives the request looks at the explicit trust relationships that exist for the domain. The KDC in the microsoft.com domain issues a TGT referral ticket to the east.microsoft.com domain in the KRB_TGS_REP packet that's sent back to the client. The TGT is encrypted using the interdomain key between the microsoft.com domain and the east.microsoft.com domains.
  3. The user sends a KRB_TGS_REQ message to a KDC located in the east.microsoft.com domain to acquire a service ticket for the srv1.east.microsoft.com computer. Because the target computer is in this domain, the KDC that receives the request verifies the TGT and the authenticator provided in the KRB_TGS_REQ. If it's valid, the KDC issues a KRB_TGS_REP that contains a service ticket to connect to the SRV1.east.microsoft.com computer. The service ticket is encrypted using the long-term key shared by the KDC and the srv1.east.microsoft.com computer.
  4. The user sends a KRB_AP_REQ containing the service ticket to the srv1.east.microsoft.com computer. The srv1.east.microsoft.com validates the service ticket, and if it's valid, it responds with a KRB_AP_REP message. The user can now access the resource.

Delegation

In client/server environments you might sometimes deploy multitiered client/server applications (commonly referred to as n-tiered applications). In these scenarios, the first server that the user connects to must often impersonate that user when that server connects to additional servers in order to ensure that the entire process is run in the connecting user's security context. Kerberos provides the functionality for this procedure through the process of delegation.

Delegation can take place only when the following criteria are met:

When the account is designated as trusted for delegation, this enables the forwardable flag on the service ticket. This flag allows services to request service tickets on behalf of the client and run processes in the security context of the client.

Figure 3.8 shows the authentication process that occurs when delegation takes place in a client/server system where two servers are involved (Server1 and Server2):

Figure 3.8 Kerberos authentication when delegation takes place

  1. The user sends a KRB_TGS_REQ message to the KDC requesting a service ticket for Server1.
  2. The KDC sends the service ticket in a KRB_TGS_REP message back to the user.
  3. The user sends the service ticket to Server1 in a KRB_AP_REQ message.
  4. Server1 responds to the authentication request with a KRB_AP_REP message.
  5. Server1 sends a KRB_TGS_REQ message, impersonating the user, to the KDC for a service ticket to access Server2 in the security context of the user.
  6. The KDC sends a KRB_TGS_REP message containing the service ticket that allows the user to access Server2.
  7. Server1 sends the service ticket to Server2 in a KRB_AP_REQ message.
  8. Server2 responds to the authentication request with a KRB_AP_REP message validating the authentication. Server1 now has access to services on Server2 at the security level of the original user.

Making the Decision

When you design your network for Kerberos Authentication support, you must consider the following points:

Applying the Decision

Only the Windows 2000 clients in the Market Florist network can authenticate using Kerberos v5. (Remember that Windows 95 and Windows NT clients can't use Kerberos for authentication.) To ensure that Kerberos authentication is optimized for all four sites, you must include the following components in the authentication design for Market Florist:

Lesson Summary

Because Windows 2000 uses Kerberos as the default authentication protocol, you must ensure that your network infrastructure supports Kerberos authentication. This includes ensuring that essential network services, such as DNS, DCs, and global catalog servers are available in the event of a WAN link failure.

Also make sure that you understand how the Kerberos authentication process works for different scenarios. Knowing the process will help you troubleshoot authentication problems when they occur.

Категории