Principle of least privilege

Principle of least privilege

In information security, computer science, and other fields, the principle of least privilege, also known as the principle of minimal privilege or just least privilege, requires that in a particular abstraction layer of a computing environment every module (such as a process, a user or a program on the basis of the layer we are considering) must be able to access only such information and resources that are necessary to its legitimate purpose. [Saltzer 75] [Denning 76]

When applied to users, the terms least user access or least-privileged user account (LUA) are also used, referring to the concept that all users at all times should run with as few privileges as possible, and also launch applications with as few privileges as possible.

Usage

The principle of least privilege is widely recognized as an important design consideration in enhancing the protection of data and functionality from faults (fault tolerance) and malicious behavior (computer security).

The principle of least privilege is also known as the principle of least authority (POLA),an alternative term coined by those who consider "authority" be a more precise term than "privilege"to represent "ability to access" in the true spirit of this concept. Specifically, "authority" represents all effects that a subject can directly or indirectly cause in a system, as opposed to "permission" which represents the effects that can be directly caused in a single operation.

In most operating systems, like Windows and Linux, code running in "kernel mode" always runs with maximum privileges; therefore there is no security enforcement. The principle of least privilege therefore demands the use of a user mode solutions when given the choice between a kernel mode and user mode solution if the two solutions provide the same results.

Least privilege is widely misunderstood and, in particular, is almost always confused with the Trusted Computer System Evaluation Criteria concept of Trusted Computing Base minimization. Minimization is a far more stringent requirement that is only applicable to the functionally strongest assurance classes, "viz.", B3 and A1 (which are evidentiarily different but functionally identical). Least privilege is often associated with privilege bracketing, that is, assuming necessary privileges at the last possible moment and dismissing them as soon as no longer strictly necessary, therefore ostensibly avoiding fallout from erroneous code that unintentionally exploits more privilege than is merited. Least privilege has also—and arguably incorrectly—been interpreted in the context of distribution of discretionary access control permissions, even to the point of asserting that, "e.g.", giving user U read/write access to file F violates least privilege if U can complete his authorized tasks with only read permission.

In an archetypal UNIX implementation, processes execute with a potential privilege set and an active privilege set. Such privilege sets are inherited from the parent as determined by the semantics of "fork()". An executable file that performs a privileged function—thereby technically constituting a component of the TCB, and concomitantly termed a trusted program or trusted process may also be marked with a set of privileges, a logical extension of the notions of set user ID and set group ID. The inheritance of file privileges by a process are determined by the semantics of the "exec()" family of system calls. The precise manner in which potential process privileges, actual process privileges, and file privileges interact may be quite involved. In practice, least privilege is practiced by maintaining in the active privilege set only those privileges that are strictly necessary at the time, claiming and dismissing them from the potential privilege set as appropriate. Strict adherence to this model is quite complex as well as error-prone.

Historically, the oldest instance of least privilege is probably the source code of "login.c", which begins execution with super-user permissions and—the instant they are no longer necessary—dismisses them via "setuid()" with a non-zero argument.

User Account Control is an implementation of least user access in Windows Vista and Windows Server 2008.

Benefits

* Better system stability. When code is limited in the scope of changes it can make to a system, it is easier to test its possible actions and interactions with other applications. In practice for example, applications running with restricted rights will not have access to perform operations that could crash a machine, or adversely affect other applications running on the same system.

