



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




1
Fred B. Schneider Cornell University, Ithaca, New York, USA
What today is known as the Principle of Least Privilege was described as a design principle in a paper by Jerry Saltzer and Mike Schroeder [4] first submitted for publication roughly 30 years ago:
âf) Least privilege: Every program and every user of the system should operate using the least set of privileges necessary to complete the job. Primarily, this principle limits the damage that can result from an accident or error. It also reduces the number of potential interactions among privileged programs to the minimum for correct operation, so that unintentional, unwanted, or improper uses of privilege are less likely to occur. Thus, if a question arises related to misuse of a privilege, the number of programs that must be audited is minimized. Put another way, if a mechanism can provide âfirewalls,â the principle of least privilege provides a rationale for where to install the firewalls. The military security rule of âneed-to-knowâ is an example of this principle.â
The power of this principle comes from leaving unspecified how frequently privileges might change and their granularity. Back in 1972, Roger Needham certainly understood the value of support for dynamic assignments of privileges, writing [3]:
âProtection regimes are not constant during the life of a process. They may change as the work proceeds, and in a fully general discussion they should be allowed to change arbitrarily. Statements would be allowed, for example, to the effect that certain segments were only accessible if the value standing in a system microsecond clock were prime. In practice one departs from full generality, and limits those circumstances which may give rise to a change of protection regime.â
My own interest in the Principle of Least Privilege developed in connection with devising security enforcement mechanisms for systems structured in terms of a base and a set of extensions which augment the functionality of that base. Such extensible systems are prevalent today in mass-market PC software, where we see new hardware being accommodated in Microsoft Windows platforms through âplug and playâ and we see web
1 Supported in part by AFOSR grant F49620-00-1-0198, Defense Advanced Research Projects Agency (DARPA) and Air Force Research Laboratory Air Force Material Command USAF under Agreement number F30602-99-1-0533, National Science Foundation Grant 9703470, and ONR Grant N00014-01-1-
browsersâhence, the web itselfâsupporting new data formats by use of downloaded âhelper appsâ that extend a browserâs functionality.
A misbehaving extension Ext has the potential to compromise the base system B it extends. Examples abound: email containing executable attachments, Microsoft Word documents bearing hostile macros, and new browser âhelper appsâ that are a far cry from being helpful. This situation could be improved if we posit some sort of reference monitor that intercepts all program actions and, based on privileges held by the issuer of the action, blocks those that would be disruptive. However, to make this vision a reality, two technical questions must be solved:
(1) Implementing the reference monitor. (2) Determining a policy for it to enforce.
Regarding (1), my collaborators and I have elsewhere reported success with program rewriters to modify an object program before execution, adding tests that effectively in- line a fine-grained reference monitor [2]. This paper sketches my current thinking on (2).
Least privilege. Policies consistent with the Principle of Least Privilege depend not only on the code to be executed but also on what job that code is intended to do. For an extension Ext and some specification ÎŁ Ext of a job to be done, we define ÎźPriv ( Ext, ÎŁ Ext ) to be the policy that grants the minimum privileges needed for execution of Ext to satisfy ÎŁ Ext. (A policy here is a mapping from system histories to sets of privileges.) As an example, specification ÎŁ Ext of a spell-checker extension Ext for a word processor might specify that misspelled words be flagged in the word processorâs open file F ; we would then expect ÎźPriv ( Ext, ÎŁ Ext ) to be a policy that permits the spell-checker read (but not write) access to F , read (but not write) access to a file containing a spelling dictionary, and read/write access to a file containing user-added spellings for local jargon terms.
It is clear how the base system comes to get an extension Ext , but how does it get ÎźPriv ( Ext, ÎŁ Ext ) for use by its reference monitor? Here are two possible approaches.
(1) The base system could itself compute ÎźPriv ( Ext, ÎŁ Ext ). (2) The base system could fetch ÎźPriv ( Ext, ÎŁ Ext ) from some site S.
Approach (1) presumes that ÎźPriv ( Ext, ÎŁ Ext ) can be computedâa questionable supposition. Implicit in computing ÎźPriv ( Ext, ÎŁ Ext ) is establishing that extension Ext satisfies specification ÎŁExt , and we know that question cannot be decided for general- purpose programming and specification languages. There might exist specialized languages, however, for which ÎźPriv ( Ext, ÎŁ Ext ) could be computed; this is a research question that bears closer scrutiny. One might start by restricting consideration to specifications ÎŁ Ext that are safety properties, because the language of specifications now can be restricted to state predicates that hold throughout system execution. The weakest precondition ( wp ) predicate transformer might then provide a starting point for defining ÎźPriv by structural induction on Ext.
Approach (1) also presumes that ÎŁ Ext is known. This, too, is a supposition of dubious practicality. Since extensions are generally downloaded with some expectation of the job they are intended to do, one might suspect that a high-level, task-oriented specification
Notice that in this alternative to ÎźPriv ( Ext, ÎŁ Ext ), a single policy is being employed, independent of extension Ext. The problems of deciding what specification ÎŁ Ext to use with a given extension Ext is thus eliminated. But the use of a single policy for all extensions implies that the policy being enforced might not be as restrictive as it could be (thereby admitting attacks) or might be too restrictive (thereby ruling-out execution of certain extensions). And there is thus some flexibility in formulating a policy for a given base.
The articulation of abstractions and principles is an important facet of doing research in computing systems. An implementation is certainly one way to demonstrate the utility of a new systems abstraction or principle, with system performance a sensible figure of merit. However, some abstractions are useful even though they cannot be implemented. Beladyâs optimal page replacement policy [1], which involves predicting future memory references and therefore is unrealizable in practice, is one example. The Principle of Least Privilege might be another, offering value primarily as a benchmark against which to compare policies that are being enforcedâwhen compared with ÎźPriv ( Ext, ÎŁ Ext ), a deployed policy would be considered inferior if it either admits additional attacks or it excludes certain classes of extensions.
The classical approach to computer securityâaddress space isolation associated with processesâwould seem a good place to start in a comparison of security policies for extensible systems. It isnât. The context switches required on modern processors for communication and synchronization between separate processes make it impractical to have fine-grained interaction between a base implemented as one process and an extension as another. Without the possibility of such fine-grained interaction, the set of functions that can be implemented as extensions becomes quite limited.
But with in-lined reference monitors, different programs can be isolated from each other without incurring the high cost of context switches. In fact, many forms of fine-grained access control that are not practical with traditional reference monitors become practical with in-lined reference monitors. Another concern now confronts us, though: How best to exploit the flexibility. To make progress here, not only must we learn the art of writing policies but we must also develop the mathematical tools for analyzing them. Collections of weak policies are likely to provide workable defenses for broad sets of extensions, for example. Weak policies might well be easier for humans to understand, too. Exactly how these advantages trade with the âsecurityâ ÎźPriv ( Ext, ÎŁ Ext ) provides is the ultimate question. For the present, however, it seems that practical protection for extensible systems is most easily obtained using policies that grant more privileges than would ÎźPriv ( Ext, ÎŁ Ext )âthe least privilege and more.
Acknowledgments. Helpful comments on a preliminary draft of this paper were provided by Lorenzo Alvisi, Butler Lampson, Greg Morrisett, Andrew Myers, and Mike Schroeder.