Unix system password protection mechanism
Walter belgers
Walter@giga.win.tue.nl
December 6, 1993 [1]
Conclude
This article is reminding system administrators to make them pay more attention to the importance of "reasonable setting password [2]". Easy guessing provides the possibility of hackers (HACKERS [3]). Now, more and more computers have been (or will) connect to the Internet. This means that there will be more and more computer users on the Internet, so there will be more and more computer hackers. A good password protection mechanism protects the user's system is not harassment of a harass.
We are now facing a variety of operating systems, and there are many security protection mechanisms in each system. I will focus on the password protection mechanism for UNIX systems in this article. This is because UNIX is a very popular system, especially in the field of education, because of its openness, which makes more and more hackers are happy. This is exactly the opposite of the business sector, because the data (software) is protected. For example, for competitors, he cannot tamper with the opponent's software. The invasion UNIX system has a considerable method, and there is also a number of programs to help find the user's password. A person who has little UNIX knowledge can also use these programs. Therefore, set a good password to block those hackers ("high-grade hackers" can invade the system even without passwords, which means that the system's security is not only determined by reasonable settings).
In addition to discussing the importance of "reasonable settings (for example, not guessed password)", we have to understand how the password protection mechanism works. Next, I will give an example of the actual example of using a bad password. At the end of the article, I will teach you some ways to set reasonable passwords.
Set the importance of reasonable passwords
The purpose of hackers is usually to get the permissions of the system superuser ("root user"). The general means is to use erroneous installation software, (system) software vulnerabilities and operator's mistakes. There are many ways to invade a computer, but most of them are required to have broad knowledge of the implementors. One (relative) simple method is to first log in to the system as a regular user, then search for the system's vulnerability to make yourself a super user. The premise is that hackers must have a valid username and password.
Therefore, most importantly, all (!) Users in the system must choose a password that is not guessed. Each user is directly related to the security of the entire system. But most of the user does not understand how a multi-user system works, and it will not realize that because you choose a good memory password, it will be possible to indirectly lead to a single manway throughout the system. It is necessary to teach users, don't produce the following ideas [MUF]: "What is the tightness of my own account, after all, I just use it to print some things ..." Users need to take into account the system he uses Safety. In the article R. Pethia [PET] mentioned: "Users have responsibility to use secure devices and programs to protect their own data. They also have the responsibility to promote the security of their systems." Inform in the article The importance of user security indicators. One solution is a small amount of training for new users. Or at least let them understand why it is important to choose a good order. This can do when the system administrator assigns an initial password for the new user.
How hack is looking for a password
Most UNIX systems do not use the "shadow password [4]" we need to introduce. In most cases, after the user password is encrypted, store it in the / etc / passwd file, and if the local system is the client, it is stored in the corresponding file of the server. In the latter case, you can view the following command:
$ YPCAT Passwd
Each row of password files is as follows:
Account: Coded Password Data: Uid: GID: Gecos-Field: Homedir: shell
For example, a user, his account name is gigawalt, the encrypted password is FURFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUu4.4Hy0u, the user identification number is 129 (the user ID can be any number of more than 1, the superuser ID is 0), the group of groups Identification number 129, user information (GECOS [5]) is his full name Walter Belgers, personal home directory is / home / gigawalt, using c shell (/ bin / csh). Then, it looks like this in / etc / passwd: gigawalt: Furfuuu4.4Hy0u: 129: 129: Walter Belgers: / home / gigawalt: / bin / csh
After using the shadow file, it will not be the same. All encoded passwords in / etc / passwd are replaced by an asterisk "*", and the real password is placed in another file, which is shadow file. Shadow files only have privileged people (that is, root) can be read, and general users have no right to access.
The user password will pass through the DES algorithm [6]. You need to have a key to encrypt and decrypt data when using DES. The encrypted UNIX password has passed 25 DES iterations. The first round DES transform is used as an initial input at 64 0 bits, and the password input by the user is used as the encrypted key. The password is rearranged during transformation. There are 4096 possible arrangements. For each user, what kind of arrangement is selected is random. The selected arrangement is encoded as a 2-byte string, we call it "particle [7]" and saved in the password file. The first round of results as inputs for the second round of transform, and the same key and particles are used. So repeated until the 25th transformation is completed and the final output is obtained. The output result is encoded to a 11-byte string saved in the password file. Therefore, in the final password file contains a length of 13 bytes of encoded strings. The first two bits are particles and the 11 bits are encrypted passwords (in this example, the fu is particle, RFUU4.4HY0U is encrypted Password - translation).
This encryption method is almost irreversible. That is to say, we can easily encrypt a string, but cannot use the same process to decrypt the ciphertext (original string), unless a trimming all the secrets Keys and particles (exhaustive law, commonly known as violent crack - translation). "No" herein refers to a method that is not faster than the violent crack. However, only one DES iterative data can be broken, and about this knowledge, please refer to [TIL]. So, since you can't decrypt the encrypted password, how do users log in to the system? The answer is: User Enter his / her password, and then the system is encrypted according to the method mentioned in the previously mentioned method according to the method of the password file. The resulting result is again compared with the ciphertext in the password file, and the user is allowed to log in. See [FEL2] for more information on DES in UNIX systems.
Flowchart of the whole process:
Look at the chart
As I said, people can't crack the password. However, people can try to use some words to encrypt 64 0 digits, and see if the results are consistent with the password "happening". In this way, the account is black. So someone will say, hey, this will be all passing all passwords. Yes, if this is done, the whole universe does not exist early when calculating the password. With extremely powerful computers to violently crack a password consisting of 6 lowercase letters, it is still acceptable. The fastest crack record currently in this situation is an hour. Privilege users who have attracted hackers interest must definitely use lowercase letters!
We have seen the general way of cracking passwords is to guess it. So you must ensure that users in the system don't use a guessed password. For example, anything that can be found from the table, whether from the dictionary or an encyclopedia, whether orientation, botany or zoology, do not use! Now people can organize such a table via the Internet. Suppose it is written in the password file:
Gigawalt: Furfuuu4.4 Hy0u: 129: 129: Walter Belgers: / Home / Gigawalt: / Bin / CSH
So, the password is best not:
- All is English vocabulary and its derivative words (such as "laugh", "laughs", "laughing", and so on.).
- All is a foreign language history (which is easy to find foreign language dictionary).
- Words that can be found in password files, such as Walter, Belgers, Gigawalt, and more.
- Has a model, such as 123456, QWERTY, and more.
- Geographical name.
- Vocabulary in the encyclopedia (such as "socrates" - Socrates).
- Vehicle license plate number, house number, phone number or other things related to users.
- first name.
- All of these variants (Walter, Walter, Retlaw, Walter, Walter, Walter0, Walt3r, Retlaw4 ...), as well included using two words or plus random letters.
A real example
In order to prove how bad users choose the password, I will use a guess code to crack a real password file.
The program I use is CRACK V4.1, using Ufcrypt (Ultra-Fast Crypt Rapid Encryption, a quick implementation of the DES algorithm) algorithm, running on a Sun ELC computer cluster. The computing capacity of the cluster is equivalent to a modern PC (20 MIPS, 20 million instructions per second). The program was terminated after nearly 60 hours of running. The password it find is actually in the first 25 hours of the 25 hours.
The results are as follows:
Machine: 11X Sun ELC account total number: 521 Total number of crackers: 58 (11.1%) (where 56 (10.7%) of the interactive user (10.7%)) total consumption: 59 hours 13 points (actual time, not CPU time)
1 Words 42 (7.2%) 2 Common name 1 (0.2%) 3 User / Account Name 5 (0.9%) 4 phrases and mode 3 (0.5%) 5 Women's surname 2 (0.3%) 6 Men's surname 4 (0.7 %) 7 City Name 1 (0.2%)
The password of the crack is as follows:
1. cyclades, paardens, fiesta, regen, gnosis, police, fuselier, ballon, smaragd, marques, farao, kasteel, valent, adagio, clematis, gehannes, koeien, gnomen, onderkin, zeilboot, druppel, fietsen, testen, marathon, Tamtam, Global, Vrijheid, Wolf, Kwiek, Basket, Stones, Klomp9, Fiets9, Zoutje, Biefstuk, Nenene, TNBRG (this is the "Tonbrug" removes the vowel). 2. Fischer.
3. The password of the Guest account is "Guest"! This is of course not the user's fault, but the system administrator's fault. In the Netherlands, this situation will be considered criminal behavior (the author is the Dutch - the translation).
4. QWERTY, UNESCO.
5. HEATHER, JOANNE.
6. PIET, ATILLA, FRANS2, VATSUG ("Gustav (Gustaf)" fell to fight).
7. Adelaide.
Some people have done statistics on these easy guesses. In [Kle], Daniel Klein spent a worship CPU time, cracked 21% of 15,000 passwords. The initial 2.7% is found within 15 minutes (the password is the same, for example, the account name Gigawalt, the password is also gigawalt). The statistics of 1% of these 15,000 passwords are as follows:
Table vocabulary 7.4% FAQ 4.0% User / Account Name 2.7% Speech and Mode 1.8% Women's surname 1.2% Men's surname 1.0% machine name 1.0%
It is much more meaningful to make these results with the previous, because the scope of our investigation is too limited.
And if the survey is expanded to the United States. The result is meaningful (see [FAR]). You may think that these companies have a good security system. However, the password problem still exists, cracking out of the root password (root-password!), But a little more than an hour (total of 1594 passwords, which guess 50 in 15 minutes, guess 90 in 35 minutes) .
Find a good password
The above is illustrated, and each user uses a good password. Let's take a look at what methods can have a good password. A good password should contain 8 characters (UNIX password supports up to 8 letters, the exceeding part will be ignored. So "STILL WON 'Talk, EH, SPIFF?" And the password to Unix with "STILL WO" There is no difference in words). The password must be better, but if the user finds a piece of paper, the encryption will lose its meaning (to the crack directly to find such a piece of paper).
Don't write letters in the password, don't use only one uppercase letter ("secret" is not a good password). It is best to clamp some non-letters in the password (such as%, #, *, or punctuation, etc.). Sometimes some control symbols can also be used, but not all can be used, and some control symbols will have poor results with certain network protocols.
Some suggestions:
- Select two spectats that are 7 letters but unrelated to each other, connect them with punctuation, and change the case case. For example: "Pit IDEA", "PLOVER # ME". - I want to make sense, but don't be too common), take the first letter of each word. For example, we think about "My Goldfish Are Called Justerini and Brooks!", Then our password is "Mgacjab!" (Here you must guarantee the password is 8 letters, and it is best to case sensitive and punctuation).
- Use the vowel and consonant to combine a good reading (so that it is easy to remember) but there is no actual word. For example: "Kodupany", "EITYPOOP".
Possibility to reduce crack
It is very important to use it difficult to use it hard to guess. Rule can be used to generate such a password. System administrators also have a responsibility to remind users to do this.
To reduce the risk of crack, you can follow these rules:
- Make sure the user knows the importance of password and how to select the correct password.
- Install the new version / bin / passwd (or yppasswd) installed: You can check if the password is too shallow, see if it contains punctuation, or if it can be found from the dictionary.
- Install the shadow password document (may also replace other software accordingly).
- Set the password validity period, such as the validity period of the normal user password for three months, the privileged user's period is one month. But the time interval should not be set too short, so as not to have a series of associated passwords, such as "Secret1", "SECRET2", ... but leave a loophole, once he guess one, behind Just guess.
- Try to crack the user's password to see if there is a cracked password. Then meet with such users, and talk to him / she talks about the importance of things.
- Use a disposable password (so some extreme, and require additional investment, see [VEN]).
- Restrict the use environment of privilege accounts, such as ruled that root can only use console to avoid being eavesdropped by people. If you can't do this, avoid using privileged account login systems in public applications to avoid monitoring or eavesdropping [8].
- Always remember that the security of the entire system is determined by the weakest link on the security chain, even if the password is set reasonable, the system is not necessarily safe.
references
[Bel] Walter Belgers, Password Security - A Case Study (in Dutch), TimeWasters Online Magazine # 5, march 9, 1993, can be obtained by sending email with Subject 'TOM5' to timewasters-request@win.tue.nl.
[Cur] David A. Curry, UNIX System Security, Addison-Wesley, 1992.
[Far] Dan Farmer, Wietse Venema, Improving the Security of Your Site by Breaking Into it, USENET newsgroup comp.security.unix, can be obtained by anonymous ftp from ftp.win.tue.nl as / pub / security / admin- Guide-to-cracking.z, 1993.
[Fel1] David C. Feldmeier, a high-speted Software Des Implement, can be obtained by anonymous ftp from thumper.bellcore.com as /pub/crypt/des.ps.z, 1989. [fel2] David C. Feldmeier, Philip R. Karn, UNIX Password Security - Ten Years Later, Proceedings of Advances in Cryptology - Crypto '89, 1989.
[KLE] Daniel V. Klein, 'Foiling The Cracker': A Survey of, And Improvements To, Password Security (Revised Paper), Proceedings of The Usenix Security Workshop, Summer 1990.
[MUF] Alec E. Muffet, Almost Everything You Wanted to Know About Security (But Were Afraid To Ask!), USENET NEWSGROUP Alt.Security.
[PET] R. Pethia, S. Crocker, B. Fraser, RFC1281: Guidelines for the Secure Operation of the Internet, November 1991.
[TIL] Henk C.A. Van Tilborg, An Introduction To Cryptology, Kluwer Academic Publishers, 1988.
[VEN] Wietse Venema, Using Securid Tokens in An Open Multi-Host Unix Environment, Can Be Obtained by Anonymous Ftp from fp.nic.surfnet.nl as /surfnet/net-security/docs/securid.ps, 1993.
[1] This paper is written for more than ten years ago, so some technical indicators are not as advanced today. For example, the Unix's password is only 8 digits, and the computer's running speed is very slow. But even in this way, people who talk in the article ignore password security, which seems to be common today, so it still has practical significance for today. This is why I translated this article. I sincerely hope that the user of each computer, especially in the highly developed environment of this stealing technology, and must pay attention to and protect their own passwords, absolutely can't fall light. People who don't have a good intention is not in the hole! - Translation
[2]
Well-chosen passwords - reasonable set password - translation.
[3] This "CRACKERS" is actually more accurate, because "Hackers" is in history, refers to those who have a soft-computer soft / hardware knowledge, they work hard to learn and improve computers. Working method, not destruction. But I will continue to use the "Hacker" that the public is familiar with, even though it is a misunderstanding.
[4]
Shadow Password File - Shadow Password Document - Translation.
[5]
Gecos - General Electric Comprehensive Operating System, a historical levy of a 1970s may be an old-fashioned operating system, or it may be a standard, which is similar to POSIX - translation.
[6]
DES - Data Encryption Standard (Data Encryption Standard). The United States passed the 56Bit version of the data encryption standard on November 23, 1976, and the original text said it was adopted in 1979. After being used 1/4 century, it is currently replaced by the new encryption standard AES (Advance Encryption Standard, Advanced Encryption Standard). [7]
'Salt' - Crystal, Particles, or something else, in short, use it to do a metaphor. - Translation.
[8] To move the eavesdropline like Trojan horses, so be sure to use privileged accounts on a trusted machine, and such machines are best independent, do not connect on the public network and only allow authorization to use - Translation.
[Note]: I didn't get the consent of the original author when I translated this article, so there is no right for the original text, so don't reference this translation in regular occasions. I don't assume any responsibility for any results brought about by translation. If you need to reprint, you must note the original author's rights and this statement.
Last modified date: November 7, 2004