Docsity

Design Principles for Security, Exams of Computer Networks

Toggle sidebar
bg1
ISI-TR-605
NPS-CS-05-010
| SecureCore Technical Report
Trustworthy Commodity Computati on and
Communication
Design Principles for Security
Terry V. Benzel, Cynthia E. Irvine, Timothy E. Levin, Ganesha Bhaskara,
Thuy D. Nguyen, and Paul C. Clark
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download Design Principles for Security and more Exams Computer Networks in PDF only on Docsity!

ISI-TR- 605 NPS-CS- 05 - 010

| SecureCore Technical Report

Trustworthy Commodity Computation and Communication

Design Principles for Security

Terry V. Benzel, Cynthia E. Irvine, Timothy E. Levin, Ganesha Bhaskara,

Thuy D. Nguyen, and Paul C. Clark

Design Principles for Security ii This material is based upon work supported by the National Science Foundation under Grant No. CNS-0430566 and CNS-0430598 with support from DARPA ATO. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation or of DARPA ATO. Author Affiliations Naval Postgraduate School: Cynthia E. Irvine, Timothy E. Levin, Thuy D. Nguyen, and Paul C. Clark Center for Information Systems Security Studies and Research Computer Science Department Naval Postgraduate School Monterey, California 93943 USC Information Sciences Institute: Terry V. Benzel and Ganesha Bhaskara Information Sciences Institute University of Southern California 4676 Admiralty Way, Suite 1001 Marina del Rey, Ca 90292

Design Principles for Security iv Include Security in Design from the Start 19 The Philosopher’s Stone 19 Other Approaches to Secure System Composition 20 The Reference Monitor 20 Conflicts in Design Principles 20 REFERENCES AND BIBLIOGRAPHY 21

Design Principles for Security Trustworthy Commodity Computation and Communication 1 I. Introduction Security vulnerabilities are rampant throughout our information infrastructures. The majority of commodity computing and communication platforms have been designed to meet performance and functionality requirements with little attention to trustworthiness. The transformation of traditional stand-alone computers into highly networked, pervasive, and mobile computing systems profoundly increases the vulnerabilities of current systems, and exacerbates the need for more trustworthy computing and communications platforms. While there is a significant history of secure systems design and development focusing on one or more of the triad of hardware, networking and operating systems, there are few worked examples [20]. To date, only special purpose systems begin to meet the requirements to counter either the modern or historical threats. In spite of over thirty years of research and development, a trustworthy product built at the commodity level remains elusive. The SecureCore project is designing a secure integrated core for trustworthy operation of mobile computing devices consisting of: a security-aware processor, a small security kernel and a small set of essential secure communications protocols. The project is employing a clean slate approach to determine a minimal set of architectural features required for use in platforms exemplified by secure embedded systems and mobile computing devices. In addition to security, other factors including performance, size, cost and energy consumption must all be reasonably accounted for when building a secure system. These factors are especially important for viability in the commodity market, where client computing devices have constrained resources but high performance requirements. Our goal is not security at any price, but appropriate levels of security that permit desirable levels of performance, cost, size and battery consumption. As a prelude to our clean-slate design, we have reviewed the fundamental security principles from more than four decades of research and development in information security technology. As a result of advancing technology, we found that some of the early “principles” require re-examination. For example, previous worked examples of combinations of hardware, and software may have encountered problems of performance and extensibility, which may no longer exist in today’s environment. Moore’s law in combination with other advances has yielded better performance processors, memory and context switching mechanisms. Secure systems design approaches to networking and communication are beginning to emerge and new technologies in hardware-assisted trusted platform development and processor virtualization open hither to previously unavailable possibilities. Our analysis of key principles for secure computing started with the landmark work of Saltzer and Schroeder [25] and surveyed the refinement of these principles as systems have evolved to the present. This report provides a distillation, synthesis and organization of key security systems design principles, describes each principle, and provides examples where needed for clarity. Although others have described various principles and techniques for the development of secure systems, e.g. [3], [9], [22], [24],

