Article ID: 914392 - View products that this article applies to.
Service discretionary access control lists (DACLs) are important components of workstation and of server security. This Microsoft Knowledge Base article describes how to interpret the DACLs on services. This article also provides best-practice guidance for writers of service DACLs when they are developing and assessing the security of their programs.
You can use this Microsoft Knowledge Base article as a guide to help evaluate the security of service discretionary access control lists (DACLs).
To display the DACLs for a service, use the sc command together with the sdshow argument as shown in the following example, where service_name is the name of the service whose DACLs you want to display:
sc sdshow service_nameThe command generates results that are similar to these:
(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;PU)(A;;CCDCLCSWLOCRRC;;;LS)This sample output from the sc command shows a service's security description in the Security Descriptor Definition Language (SDDL) syntax. For information about the SDDL syntax, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/aa379567.aspxThere are several things to look for to determine whether a service DACL is vulnerable. The following tables describe how to read the results of the sc command, how to interpret each permission string, and how to interpret to whom the permission is granted.
You can independently evaluate each string of characters that are enclosed in parentheses by using the following key:
(Allow/Deny;;String of permissions;;;SID or acronym for built-in account or group)Each two-letter pair in the string of permissions corresponds to a specific right or permission:
Collapse this tableExpand this table
Exercise the most caution with the ChangeConf (DC) permission. Look for the ChangeConf permission when you are determining whether your service is vulnerable to an elevation-of-privilege attack. This permission enables a designee to change the configuration of the service to include the binary file that is run when the service is started. You should also exercise extreme caution with the WDac (WD) and the WOwn (WO) permissions because both can be used to escalate permissions to LocalSystem. Make sure that these rights are not granted to a user who has low permissions. This table lists the codes that are used to identify the type of user that is granted access in the SDDL syntax.
Collapse this tableExpand this table
How to interpret a DACL string in SDDL formatThis information describes how to interpret the sample DACL string that is listed at the top of this article. This interpretation lists each access control entry (ACE) individually.
The following sample DACL does not give ChangeConf rights to authenticated users:
In this DACL, authenticated users (AU) are given only the following rights:
The LocalSystem (SY) group is given the same permissions as the Power Users group, but is also given Stop and Pause permissions. This seems to be appropriate. The next two short access control entries (ACEs) give the Local Service account and the Network Service account permissions to pause the service. This also seems to be appropriate because Local Service and Network Service are both powerful local accounts.
The Network Configuration Operators (NO) group, however, is given ChangeConf permissions. The Network Configuration Operators group was added in Windows XP to let trusted users change network settings without having full administrator permissions. By default, the Network Configuration Operators group is empty. The group is sometimes used to give network configuration permissions to specific users. For example, the owner of a portable computer might be given this permission. Users in the Network Configuration Operators group frequently have physical control of the computer. However, the intention of this group is not to give these users full administrator permissions. Therefore, this service DACL should not give ChangeConf permissions to the Network Configuration Operators group.
Best practicesLimit service DACLs to only those users who need a particular access type. Be especially cautious with the following rights. If these rights are granted to a user or to a group that has low rights, the rights can be used to elevate to LocalSystem on the computer:
Article ID: 914392 - Last Review: October 11, 2007 - Revision: 1.6