5.9 Registry Security FundamentalsThe Registry's hierarchical arrangement looks suspiciously like that of a filesystem in more ways than one. Like NTFS files, directories, and volumes, Registry keys can have attached attributes that control who owns them, who may read, write, and change them, and what events should be logged for further scrutiny. In particular, every key has an access control list, or ACL, associated with it. The ACL is made up of zero or more access control entries, or ACEs. Each ACE grants a specific permission to a specific user or group. The permissions specified by the ACEs in the ACL apply to the object that holds the ACL and its children, if any. There are actually two separate kinds of ACL: a discretionary ACL (DACL) contains the permissions you put on the key, and a system ACL (SACL) contains permissions applied (and managed) directly by the OS. 5.9.1 Basic Registry PermissionsSome Windows 2000 permissions apply to more than one kind of object. However, the semantics of Registry permissions are a bit different from those of filesystem or objects. Table 5.2 shows the 10 basic permissions that can be attached to Registry keys. These permissions are also called Discretionary Access Controls, or DACs.
Besides these basic DACs, there are additional composite DACs. These composites grant combinations of two or more of the rights listed in Table 5.2. For example, the Full Control composite grants all 10 of the rights listed above. Table 5.3 shows the composite DACs and the rights they include.
5.9.2 Applying ACLsBoth Windows 2000 and NT use some fairly simple rules to evaluate ACEs and decide whether you get access to a particular resource or not. Understanding these rules and how they work is critical to knowing how to secure your systems. The first rule is actually a significant difference in how permissions are handled between Windows NT and Windows 2000. In NT, you can explicitly deny someone access by giving them the No Access permission. In Windows 2000, there are separate Allow and Deny flags in each ACE entry. This difference becomes important when you consider it in the light of the ACL evaluation rules:
Taken in combination, these two rules allow you to calculate the effective permission that result from any combination of ACEs in an ACL. They also highlight why Microsoft added separate Allow and Deny flags. Since the most restrictive permission is always used, an explicit denial (using the Deny flag) is always more powerful than any grant of the same right. Rather than depending on the implicit denial rule (#1 above), you can gain improved security (and clearer semantics) by expressly denying access to an object. |