File Permissions UNIX Lines of Defense

Restricting or monitoring access to other parts of the system terminals, modems, network facilities, and printers to prevent vandalism on these exposed parts which is a frequent problem • Restricting access to backup tapes, in particular, to protect system data •

8.1.2 Passwords

If an unauthorized individual gains physical access to the system, user authentication is the next line of defense; a password keeps the system closed off, preventing unauthorized users to access the systems files programs and data. One weakness of passwords is that if someone breaks into an account by finding out its password, the intruder has all the rights and privileges of the legitimate user. There are a variety of methods for adding additional stumbling blocks if a password is broken, such as: Secondary authentication programs, which require additional input before granting access to the system • Dialup passwords, which act as a second password when logging in via a modem • Enhanced network authentication systems like Kerberos designed to protect networked systems and fileservers; some of these systems are very complex to install and maintain • Additional authentication−based security identification devices tokens synchronized with the system • The system administrator must be sure that all available measures for system protection are implemented before the decision is made to upgrade a systems security. In doing this, special attention should be paid to the password−related files. It is crucial that each entry in these files includes an encrypted password or asterisk. Entries with empty password fields are extremely dangerous for the system and they represent large security holes in the systems defenses.

8.1.3 File Permissions

The next line of defense against an undesired intruder into the system is the file protection. Properly set file permissions can prevent many potential security problems. Any success in breaking into the system through the passwords defense line is worthless if the protected files the intruder is interested in cannot be reached. Breaking into a user account means access is still restricted from most system resources that require high priority users credentials. The most vulnerable aspects of file protection are the SUID and SGID access modes, because they very often enable superusers access rights. Some UNIX flavors provide additional ways to limit nonroot users access to various system resources. Disk quotas, system resource limits, and printer and batch queue access restrictions protect computer subsystems from unauthorized use. A number of different attackers, which attempt to overwhelm systems by completely consuming their resources, present a permanent threat. They carry different names: bacteria, rabbits, locusts, viruses, worms, and Trojan horses but their intentions are the same. 190 There is one hope against a complete loss of security if the root account is compromised: encryption. For some types of data files, encryption can be a fourth line of defense, providing protection against cracked root and other privileged accounts. Encryption involves a transforming of the original file the plain or clear text using mathematical functions or techniques. Encryption can protect data stored in the files under certain circumstances: Someone breaking into the system typically as the root and copying the data • Someone stealing the disk, or backup tapes or floppies, or the computer itself in an effort to get the data • Someone acquiring the files via a network • Encryption can protect data from being read by unauthorized people, but it cannot prevent their corruption. It cannot prevent an intruder from deleting the data. Most encryption algorithms use some sort of key as part of the transformation, and the same key is needed to decrypt the file later. The simplest kinds of encryption algorithms use external keys that function much like passwords; more sophisticated ones use part of the input data as a portion of the key. UNIX provides a simple encryption program crypt, using an old encryption scheme that is relatively easy to break; cryptimplements a one−rotor machine designed along the lines of the German Enigma, but with a 256−element rotor. Methods of attack on such machines are quite well known. Encryption and decryption are based on the implemented key as an argument that selects a particular transformation. The overall security is based primarily on the choice of the key and its vulnerability keep in mind, the implemented key is visible during the encryption procedure. The encryption could be made a little more secure by running the program multiple times on the same file. Many UNIX flavors offer the Data Encryption Standard DES encryption subsystem as an optional product. DES is generally regarded as very secure, although rumors flourish about supposed built−in weaknesses. DES encrypted files are believed to be breakable, but only at great CPU−time expense.

8.1.5 Backups