A more complete understanding of the present invention may be derived by referring to the detailed description and claims when considered in connection with the Figures, wherein like reference numbers refer to similar items throughout the Figures, and:
The present invention generally relates to governing interaction between code within a code base operable on a computer. The present invention non-intrusively separates the code within an existing code base to protect the code from one another, without modification to the existing code base.
The present invention is described in connection with governing interaction of code within a code base of an operating system. The present invention may be particularly implemented in connection with the OS kernel, the most privileged level in a processor, to isolate those processes that operate in the kernel level, but typically require little interaction with the OS. However, it should be understood that the term “code base” is not limited to the source code that makes up an operating system, but can further, or alternatively, include the larger collection of all the code of all the computer programs and processes operable on a computer.
The present invention employs the “principle of minimal privilege,” also known as “principle of least privilege” or just “least privilege.” In computing, the basic tenet of least privilege is to grant the minimum possible privileges to permit a legitimate process to see and use only such information and resources that are necessary to perform its function. Least privilege thus can enhance protection of data and functionality from faults and malicious behavior. The present invention employs the principle of least privilege as an overlay to an underlying code base to govern interaction between code in the code base and provide process separation.
Processing units 36, of which one is shown, interpret instructions and process data contained in computer applications. MMU 38 is a class of computer hardware components responsible for handling memory accesses requested by processing unit 36. MMU 38 functions in translation of virtual addresses to physical addresses (i.e., virtual memory management), memory protection, cache memory 40 control, bus arbitration, and so forth. Cache memory 40 can be thought of as a temporary storage area where frequently accessed data can be stored for rapid access, and BIOS boot ROM 42 refers to the software code stored in ROM that is run when computing system 30 is first powered on.
Computing system 30 further includes a hard drive 44 in communication with motherboard 34. Hard drive 44 serves as main storage for an operating system 46, separation management system 32, and user applications 48. It will be understood that hard drive 44 may be embodied as a single unit or multiple units.
Operating system 46 incorporates a code base 50, the collection of all source code for all of the code modules which make up operating system 46. Code base 50 includes, for example, OS vender code 52, third party code 54, and OS security critical data 56. A handler 58 is also associated with operating system 46. Handler 58 is a subroutine in operating system 46 that allows for handling of asynchronous hardware and software events using a generalized procedural interface. In accordance with the present invention (discussed below), “Events” may be generated by interrupts from software interrupt instructions, e.g., from OS vender code 52 and/or third party code 54 of operating system 46. Per convention, events may also include network interface cards requesting service, the clicking of a mouse, a clock or timer reaching some predetermined time, the dragging of a scroll bar within a windowing system, or the processing of a button on a key board.
A monitor 60 is included in computing system 30 for displaying graphics and text generated by software programs and program modules that are run by computing system 30. A graphics card 62 is interposed between motherboard 34 and monitor 58. Graphics card 62 is a circuit board containing a video processor 64, video memory (RAM) 66, and other electronics to provide a bitmap display (not shown) to monitor 60. Graphics card 62 may be optionally substituted for an integrated graphics chip on a section of motherboard 34.
A keyboard 68 is coupled to motherboard 34 for user entry of text and commands that affect the running of applications 48 executing on computing system 30. A mouse 70, or other pointing device, may be in communication with motherboard 34 such that signals from mouse 70 can be conveyed to motherboard 34 to control a cursor on monitor 60 and to select text, menu options, and graphic component displayed on monitor 60, as known to those skilled in the art.
Computing system 30 can further include peripherals that may be attached externally, typically through some form of computer bus. Exemplary peripherals shown herein include a printer 72, a modem 74, and a scanner 76. Computing system 30 can further include a compact disk-read only memory (CD-ROM) drive 78 into which a CD-ROM disk may be inserted so that executable files and data on the disk can be read for transfer into the memory and/or into storage on hard drive 44. Other storage devices, such as a digital versatile disc-read only memory (DVD-ROM) drive 80 and/or a floppy disk drive 82 may also or alternatively be included. The various components of computing system 30 are in communication with one another via conventional bus structures 84 known to those skilled in the art.
Many of the hardware components and peripheral devices that form computing system 30 are able to interact via device drivers, also known as software drivers. Device drivers typically form part of the lowest level (most privileged) level of operating system 46, i.e., the OS kernel, with which they are linked when the OS kernel is built. In this scenario, the device drivers can include OS vender code 50 and third party code 52. These device drivers may be trusted or untrusted. The term “trusted” refers to code that can be trusted more fully to follow its intended programming with a lower possibility of inappropriate activities occurring that are forbidden by its designers and other software writers. Conversely, the term “untrusted” denotes code from an unknown source that has not met predefined requirements to be trusted and may be potentially harmful to computing system 30. Third party code 54 may be “untrusted” even though it may be useful and completely benign because it has not been rigorously tested.
Separation management system 32 is executable code that employs the principle of least privilege as an overlay to underlying code base 50 of operating system 46 to govern interaction between various subsets of OS vender code 50 and third party code 52 without requiring modification to the existing code base 50.
Overlay management process 86 is executed to define containers (discussed below) to partition particular subsets of code within code base 50 (
In general, container database 92 defines the subsets of code within code base 50 that are isolated from the remaining code base 50. Subsets of code to be isolated from the remaining code base 50 reside in a plurality of containers 95 within code base 50. These containers 95 are specified within container database 92. Separation policy 94 sets forth the rules of allowable and disallowable interaction for each of the subsets of code within containers 95. It should be understood that container database 92 and separation policy 94 can take on a great variety of forms and/or the contents of each may be combined into a single, comprehensive database.
Security enforcement process 88 is executed in conjunction with operating system 46. Security enforcement process 88 utilizes the information within container database 92 and separation policy 94 to govern interaction and ensure separation of untrusted portions of code base 50 from the remainder of operating system 46 (
Privileged memory control process 90 works in conjunction with handler 58 (
The term “container” utilized herein refers broadly to “one that contains.” The present invention delineates “containers,” each of which is defined by container boundaries, in the form of memory addresses from a portion of memory in which code base 50 for operating system 46 resides. Each of the containers “contains” or encapsulates a subset of code within code base 50 of operating system 46.
Process 86 begins with a task 96. At task 96, a region in memory is determined where code base 50 (
A subsequent series of operations within overlay management process 86 forms a container definition subprocess 98 of process 86 to define containers 95 for specific subsets of code within code base 50.
Overlay management process 86 continues with a first task of container definition subprocess 98, specifically a task 100. At task 100, subsets of code within code base 50 and their specific regions within the memory allocated to code base 50 are identified. These subsets of code are those portions of OS vender code 52 (
A number of guidelines can govern the selection of subsets of code. These guidelines include, for example, a) select code for a subset that belongs to a discrete function of code base 50; 2) identify subsets of code that may be in multiple containers; and 3) if access to full code base 50 is required, identify all subsets to encompass an entirety of code base 50 for containment in containers 95.
Regarding guideline a), ideally boundaries for containers 95 (
Regarding guideline b), in general, protections are strongest if container boundaries of containers 95 do not overlap. However, some programming models anticipate wide ranging access to a stack data structure which maintains execution state for code base 50 (
Regarding guideline c), if access to the full code base 50 is required, the plurality of containers 95 must cover the entire code base 50. That is, each area of memory 44 in which code base 50 resides must be defined in at least one of containers 95. Those skilled in the art will recognize that an OS developer may adopt some or all of the aforementioned guidelines. In addition, an OS developer may adopt additional or alternative guidelines.
Following identification task 100, overlay management process 86 proceeds to a task 102. At task 102, a “next” one of the subsets of code identified at task 100 is selected. Of course, during a first iteration of task 102, the “next” subset of code is a “first” subset of code.
In response to task 102, a task 104 is performed. At task 104, container boundaries are defined for one of containers 95 (
Following task 104, a task 106 is performed to record the newly defined container 95 in LPO container database 92 (
Referring to
Table 108 includes a container identifier field 110, a container boundaries field 112, and a code field 114. Thus, a first entry 116 within database 92 reveals one of containers 95 identified by “00B” in container identifier field 110, first boundaries 118, in the form of a memory address in container boundaries field 112, as being “00001:00015,” and a first subset of code 120 within code base 50 (
Likewise, a second entry 122 within database 92 reveals one of containers 95 identified by “0° C.” in container identifier field 110, second boundaries 124, in the form of memory addresses in container boundaries field 112, as being “00060:00080” and “00090:00092,” and a second subset of code 126 within code base 50 (
A fourth entry 133 within database 92 reveals one of containers 95 identified by “00E” in container identifier field 110, fourth boundaries 135, in the form of a memory address in container boundaries field 112, as being “000B2:000B8,” and a fourth subset of code 137 within code base 50 (
Now referring to
Table 134 includes a container identifier field 136, a code field 138, and an access regulation field 140. Thus, a first entry 142 within separation policy 94 reveals one of containers 95 identified by “00B” in container identifier field 136, first subset of code 120 within code base 50 (
In contrast, a fifth representative entry 148 is shown herein to distinguish a fifth subset of code 150 within code base 50 (
Fifth representative entry 148 is shown herein to illustrate a distinction between those subsets of code that are trusted and can have unmediated access to OS security critical data 56 and those subsets of code that have limited access to the remainder of code base 50, and particularly OS security critical data 56, in accordance with the present invention. However, it should be understood that subsets of code from code base 50 that are not overlaid with one of containers 95 need not necessarily be listed within separation policy 94. Rather, only those subsets of code from code base 50 that are subject to governed interaction within operating system 46 may be specified in separation policy 94.
Although separation policy 94 shows access regulation as being simply allowed or disallowed, separation policy 94 could include particular stipulations for allowed and/or disallowed access to the remainder of code base 50. In addition, it should be further understood that LPO container database 92 and separation policy 94 need not be separate records, but could instead be combined as a single database.
Referring back to
At task 152, separation policy 94 and LPO container database 92 are associated with operating system 46 (
Security enforcement process 88 begins with a task 154. At task 154, process 88 monitors for an access attempt by a subset of code within code base 50. In accordance with the present invention, an access attempt indicates an attempt to access code and/or data within code base 50, for example, other OS vendor code 52, third party code 54, and/or OS critical data 56 (
A query task 156 is performed in connection with task 154. Query task 156 determines whether an access attempt is detected. When an access attempt is not detected, program control loops back to task 154 to continue monitoring for access attempts. However, when an access attempt is detected, process 88 proceeds to a query task 158.
At query task 158, a determination is made as to whether the currently executing subset of code resides within one of containers 95. When the subset of code does not reside within one of containers 95, process control proceeds to a task 160.
At task 160, the access attempt is allowed. That is, since the subset of code does not reside within one of containers 95, it has unmediated access to code base 50 (
At query task 162, a determination is made as to whether security enforcement process 88 is to continue executing. Process 88 executes in conjunction with operating system 46. Thus, process 88 continues whenever operating system 46 is booted up, that is while computing system 30 (
Referring back to query task 158, when the subset of code resides within one of containers 95, process control proceeds to a task 164. At task 164, process 88 initiates a trap to handler 58 (
In response to initiation of a trap at task 164, process 88 proceeds to a task 166. At task 166, handler 58 reviews separation policy 94 (
A query task 168 is performed in connection with task 166. At query task 168, a determination is made in response to review of separation policy 94 as to whether access is allowable. When the access attempt is allowable, process 88 proceeds to task 160. At task 160, handler 58 allows transition to the new code (i.e., the access attempt) and allows execution to proceed. However, when the access attempt is disallowable, process control proceeds to a task 170.
At task 170, handler 58 prevents the access attempt, i.e. disallows transition to the new code.
In response to task 170, a task 172 is performed. At task 172, the access attempt is recorded. By way of example, handler 58 may take a number of actions when it is invoked prior to completing the failure. For example, handler 58 may be designed to audit the event. This specific behavior of handler 58 can be based on the policy implemented by the designer of separation management system 32 (
A task 174 is performed following task 172. At task 172, handler 58 returns to the current subset of code within the current one of containers 95 with a failure. For example, a general protection fault may be raised that indicates that the currently executing subset of code has violated the rules of separation policy 94.
Following task 174, process 88 proceeds to query task 162 to again determine whether the execution of process 88 is to continue and cause a loop back to monitoring task 154, or to discontinue and exit.
Kernel 176 includes first, second, third, and fourth subsets of code 120, 126, 132, and 137 residing in containers 95 defined by container boundaries 118, 124, 130, and 135, respectively. Thus, interaction between any of first, second, third, and fourth subsets of code 120, 126, and 132, and 137 with any portion of code base 50 outside of their respective containers 95 is governed by the rules set forth in separation policy 94. However, fifth subset of code 150 does not reside within one of containers 95 and therefore retains unmediated access to code base 50.
Of particular interest, fourth subset of code 137 (Untrusted Device Driver E) has been infected by malicious code 178. Through the execution of security enforcement process 88 (
Process 90 begins at a task 180. At task 180, process 90 monitors for a change in container boundaries 180. In general, the boundaries of containers 95 (
Typically, operating system 46 has no awareness of containers 95 defined by separation management system 32. However, in an alternative embodiment, monitoring at task 180 may be performed by operating system 46 itself. For example, the underlying code base 50, especially kernel 176 (
In either instance, a query task 182 is performed in connection with task 180. At query task 182, a determination is made as to whether a change in any container boundaries is detected. When no change is detected, process 90 proceeds to a query task 184.
Query task 184 determines whether monitoring is to continue. This continuation may coincide with the continued execution of operating system 46. When process 90 is to be discontinued, privileged memory control process exits. However, when the execution of process 90 is to continue, program control loops back to monitoring task 180.
Referring back to query task 182, when a change in any container boundaries is detected, process 90 proceeds to a task 186. At task 186, container boundaries (i.e. memory addresses) are updated in container boundaries field 112 of LPO container database 92 (
In summary, the present invention teaches of methodology and a separation management system for governing interaction between subsets of code within a code base of, for example, an operating system. In particular, container boundaries are defined for containers (i.e., areas of memory) in which subsets of code reside that cannot be trusted. A separation policy governs the allowability of these containerized subsets of code to interact with other code or operating system security critical data within the operating system. The methodology and system serve as a least privilege overlay technique for an operating system so as to not adversely affect the performance of the operating system. Moreover, isolation and security protections can be applied to code without modifying the code itself. Since no modification to the operating system is required, the least privilege overlay technique can be readily implemented with and provide improved security to legacy code. Thus, implementation of the methodology and separation management system permits the use of existing commercial off the shelf device drivers to be used in trusted applications.
Although the preferred embodiments of the invention have been illustrated and described in detail, it will be readily apparent to those skilled in the art that various modifications may be made therein without departing from the spirit of the invention or from the scope of the appended claims. For example, the process steps discussed herein can take on great number of variations and can be performed in a differing order then that which was presented.