* Better system security. When code is limited in the system-wide actions it may perform, vulnerabilities in one application cannot be used to exploit the rest of the machine. For example, Microsoft states “Running in standard user mode gives customers increased protection against inadvertent system-level damage caused by "shatter attacks" and malware, such as root kits, spyware, and undetectable viruses.” [http://technet.microsoft.com/en-us/windowsvista/aa906021.aspx]

* Ease of deployment. In general, the fewer privileges an application requires the easier it is to deploy within a larger environment. This usually results from the first two benefits, applications that install device drivers or require elevated security privileges typically have additional steps involved in their deployment, for example on Windows a solution with no device drivers can be run directly with no installation, while device drivers must be installed separately using the Windows installer service in order to grant the driver elevated privileges.

Limitations

According to James Whittaker, in real practice, true least privilege is neither definable nor possible to enforce. [ [http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?tp=&arnumber=1193218&isnumber=26759 James Whittaker, "Why secure applications are difficult to write"] , IEEE Security & Privacy, vol. 1, issue 2, pp. 81-83] We have no method to evaluate a process to define the least amount of privileges it will ever need to perform its functions. That is because it is not possible to know all the values of variables it may process, all the addresses it will need, the precise time it needs etc. The best we can do in practice is restrict its privileges to eliminate some we casually predict that it will never need. This turns out to be far from the minimal set of privileges. This limitation substantially reduces the effectiveness of least privilege enforcement.

According to Barnum and Gegick, another limitation is the granularity of control that the operating environment (secure operating system) over privileges for an individual processes. [ [https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/351.html Least Privilege ] ] In real practice, it is almost never possible to control a process's access to memory, or processing time, or I/O device addresses or modes with the precision needed to eliminate the precise set privileges we can be sure a process will not need. This reduces its usefulness of this principle even more.

History

The original formulation is from Saltzer and Schroeder::"Every program and every user of the system should operate using the least set of privileges necessary to complete the job." ("The protection of information in computer systems", 1974)

Peter J. Denning, in his paper "Fault Tolerant Operating Systems" set it in a broader perspective among four fundamental principles of fault tolerance.

Dynamic assignments of privileges was earlier discussed by Roger Needham in 1972. [Roger Needham, " [Protection systems and protection implementations] ", Proc. 1972 Fall Joint Computer Conference, AFIPS Conf. Proc., vol. 41, pt. 1, pp. 571-578] [Schroeder [http://www.cs.cornell.edu/fbs/publications/leastPrivNeedham.pdf Least Privilege and More] ]

ee also

* Privilege escalation
* Capability and Capabilities vs. ACLs
* Confused deputy problem
* Privilege separation (or bracketing)
* Privilege revocation
* Need to know

References

* Ben Mankin, "The Formalisation of Protection Systems", Ph. D thesis, University of Bath, 2004
*cite journal | author= P. J. Denning |title=Fault tolerant operating systems | journal = ACM Computing Surveys (CSUR) | pages=359–389 | volume =8 | issue = 4 | year=1976| month = December |id=ISSN 0360-0300 | url = http://portal.acm.org/citation.cfm?id=356680&dl=ACM&coll=&CFID=15151515&CFTOKEN=6184618 |doi=10.1145/356678.356680
* cite journal
author = Jerry H. Saltzer, Mike D. Schroeder
title = The protection of information in computer systems
journal = Proceedings of the IEEE
volume = 63
issue = 9
pages = 1278–1308
date=September 1975
url = http://web.mit.edu/Saltzer/www/publications/protection/
doi = 10.1109/PROC.1975.9939

* page 31.

External links

* [http://web.mit.edu/Saltzer/www/publications/protection/ The Saltzer and Schroeder paper cited in the references.]
* [http://cyberforge.com/weblog/aniltj/archive/2004/05/26/544.aspx NSA (the one that implemented SELinux) talks about the principle of least privilege]
* [http://www.sun.com/bigadmin/features/articles/least_privilege.html A discussion of the implementation of the principle of least privilege in Solaris]
* [http://silverstr.ufies.org/blog/archives/000913.html "Proof that LUA makes you safer" by Dana Epp]
* [http://technet.microsoft.com/en-us/library/bb456992.aspx Applying the Principle of Least Privilege to User Accounts on Windows XP, by Microsoft]
* [http://wikis.sun.com/display/BluePrints/Privilege+Bracketing+in+the+Solaris+10+Operating+System Privilege Bracketing in the Solaris 10 Operating System, Sun Microsystems]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Privilege escalation — is the act of exploiting a bug, design flaw or configuration oversight in an operating system or software application to gain elevated access to resources that are normally protected from an application or user. The result is that an application… …   Wikipedia

  • Privilege revocation — is the act of an entity giving up some, or all of, the privileges they possess, or some authority taking those (privileged) rights away. Information theory Honoring the Principle of least privilege at a granularity provided by the base system… …   Wikipedia

  • Privilege (computing) — In computing, privilege is defined as the delegation of authority over a computer system. A privilege is a permission to perform an action. Examples of various privileges include the ability to create a file in a directory, or to read or delete a …   Wikipedia

  • Privilege separation — In computer programming and computer security, privilege separation is a technique in which a program is divided into parts which are limited to the specific privileges they require in order to perform a specific task. This is used to mitigate… …   Wikipedia

  • principle — noun /ˈprɪnsɪpəl,ˈprɪnsəpəl/ a) A fundamental assumption. We need some sort of principles to reason from. b) A rule used to choose among solutions to a problem. The principle of least privilege holds that a process should only receive the… …   Wiktionary

  • Comparison of privilege authorization features — A number of computer operating systems employ security features to help prevent malicious software from gaining sufficient privileges to compromise the computer system. Operating systems lacking such features, such as DOS, Windows implementations …   Wikipedia

  • Privilege of Peerage — The Privilege of Peerage is the body of special privileges belonging to members of the British Peerage, and is distinct from Parliamentary privilege, which applies to only those peers serving in the House of Lords and the members of the House of… …   Wikipedia

  • Legal professional privilege (England & Wales) — In England and Wales, the principle of legal professional privilege has long been recognised by the common law. It is seen as a fundamental principle of justice, and grants a protection from disclosing evidence. It is a right that attaches to the …   Wikipedia

  • Pareto principle — A principle of welfare economics derived from the writings of Vilfredo Pareto , which states that a legitimate welfare improvement occurs when a particular change makes at least one person better off, without making any other person worse off. A… …   Dictionary of sociology

  • POLP — Principle Of Least Privilege …   Glossary of chat acronyms & text shorthand

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”