Improving Password Security, and Alternatives to the Standard Password Mechanisms in Mac OS X


It should be obvious from the discussion earlier in this chapter that there is nothing that can be done to make passwords completely secure. The best that can be done is to make them reasonably secure, for a reasonable amount of time. To do so, one must pick strong passwords that can't be trivially guessed with dictionary attacks or brute-force approaches on a small subset of the password space.

The usual recommendation is to create passwords by coming up with a phrase that you'll be able to remember, but that can't easily be tied to you. Take the first letter of each word in the phrase and combine them into a nonsense password. Add some random capitalization. Transpose likely alphabetic characters to numerals, and sprinkle in a bit of punctuation. For example, if you start with something like the phrase "My sister likes oatmeal raisin cookies," and might end up with a password that looks like " mS1.0rc ", where the "L" and "O" characters are replaced with one and zero respectively. A recent study has suggested that these patterns are essentially just as difficult for today's password cracking software to guess as passwords chosen completely randomly from the entire password data space. There is, however, reason to suspect that this conclusion is less than completely accurate. In The Memorability and Security of Passwords: Some Empirical Results ,, Yan et. al report that mnemonic phrase-based passwords are stronger than typical passwords generated by users, while being easier to remember. They also conclude that there is no observable difference between the strength of mnemonic phrase-based passwords and completely randomly chosen passwords. However, both the methodology and conclusions of the study ignore the fact that there may be patterns to be found and exploited in these phrase-based passwords. In conducting the test, the password cracker was configured to attack only word-like passwords. The search was based on dictionary and user personal information, and permutations of these that include interspersed numerals. Because a mnemonic phrase would only result in a word-like pattern by random chance, (as could a completely randomly chosen password), it's obvious that most phrase-based passwords, and most random passwords, would not be found by such a search. Any disparity in the results would necessarily result from a difference in the percentage of phrases whose initial letters spelled words, versus the percentage of random passwords that are dictionary words. Such an analysis is outside the scope of this book, but it should be obvious that there may be patterns to the initial letters of words in phrases, just as there are to the usage of letters in written languages. These patterns can be exploited to develop cracking software targeted at phrase-based passwords, making them almost inevitably weaker than random passwords at some level. How much weaker we won't know until something like John the Ripper comes along with rules to exploit phrase-like patterns, and then we can see how fast such passwords typically fall when dealt with directly, instead of through brute-force methods .

A useful additional protection is to limit the by-password access to your machine as much as you can. If a remote cracker cracks your password database, but there is no way for them to connect to your machine using the information, it's almost as good as if they hadn't cracked your password at all. For this reason, we strongly recommend disabling passworded remote logins whenever possible. SecureShell, for example, has a provision to allow only passphrase logins, and to reject password logins even if the person issues the correct password. Configuring this mode is covered in Chapter 14, on remote access. A passphrase can be considerably longer than a password, and it can be considerably harder to guess by brute force. Although a normal password can ultimately be cracked with only a few years of CPU time, the size of the passphrase space is so large that if it is well chosen, a passphrase could take longer than the age of the universe to guess.

The Future: PAM

Despite the inevitability of today's password space eventually falling into the nearly instantly crackable range, the future is not so bleak. Apple has moved to make the Linux-PAM (Pluggable Authentication Modules) system a part of OS X. This system is designed to be an expandable, adaptable authentication system, whereby programs such as login that require the capability to authenticate a user's identity are not locked into a single authentication scheme. With this system, applications that need to verify a user's identity make use of a centralized authentication system that can be updated by the use of plug-in software. The plug-ins can be easily written and added to the centralized system, and this allows authentication to be done by almost any scheme that can be conceived. If you want longer passwords, simply use a plug-in that takes 12-character passwords instead of today's 8 characters. If you want to a priori prevent users from choosing passwords that can be easily cracked, use a plug-in that checks new passwords against the ruleset by which John the Ripper (or any other password cracker) makes its guesses, and have it refuse to set users' passwords to anything that would be easily cracked. Prefer to move into the 21st century with respect to user identification? Find a fingerprint or retina scanner that you can hook up to your USB port, and write your own PAM to speak to it (or get the OpenSource community to write one for you) and perform authentication that way.

Currently a multitude of PAM are available on the Internet, and about two dozen have been ported to Darwin. Of these, 11 are currently in use under OS X 10.2. Unfortunately, not all the software that requires user authentication has been updated to use PAM yet, so the system is, at this time, not particularly useful. For example, the passwd program has not been PAM-ified, so even though there's a very nice PAM that can enforce picking strong passwords (Solar Designer's pam_passwdqc module from, it's currently of no use under OS X.

We expect that support for these back-end functions is among the things that Apple's working the hardest on right now, so it's probably worth checking out the pam.conf man page, looking in /etc/pam.d/ , and checking out the types of PAM available around the Net. is a good place to start.


Mac OS X Maximum Security
Maximum Mac OS X Security
ISBN: 0672323818
EAN: 2147483647
Year: 2003
Pages: 158 © 2008-2017.
If you may any questions please contact us: