|
Halting the Hacker. A Practical Guide to Computer Security Authors: Pipkin D.L. Published year: 2002 Pages: 85/210 |
| I l @ ve RuBoard |
Exploiting Permission VulnerabilitiesFile permissions are the primary security problem on most systems. File permissions, even though a simple concept, are often misunderstood. The security of a file is based on both its permissions and the permissions of its parent directory. There are also variations in the implementation of special permission bits and in the implementation of access control lists. Here are some common permission problems that cause security issues. Some Interesting ExamplesIn the following examples the columns in the listing are permissions, user , group , size , time, and file name . The two-line listing indicates the permissions of the directory, indicated by "." and a file in that directory, named file n. This listings could be made by using the command ls -ld . file? These examples illustrate the interaction between the permissions on a directory and the files it contains.
Access Control ListsAccess control lists, ACLs, are lists that indicate which users have what access rights to the information. ACLs were developed to meet the requirement where many selective users and groups need different types of access to files. ACLs provide a mechanism by which file access privileges can be defined for selected users and groups. ACLs are an extension to the UNIX mode bits, required for "B3" security rating, allowing for more granularity of access control by allowing specific permissions to be applied to specified users. ACLs are defined as triples with the first element being a user identifier, the second, a group, and the third, permissions. ACLs are available on some UNIX systems. However, currently there are no standards on how ACLs are implemented. Many implementations regard them as an addition to the mode bits so that if a user does not get access with the UNIX permission bits, the ACLs are checked to see if the user can be granted permission. Some implementations may test the ACLs before the UNIX mode bits. The ACLs may grant permissions on the basis of the first ACL that the user matches, therefore making them order-dependent, or they may define a "best match" for the user and grant those permissions. Some implementations add the ACLs as an additional lock so that you must successfully pass both the UNIX mode bits and the ACLs. Posix ACLsPosix ACLs were defined in the IEEE 1003.1 POSIX standards for discretionary access controls. ACLs did not gain broad acceptance with UNIX vendors . However, recently more systems are becoming available with ACLs, many of which do not comply with this standard. There are a number of projects in the Linux arena which are involved with implementing ACLs for a Linux file system. The VERITAS File System ¢ (VxFS ), which is also known as the Journaled File System, or JFS, implements POSIX ACLs. HP JFS 3.3 is included with HP-UX 11i. ACLs are supported as a superset of the UNIX operating system discretionary access control (DAC) mechanism for files, but not for other objects such as inter-process communication (IPC) objects. ACLs allow the file owner or superuser to permit or deny access to a list of users and groups other than the file owner and owning group, which is available through permission bits. An access control list (ACL) consists of a set of one-line entries associated with a file that specifies permissions. Each entry specifies for one user-ID or group-ID a set of access permissions, including read, write, and execute/search.
HP-UX HFS ACLsACLs were first implemented on HP-UX on the HFS file system. These ACLs are not Posix-compliant. However, they offer the same basic capabilities to limit access to files by specific users and groups. With HSF ACLs, an additional 13 sets of file access permissions can be defined above the standard three sets of permissions (owner, group, world) that are provided with standard UNIX operating systems. The notation used with ACLs to define file access is: (user.group, permissions) where the following symbols can be used in the user.group fields: %Any user or any group @The current file owner or current file group * Used for ACL pattern matching, includes % and @ Some standard UNIX commands have additional parameters, such as the "-acl" option to the find command, or new commands which perform the same function on files with ACLs have been created, such as the lsacl command which performs a ls displaying ACLs. Not using the appropriate command or command option may lead to the accidental deletion of the ACLs. Changing the ACLs on a file is done with the chacl command. The chacl command allows file permissions to be granted or restricted to specific users or groups. The following example shows two ACLs being added for myfile : chacl "(%.bio,r--)" myfile chacl "(alex.%,r--)" myfile The chacl command can also be used to delete an existing ACL: chacl d "(%.bio,r--)" myfile Use the following syntax to replace all existing ACLs on a file with a new set of ACLs: chacl -r "(%.users,r-x)" myfile It is also possible to copy ACLs from one file to another: chacl -f myfile myfile2 Finally, if a file's ACLs are no longer needed, they may be zapped with the following: chacl -z myfile Mandatory Access ControlsMandatory access controls, MAC, are a layer of security on top of discretionary access controls. Mandatory access controls cannot be changed by the users; the system enforces MAC consistently. Each access control method must grant access before access is given. If any of the methods denies access, then access is denied. Even though most UNIX vendors have a secure UNIX operating system that has mandatory access control for government accounts, few bring these security features into their business UNIX offerings for commercial accounts. Hewlett-Packard offers a couple of operating system options which provide MAC controls.
|
| I l @ ve RuBoard |
|
|
|
Halting the Hacker. A Practical Guide to Computer Security Authors: Pipkin D.L. Published year: 2002 Pages: 85/210 |
![]() Forensic Accounting and Fraud Examination | ![]() Principles of Incident Response and Disaster Recovery | ![]() Guide to Computer Forensics and Investigations |
![]() Forensic Accounting and Fraud Examination | ![]() Principles of Incident Response and Disaster Recovery |
![]() Guide to Computer Forensics and Investigations |