Design Principles for Security Trustworthy Commodity Computation and Communication 3 Reference Monitor Concept : an access control concept that refers to an abstract machine that mediates all accesses to objects by active entities. By definition, the ideal mechanism is protected from unauthorized modification and can be analyzed for correctness [2]. Security Mechanisms: system artifacts that are used to enforce system security policies. Security Principles: guidelines or rules that when followed during system design will aid in making the system secure Security Policies: Organizational Security Policies are “the set of laws, rules, and practices that regulate how an organization manages, protects, and distributes sensitive information.” [28] System Security Policies are rules that the information system enforces relative to the resources under its control to reflect the organizational security policy. In this document, “security policy” will refer to the latter meaning, unless otherwise specified. Service : processing or protection provided by a component to users or other components. E.g., communication service (TCP/IP), security service (encryption, firewall). Trustworthy (noun): the degree to which the security behavior of the component is demonstrably compliant with its stated functionality (e.g., trustworthy component). Trust : (verb) the degree to which the user or a component depends on the trustworthiness of another component. For example, component A trusts component B, or component B is trusted by component A. Trust and trustworthiness are assumed to be measured on the same scale. B. Security Design Principles Overview Security design principles can be organized into logical groups, which are illustrated in Figure 1. The logical groupings for the principles are in shaded boxes whereas the principles appear in clear boxes. For example, Least Privilege is a principle and appears grouped under Structure/Trust. In the case of “Secure System Evolution,” the principle is in its own group.

4 Figure 1. Taxonomy of security design principles II. Structure Structural design principles affect the fundamental architecture of the system: how the components relate to each other and the nature of their interfaces. We start with the fundamental need for economy and elegance in a system. A. Economy and Elegance Least Common Mechanism The principle of least common mechanism states that if multiple components in the system require the same function or mechanism, then there should be a common mechanism that can be used by all of them. Thus, the various components do not have Least Common Mechanism Clear Abstractions Partially Ordered Dependencies Efficiently Mediated Access Minimized Sharing Reduced Complexity Economy and Elegance Secure System Evolution Trusted Components Hierarchical Trust for Components. Inverse Modification Threshold Hierarchical Protection Minimized Security Elements Least Privilege Self-Reliant Trustworthiness Trust Secure Distributed Composition Trusted Communication Channels Composition Structure Secure Defaults Secure Failure Self Analysis Accountability and Traceability Continuous Protection of Information Economic Security Performance Security Ergonomic Security Acceptable Security Logic and Function Repeatable, Documented Procedures Procedural Rigor Secure System Modification Sufficient User Documentation System Life Cycle

Security Design Principles

6

[26].

Partially ordered dependencies and system layering contribute significantly to the simplicity and coherency of the system design (see also “Assurance through Reduced Complexity”). Efficiently Mediated Access The mediation of access to resources is often the predominant security function of security systems, which can result in performance bottlenecks if the system is not designed correctly. The principle of efficiently mediated access [1] states that the access control mechanism for each subset of the policy should be performed by the most efficient system mechanism available while respecting layering and still meeting system flexibility requirements. A good example of this is the use of hardware memory management mechanisms to implement various access control functions, e.g. [10], [27]. Minimized Sharing The principle of minimized sharing states that no computer resource should be shared between components or subjects (e.g., processes, functions, etc.) unless it is necessary to do so. Minimized sharing helps to simplify the design and implementation. It is evident that in order to protect user-domain information from active entities, no information should be shared unless that sharing has been explicitly requested and granted (see also “Secure Defaults”). For internal entities, sharing can be motivated by the principle of least common mechanism, as well as to support user-domain sharing. However, internal sharing must be carefully designed to avoid performance and covert channel problems [17]. There are various mechanisms to avoid sharing and mitigate the problems with internal sharing. To minimize the sharing induced by common mechanisms, they can be designed to be re- entrant or virtualized , so that each component depending on that mechanism will have a virtual private data space. Virtualization logically partitions the resource into discrete, private subsets for each dependent component. The shared resource is not directly accessible by the dependent components. Instead an interface is created that provides access to the private resource subsets. Practically any resource can be virtualized, including the processor, memory and devices. Encapsulation is a design discipline or compiler feature for ensuring there are no extraneous execution paths for accessing the private subsets (see also “information hiding,” under Secure System Evolution). Some systems use global data to share information among components. A problem with this approach is that it may be difficult to determine how the information is being managed [31]. Even though the original designer may have intended that only one component perform updates on the information, the lack of encapsulation allows any component to do so. To avoid covert timing channels, in which the processor is one of the shared components, a scheduling algorithm can ensure that each depending component is allocated a fixed amount of time [11]. A development technique for controlled sharing is to require the execution durations of shared mechanisms (or the mechanisms and data structures that determine its duration), to be explicitly stated in the design specification, so that the effects of sharing can be verified.

Design Principles for Security Trustworthy Commodity Computation and Communication 7 Reduced Complexity Given the current state of the art, a conservative assumption must be that every complex system will contain vulnerabilities, and it will be impossible to eliminate all of them, even in the most highly trustworthy of systems. Application of the principle of reduced complexity contributes to the ability to understand the correctness and completeness of system security functions, and facilitates identification of potential vulnerabilities. The corollary of reduced complexity states that the simpler a system is, the fewer vulnerabilities it will have. An example of this is a bank auto teller, which, due to the simplicity of its interface (a very limited set of requests), has relatively few functional security vulnerabilities compared to many other widely used security mechanisms. From the perspective of security, the benefit to this simplicity is that it is easier to understand whether the intended security policy has been captured in the system design. For example, at the security model level, it can be easier to determine whether the initial system state is secure and whether subsequent state changes preserve the system security properties. B. Secure System Evolution The principle of secure system evolution states that a system should be built to facilitate the maintenance of its security properties in the face of changes to its interface, functionality structure or configuration. These changes may include upgrades to the system, maintenance activities, reconfiguration, etc. (see also, Secure System Modification, and Secure Failures). The benefits of this principle include reduced lifecycle costs for the vendor, reduced cost of ownership for the user, as well as improved system security. Just as it is easier to build trustworthiness into a system from the outset (and for highly trustworthy systems, impossible to achieve without doing so), it is easier to plan for change than to be surprised by it. Although it is not possible to plan for every possibility, most systems can anticipate maintenance, upgrades, and changes to their configurations. For example, a component may implement a computationally intensive algorithm. If a more efficient approach to solving the problem emerges, then if the component is constructed using the precepts of modularity and information hiding [14], [15], [23], it will be easier to replace the algorithm without disrupting the rest of the system. Rather than constructing the system with a fixed set of operating parameters, or requiring a recompilation of the system to change its configuration, startup or runtime interfaces can provide for reconfiguration. In the latter case, the system designer needs to take into account the impact dynamic reconfiguration will have on secure state. Interoperability can be supported by encapsulation at the macro level: internal details are hidden and standard interfaces and protocols are used. For scalability, the system can be designed so that it may easily accommodate more network connections, more or faster processors, or additional devices. A measure of availability can be planned into the system by replication of services and mechanisms to manage an increase in demand, or a failure of components. Constructing a system for evolution is not without limits. To expect that complex systems will remain secure in contexts not envisioned during development, whether

Design Principles for Security Trustworthy Commodity Computation and Communication 9 sec_depend(a, b) ⇒ trust (a,b) > 0) trustworthy(a: component): t /* a is trustworthy to the degree of t / axiom 3.. ∀ a, b:component( / sub-component trustworthiness */ subcomponent(a,b) ⇒ trustworthy(b) ≤ trustworthy(a)) Principle of trusted components. ∀ a:component( ∃ b:component (sec_depend(a,b) ⇒ trust(a,b) ≤ trustworthy(b))) Hierarchical Trust for Components The corollary of hierarchical trust for components states that the security dependencies in a system will form a partial ordering if they preserve the principle of trusted components. To be able to analyze a system comprised of heterogeneously trustworthy components for its overall trustworthiness, it is essential to eliminate circular dependencies with regard to trustworthiness. Clearly, if a more trustworthy component located in a lower layer of the system were to depend upon a less trustworthy component in a higher layer, this would, in effect, put them in the same equivalence class: less trustworthy. Trust chains have various manifestations. For example, the root certificate of a certificate hierarchy is the most trusted node in the hierarchy, whereas the leaves may be the least trustworthy nodes in the hierarchy. Another example occurs in a layered high assurance secure system where the security kernel (including the hardware base), which is located at the lowest layer of the system, is the most trustworthy component. This principle does not prohibit the use of overly trustworthy components. For example, in a low-trust system the designer may choose to use a highly trustworthy component, rather than one that is less trustworthy because of availability or other criteria (e.g., an open source based product might be preferred). In this case, the dependency of the highly trustworthy component upon a less trustworthy component does not degrade the overall trustworthiness of the resulting system. Inverse Modification Threshold The corollary of inverse modification threshold states that the degree of protection provided to a component must be commensurate with its trustworthiness. In other words, as the criticality of (i.e., trust in) a component increases, the protections against its unauthorized modification should also increase. This protection can come in the form of the component’s own self-protection and trustworthiness, or from protections afforded to the component from other elements or attributes of the architecture. Unauthorized modification could take place through penetration of the component (e.g., an attack that

10 bypasses the intended interfaces), misuse of poorly designed interfaces, or from surreptitiously placed trapdoors. Techniques to show the absence of trapdoors and penetration vulnerabilities can be applied to the construction of highly trustworthy components. Examples of the application of this principle can be seen in the hardware, microcode, and low level software of trustworthy systems: none of these elements is easy to modify. Hierarchical Protection The principle of hierarchical protection states that a component need not be protected from more trustworthy components. In the degenerate case of the most trusted component, it must protect itself from all other components. In another example, a trusted computer system need not protect itself from an equally trustworthy user, reflecting use of untrusted systems in “system high” environments where the users are highly trustworthy. Minimized Security Elements The principle of minimized security elements states that the system should not have extraneous trusted components. This principle has two aspects: cost and complexity of security analysis. Trusted components, necessarily being trustworthy, are generally more costly to construct, owing to increased rigor of development processes (see “Procedural Rigor”). They also require greater security analysis, to qualify their trustworthiness. Thus, to reduce cost, and decrease the complexity of the security analysis, a system should contain as few trustworthy components as possible. The analysis of the interaction of trusted components with other components of the system is one of the most important aspects of the verification of system security. If these interactions are unnecessarily complex, the security of the system will also be more difficult to ascertain than one whose internal trust relations are simple and elegantly constructed. Generally, fewer trusted components will result in fewer internal trust relationships and a simpler system. For example, a novice multilevel secure system designer may be tempted to solve every security problem with one or more “trusted subjects,” creating a system that is unnecessarily complex. Least Privilege The principle of least privilege states that each component should be allocated sufficient privileges to accomplish its specified functions, but no more. This limits the scope of the component’s actions, which has two desirable effects: (1) security impact of a failure of corruption of the component will be minimized, and (2) the security analysis of the component will be simplified. The result is a safer and more understandable system. Least privilege is such a pervasive principle that it is reflected in all aspects of the system. For example, interfaces may be constructed that are available to only certain subsets of the user population. In the case of an audit mechanism, there may be an interface for the audit manager, who configures the audit settings; an interface for the audit operator, who ensures that audit data is safely collected and stored; and, finally, yet another interface for the audit reviewer.

