Harvard Cs252r Fa'13
Total Page:16
File Type:pdf, Size:1020Kb
Type Enforcement & Pluggable MAC Harvard CS252r Fa’13 Tuesday, October 22, 13 1 Practical Domain and Type Enforcement for UNIX • Badger, et al. 1995 • Trusted Information Systems Tuesday, October 22, 13 2 Domain and Type Enforcement • Every Subject is associated with a Domain • Every Object is associated with a Type Tuesday, October 22, 13 3 Boebart and Kain ’85 [7], page 23 introduces this a given user could have multiple subjects operating in diferent domains dynamically, it seems a subject and an object are associated with just one, statically: could be anything Domain and Type Enforcement • Domain Definition Table • Domain’s Access Rights to each Type • read, write, etc. • Domain Interaction Table • Domain’s Access Rights to other Domains • signal, create, destroy, etc. Tuesday, October 22, 13 4 Domain and Type Enforcement • Strict Superset of Lattice-Expressible Security Policies Tuesday, October 22, 13 5 Domain and Type Enforcement Manager budget designs Accountant Engineer salary Tuesday, October 22, 13 6 DTEL Domain and Type Enforcement Language • Encompasses Existing Security Policies • Hierarchical Types • Simple, Declarative Language Tuesday, October 22, 13 7 DTEL Operating System Entities File Hierarchy Process Hierarchy Figure 1: Mismatch Between Policy Concepts and System Structures trol configurations. A DTE specification includes ration: the type statement, the domain statement, the security attribute associations such as typelfile tnitial-domain statement, and the assign statement.’ associations as well as other access control in- The purpose of this section is not to fully document Tuesday,formation. October 22, 13 The language provides a high-level DTEL, but to demonstrate through a small example 8 view of information traditionally enurnerated in that a meaningful DTEL policy can be expressed com- type enforcement tables and includes facilities pletely in a form simple and concise enough to be ad- for superimposing security attribute bindings and ministered at reasonable cost. Our metric for “reason- domain transitions on applications that are not able cost” is that policy administration should be no aware of DTE. more difficult than routine UNIX administration tasks such as configuring remote file systems or adding user 2. During system execution, DTE file security at- accounts. To validate that our example policy is not tributes are maintained “implicitly” in a form trivial, we have run it on our prototype DTE system that capitalizes on intrinsic object hierarchies and found it to provide useful protection. We now in- (e.g., directories of files) to concisely represent se- troduce the primary DTEL statements in the context curity attributes. Implicit typing simplifies secu- of a commercial policy designed to provide protection rity configuration establishment and removes the and separation for enterprise data types and user au- need to physically store a type label with every thorizations in an engineering organization file. This permits DTE policies to be easily ap- A DTEL type statement declares one or more types plied to existing media with full backward com- to be part of a DTE configuration; other DTEL state- patibility with existing disk and file system for- ments may refer only to types declared with the type mats. statement. For example, the following type statement declares one type for ordinary UNIX files, programs, 3 DTE Language Support etc., and three types describing enterprise data: DTE Language (DTEL) is a high-level symbolic language for expressing reusable DTE configurations in a human--rather than machine-friendly form. type mix-t, /* normal UNIX files */ DTEL security attributes such aa domain definitions specs-t, /* engineering specs */ express fundamental constraints on subject creation budget-t, /* budget projections */ and object accesses; consequently a DTEL specifica- rates-t; /* labor rates */ tion must be eRective from an early stage in a sys- tern’s initialization. The general scheme of DTEL is to express information traditionally held in DDT and A DTEL domazn statement defines three compo- DIT tables with as much simplifying structure as pos- nents: sible. We anticipate that some systems will require at- tributes that are closely related; DTEL therefore sup entry points Programs, identified by path name, ports such inherent (and simplifying) structure by pro- that are bound to the domain and must be in- viding macro facilities that allow security attributes ’We have also formulated but not completely implemented a to be defined using shared components. To document IITEL mount Statement that controls mount operations, but we and clarify specifications, DTEL supports standard C restrict our attention here to implemcnted fcatures with which commenting conventions. Currently, DTEL provides we have actual experience. The mount statement would add four primary statements for expressing a D‘I’E configu- several lines to the example presented in this section. 68 DTEL specs-t budget-.t ratest Figure 2: Implicit Types scenario, the login program is DTE-aware and prop- denies any attempt at runtime to create objects of erly authenticates and checks the authorization of each other types in those areas. user before starting a process in the user’s domain. One consequence of binding attributes by location ‘The fourth DTEL statement is the assign state- is that files that can be reached through multiple (hard Tuesday,ment, October which 22, 13 is used to associate exactly one type with link) paths4 may appear to have multiple types. To 9 runningevery file example on a system. of UnixAssign system,statements Engineers, support “im- Managers,prevent this,and DTELAccountants will employ a tool at specifica- plicit typing,” a technique for associating types with tion time that discovers whether multiple assign state- files based on directory hierarchies by stating general ments name the same file. For each such file, the tool rules and then listing exceptions. Fi ure 2 displays will prompt the security administrator to decide which the concept. In that figure, all files \elow the root among the possible types the file should have and will directory, by default, have the type uniz-t. In three then add additional assign statements to ensure that subdirectories, however, uniz-t is “overridden” by the all assign statements for the file give the same type. specs-t, budget-t, and rates-t types. In each subdirec- Once initialized, a DTE system maintains type bind- tory, all files by default have the type of the subdi- ings unambiguously even in the presence of multiple rectory. Using this technique, it is easy to associate a links. small number of types with a large number of files as For example, the following assign statements pro- long as type associations tend to group according to vide areas for the domains and types displayed in fig- existing directory hierarchies. In our experience, di- ure 2: rectory hierarchies tend to organize files by purpose, origin, sensitivity, etc., in short, the same criteria by which type labels would often be assigned. Although assign -r -s unix-t /; /* default type */ types may naturally reflect directory hierarchies, there assign -r -s specs-t /projects/specs; are clearly exceptions to this rule, and assign state- assign -r -s budget-t /projects/budget; ments can also express exceptions for individual files assign -r -s rates-% /projectdratas; as overrides to the default type associations. ,4n assign statement associates a type with a path P and is optionally recursive; recursive statements (in- dicated by “-r”) apply to all paths having P as a pre- In order to allow UNIX system processes to con- fix. For Statements having paths such that one is a tinue to function, all system processes except login run prefix of another, the statement having the longest in a domain that gives access to the standard UNIX path P overrides statements having shorter paths for objects accessible from the root directory (“/”) that all files reached through P. DTEL type associations has type uniz-l; this assures compatibility for basic are tranquil in that the type of an object does not system functions. The DTEL processor requires that change over the object’s lifetime. As a consequence, “/” is given a type using an assign statement. User marntenance of attribute associations at runtime may processes run in one of the three user-oriented domains force (automatic) rebindings of attributes to hierarchi- having appropriate access to the three subdirectories cal structures. For example, when a file is renamed, for specs-t, budget-t, and rates-t. its assign statement, if any, is changed to reflect the The four basic DTEL statements are sufficient to file’s new location. Constraints can be placed on type express complete access control policies for processes, assignments. DTEL provides a feature to force type files, and most volatile system abstractions such as assignments to be static (indicated by “-s”) at run- time, which locks specification-time type assignments ‘Symbolic links are not an issue becauae they merely name for hierarchical portions of the object name space and hard link paths represented by DTEL assign statcmentr. 70 DTEL /* * DTEL Commercial Policy. */ type mix-t, /* normal UNIX files, programs, etc. */ specs-t, /* engineering specifications */ budget -t , /* budget projections */ rates-t ; /* labor rates */ #define DEF (/bin/sh), (/bin/csh), (rxd->unix-t) /* macro */ domain engineerd = DEF, (rad->specs-t); domain projectd = DEF, (rud->budget-t), (rd->rates-t); domain accountingd = DEF, (rd->budget-t), (rwd->rates-t); domain syrstemd = (/etc/init), (raxd->unix-t), (auto->logind); domain logind = (/bidlogin), (rwxd-hnix-t), (exec->engineerxi, projectd, accountingd) ; initial domain systemd; /* system starts in this domain */ assign -r -s mix-t /; /* default for all files */ assign -r -s spe c s -t /pro j e cts/spe cs ; assign -r -s budget 4 /pro j ect s /budget ; assign -r -s rates-t /projects/rates; Figure 3: Example DTEL Policy tions, and context checking (e.g., dornains don’t refer- have also made several applications DTE-aware.