PROJECTS: Kerberos Research - Gotchas and Tips

Page last modified Mon Oct 25 07:46:17 2004

Gotcha's

Tips

When do you need a keytab and when don't you?

This was taken from a post by Jeffrey Hutzelman to the MIT Kerberos mailing list on April 12, 2004.

First, try to think of clients and servers as processes, not machines.
Several processes may be running on the same machine in both roles.

In any Kerberos authentication exchange, both entities involved (client and
server) share a key with the KDC.  For the most part, when the entity is a
human, that key is derived from a password the human types.  When the
entity is a daemon, the key is normally read from a keytab.

So, telnetd or sshd is going to read its key from a keytab.  On the other
hand, kinit is going to read a password from the user, and turn it into a
key; in this case, a keytab is not needed.  However, an automated process
that needs to access a Kerberos-authenticated service (for example, a cron
job that needs to scp something from a remote machine or write to a file in
AFS) will generally obtain Kerberos tickets using a key stored in a keytab,
even though it is acting as a client.

Then there's the login program.  A Kerberos-aware login generally acts as
both a client and server in the same process.  It accepts a username and
password from a user, and uses them to obtain a TGT, just as kinit does.
It then uses that TGT to obtain a service ticket for the login service
(generally host/fully.qualified.host.name), and verifies the resulting
service ticket against the service key, which is obtained from a keytab.

This step is essential to preventing unauthorized logins by an attacker who
is cooperating with the operator of a bogus KDC.  Since the attacker and
bogus KDC operator both know the password that will be typed, they could
together trick a host into allowing a login, unless the host validates the
obtained TGT against a service whose key is known only to it and to the
real KDC.

Explanations for weird things



Title Image - left

Recent blog entries

Categories:

General (13)
Hardware (2)
MetaNetwork (9)
Organizations (4)
Security (3)
SeekingFire Meta (10)
Unix (2)

Subscribe: RSS/Atom

© 2002-2005 Tillman Hodgson, security consultant.
(Copyright Details)

Hacker glider emblem