12 In another example, consider a distributed system in which all subjects and objects are associated with labels from a sensitivity hierarchy of Top Secret (TS), Secret (S), Confidential (C), Unclassified (U), and the usual multilevel mandatory access control policy is enforced. Also, since the system components are not very trustworthy, each component may only present to users information with “adjacent” sensitivity (e.g., component A handles TS and S, and component B handles S and C), so that in the event of leakage, the information does not leak too “far.” The networking (i.e., composition) of components A and B can result in a “cascade” of sensitivities such that if A leaks TS information to an S user, TS information can wind up on B, presenting users with a wider range of sensitivities than the system policy allows [20]. Thus, to ensure correct system-wide level of confidence of correct policy enforcement, enforcement, the security architecture of a distributed composite system must be thoroughly analyzed. Trusted Communication Channels The principle of secure communication channels states that when composing a system where there is a threat to the communication between components, each communications channels must be trustworthy to a level commensurate with the security dependencies it supports (i.e., how much it is trusted to perform its security functions by other components). Several techniques can be used to mitigate threats, and enhance the trustworthiness of communication channels. Three are discussed here. First, use of the channel may be restricted by protecting access to it with a suitable access control mechanism such as a reference monitor located beneath or within each component. By controlling and limiting access to the channel, possible misuse of the channel can be reduced. In addition, the components with authorized access to the channel may be more trustworthy than other components. Second, end-to-end communications technologies, such as encryption, may be used to eliminate security threats in the channel's physical environment. In some cases, an alternative to platform-based encryption is the use of in-line encryption devices. When such devices are employed, they must be at least as trustworthy as the reference monitors of the linked components. Finally, intrinsic characteristics assumed for and provided by the channel must be specified. With such documentation, it is possible for system designers to understand the nature of the channel as initially constructed and to assess the impact of any subsequent changes to the system. III. Logic and function The principles associated with logic and function are applicable at both the system and component level. Secure defaults The principle of secure defaults applies to the initial configuration of a system as well as to the negative nature of access control and other security functions. First, the “as

Design Principles for Security Trustworthy Commodity Computation and Communication 13 shipped” configuration of a system or component should not aid in violation of security policy. There have been many examples in recent years of commercial systems that have arrived in a configuration that was not adequately self-protective, resulting in security breaches before the correct configuration could be established. Some examples of mechanisms for which secure initial configuration may apply are audit, firewalls and passwords. The second part of this principle says that security mechanisms should deny requests (e.g., to obtain access to a file) unless the request is found to be well formed and consistent with the security policy. The alternative is to allow a request unless it is shown to be inconsistent with the policy. In a large system, the conditions that must be satisfied to grant a request that is by default denied are often far more compact and complete than those that would need to be processed to deny a request that is by default granted (for example, consider the filtering rules in a firewall). Secure Failure The principle of secure failure states that a failure in a system function or mechanism should not lead to violation of security policy. Failure is a condition in which a component’s behavior deviates from its specified behavior for an explicitly documented input ( unspecified behavior , which includes response to inputs that do not conform to specification, is addressed in IV). Ideally, the system should be capable of detecting failure at any stage of operation (initialization, normal operation, shutdown, maintenance, error detection and recovery) and take appropriate steps to ensure security policies are not violated. Once a failed security function is detected, the system may reconfigure itself to circumvent the failed component, while maintaining security, and still provide all or part of the functionality of the original system, or completely shut itself down to prevent any (further) violation in security policies. For this to occur, the reconfiguration functions of the system should be designed to ensure continuous enforcement of security policy during the various phases of reconfiguration. Another mechanism that can be used to recover from failures is to rollback to a secure state (which may be the initial state) and then either shutdown or replace the service or component that failed with orthogonal or replicated mechanisms. Failure of a component may or may not be detectable to the components using it. This principle indicates that components should fail in a state that denies rather than grants access. For example, a nominally “atomic” operation interrupted before completion should not break security policy and hence must be designed to cope with interruption events by employing higher level atomicity and rollback mechanisms such as transactions, etc. If a service is being used, its atomicity properties must be well documented and characterized so that the component availing itself of that service can detect and handle interruption events appropriately. For example, a system should be designed to gracefully respond to disconnection and support resynchronization and data consistency after disconnection. Replication of policy enforcement mechanisms, sometimes called “defense in depth,” can allow the system to continue securely even when one mechanism has failed to protect the

