Authentication Protocols
Overview
Network authentication protocols are mechanisms or sets of rules that ensure that users or devices can securely prove their identity to access network resources or services.
They ensure that only authorized users or devices can access a network, reducing the risk of unauthorized access and enhancing security.
PAP
PAP (Password Authentication Protocol) is a basic authentication protocol that has been largely replaced by more secure methods. Here’s an overview of its characteristics:
- Transmits passwords in plaintext, making it vulnerable to interception.
- Lacks encryption, thus passwords are exposed during transmission.
- Legacy use, common in older systems where security measures were less advanced.
- Offers minimal protection against attacks such as eavesdropping.
CHAP
CHAP (Challenge Handshake Authentication Protocol) is a more secure authentication method compared to PAP, using a challenge-response process to avoid transmitting passwords in plaintext.
- The server sends a random challenge to the client.
- The client responds with a hash value created from the challenge and the user's password.
- The server compares the received hash with its own calculated hash to authenticate the user.
- Repeated challenges during a session reduce the risk of replay attacks.
MS-CHAPv2
MS-CHAPv2 is a more secure version of the Challenge-Handshake Authentication Protocol, designed to provide enhanced security in network environments.
-
Utilizes a challenge-response mechanism with stronger encryption
-
Widely used in VPNs and Windows-based environments
NTLM
NTLM is a Microsoft proprietary authentication protocol that has evolved over time to enhance security in network environments, though it is now largely replaced by more secure protocols like Kerberos.
- "NT" - New technology
- Microsoft’s proprietary authentication protocol
- Supersedes the older LANMAN protocol
- Designed for workgroup computers, not joined to any AD domain
- Known for vulnerabilities to various attacks
- Password hashes with NTLM are not salted, making them easier to crack
- NTLM v2 includes salted passwords for improved security
Kerberos
Kerberos is a ticketbased authentication system that allows users to authenticate to a centralized service and use tickets to gain access to distributed services.
- Primarily used for single sign-on (SSO) in enterprise environments.
- Commonly used in Microsoft Active Directory authentication.
- Users are provided with a "ticket" for accessing resources securely.
Kerberos Components
The following components are essential for Kerberos to function:
-
Kerberos Key Distribution Center (KDC)
- The central authority that issues and manages security credentials.
-
Authentication Service (AS)
- A part of the KDC
- Responsible for verifying a user's credentials and issuing a Ticket-Granting Ticket (TGT).
-
Ticket-Granting Service (TGS)
- Another part of the KDC that issues service-specific tickets
- Allows users to access different services after their identity is authenticated.
-
Ticket-Granting Ticket (TGT)
- A token that the client receives after initial authentication
- Allows it to request access to various services without re-entering credentials.
How Kerberos Works
Kerberos operates through a series of steps that ensure secure communication and authentication between a client and a service.
-
The end user uses a Kerberos client to provide their username and password.
-
The client sends a clear authentication request to an Authentication Server (AS).
-
The AS looks up the user in its database and replies to the client with the following:
-
Random session key
- Used for future communication between client and ticket-granting server
- Encrypted with client's password
-
Ticket granting ticket
- Includes information of the client
- Includes a copy of the client ticket-granting server's (TGS) session key
- Encrypted using a key known only to the ticket-granting server
-
-
The client decrypts the session key using the user’s password, gaining access to the client-TGS session key.
-
To access a service, the client contacts the TGS and sends:
-
A copy of the TGT and the identity of the requested service.
-
An authenticator containing the client's ID and current time, encrypted with the client-TGS session key.
-
-
The TGS decrypts the TGT to retrieve the client-TGS session key.
-
Using this key, the TGS decrypts the authenticator and retrieves the client ID and timestamp.
-
The TGS generates a random client-server session key for communication between the client and the service.
-
The TGS sends two messages to the client:
-
A client-server ticket, encrypted with the service's secret key, containing the client-server session key.
-
A copy of the client-server session key, encrypted with the client-TGS session key.
-
-
Upon receiving these messages, the client is ready to complete the authentication process.
-
The client sends the following to the service:
- The client-server ticket (received from the TGS).
- A new authenticator encrypted with the client-server session key.
-
The service decrypts the client-server ticket to retrieve the session key and uses it to decrypt the authenticator, validating the client.
-
Once the service validates the client, the client is granted access to the service.
How it looks like: