![Photo by pina messina on Unsplash Photo by pina messina on Unsplash](/var/ezflow_site/storage/images/archive/2023/74/pre-authentication-for-kerberos-services/photobypinamessinaonunsplash_tailormade.png/203132-1-eng-US/PhotobypinamessinaonUnsplash_TailorMade.png_medium.png)
Photo by pina messina on Unsplash
Pre-authentication for Kerberos services
Tailor-Made
When a user is validated by the Kerberos authentication protocol through a key distribution center (KDC), the user is given a ticket granting ticket (TGT) at the end of the process that then enables transparent login to more Kerberos services. Before this can happen, however, the user must initially prove their identity to the KDC. This process is also known as pre-authentication and provides protection against attackers who send an arbitrary request to the server and then go on to use a dictionary or brute-force attack to try to guess the user password.
This attack would be possible without pre-authentication because, in such a case, the KDC would simply send data to the client encoded with a key derived from the user password. Attackers would then have plenty of time to carry out an offline attack, ultimately to extract the user password.
Password First
To prevent such an attack, all current Kerberos implementations require pre-authentication. When a client initiates a login to a KDC, the connection is first interrupted, and the server asks the client to authenticate. In the simplest case, the user simply has to enter their password; then, a key (long-term key) is derived from the password used to encode a timestamp. The timestamp is then transmitted to the KDC to authenticate the user. If this works, the user is also given a TGT. This method is described in the initial Kerberos RFC [1], as well, which means that it is supported by all Kerberos implementations (Listing 1).
Listing 1
Pre-Authentication
### A trace from kinit shows the selected pre-authentication method. # KRB5_TRACE=/dev/stdout kinit tscherf [20981] 1655644410.292205:
Buy this article as PDF
(incl. VAT)