Design Principles for Security Trustworthy Commodity Computation and Communication 15 path or component that allowed the violation of security policy. Continuous Protection of Information Principle of continuous protection of information states that information protection required by the security policy (e.g., access control to user-domain objects) or for system self-protection (e.g., maintaining integrity of kernel code and data) must be protected to a level of continuity consistent with the security policy and the security architecture assumptions. No guarantees about information integrity, confidentiality or privacy can be made if it is left unprotected while under control of the system (i.e., during the creation, storage, processing or communication of the information and during system initialization, execution, failure, interruption, and shutdown). Following the precepts of the reference monitor [2], to provide continuous enforcement of the security policy, every request must be validated, and the reference monitor must protect itself. Invalid requests should not result in a system state such that the system cannot properly enforce the security policy. The principle of secure failure also applies here in that it involves a roll back mechanism that can return the system to a secure state. To ensure protection, parameters at interfaces must be chosen so that security critical values are provided by more trustworthy components. In addition, at the interface to a security mechanism, the security-relevant operation should appear atomic. This will eliminate time-of-check-to-time-of-use vulnerabilities. Cryptography is one of the primary mechanisms used to protect information in transit and in storage. To protect information during computation various low-level hardware mechanisms can be used such as instructions that enable switching contexts atomically and mechanisms that enable memory protection. In some environments, it is desirable to allow the system security policies to be “modifiable” at runtime, for example to adjust to catastrophic external events. Changes to policies must not only be traceable but also verifiable, i.e., must be possible to verify that the changes do not violate security policies. The system architect should understand the consequences of allowing modifiable policies in a system i.e., depending on the type of access control and the actions that are allowed and controlled by the policies, certain configuration changes may lead to inconsistent states or discontinuous protection due to the complex or undecidable nature of the problem. One approach to this problem is the use of pre-verified configuration definitions where the transition from old to new policies is effectively atomic and any residual effects from the old policy are guaranteed to not conflict with the new policy. Economic Security The principle of economic security states that security mechanisms whose strength is commensurate with the level of trustworthiness should be used in components that enforce security policies. Mechanisms involved in the enforcement of security policies incur computation and resource overhead. The strength of the mechanisms must be sufficient to satisfy the system requirements. Using security mechanisms of greater strength than necessary may

16 unnecessarily incurs extra overhead. For example, if a 2048 bit key may be sufficient to satisfy the requirements for policy enforcement, a 4096 bit key, though relatively more secure, only incurs more computation overhead unnecessarily. Another prudent design guideline is that the security mechanisms used to protect an entity should be no more expensive than the entity itself, i.e., the security mechanism should not be more costly than the expected damage of a security breach. However, designers should remember that when trust chains are involved, the overall trustworthiness requirement determines the strength of mechanism needed, as the system is no more trustworthy than the least trustworthy mechanism in the chain. Mechanisms that aid in enforcement of security may utilize many basic building blocks. Cryptography is often one of many mechanistic choices. Because it is computationally intensive, it has to be used sparingly and only when other, simpler mechanisms are insufficient. Even when encryption is used, the strength of encryption must be selected appropriately after considering key storage, key exchange, exposed attack space etc. Application of this principle reinforces the requirement to design the system from the ground up, i.e., to incorporate simple mechanisms at the lower layers that can be used as building blocks for higher level mechanisms. Performance Security The principle of performance security states that security mechanisms should be constructed so that they do not degrade system performance unnecessarily. A corollary to this principle is that the demand for performance and functionality should not blind the system designer to system security requirements. For example, in a banking system, an animated user interface may not be as critical as protecting user’s financial assets. There is often a tradeoff between functionality and performance. The more functionality a system has, the more generic its components must be, and hence the system will be less optimized to perform specific functions. Similarly, there may be a tradeoff between performance and enforcement of security policy. On one extreme, complete elimination of all security checks may provide slight performance improvements. However, if enforcement of security policy is one of the intended goals for the system, the system should be designed such that enforcement of security policy does not significantly degrade system performance. This forces the designer to incorporate mechanisms that aid in enforcement of security policy, but incur minimum overhead, such as low-level atomic mechanisms on which higher level mechanisms can be built. Such low level mechanisms are usually very specific, have very limited functionality, and are heavily optimized for performance. For example, once access rights to a portion of memory is granted, hardware mechanisms may be used to ensure that all further accesses involve the correct memory address and access mode [10]. Ergonomic Security The principle of ergonomic security states that the user interface for security functions and supporting services should be intuitive and user friendly, and provide appropriate feedback for user actions that affect policy and its enforcement. The mechanisms that enforce security policy should not be intrusive to the user and should be designed not to