MORE INFORMATION
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:
The 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:
There 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:
Pair | Right or permission |
CC | QueryConf |
DC | ChangeConf |
LC | QueryStat |
SW | EnumDeps |
RP | Start |
WP | Stop |
DT | Pause |
LO | Interrogate |
CR | UserDefined |
GA | GenericAll |
GX | GenericExecute |
GW | GenericWrite |
GR | GenericRead |
SD | Del |
RC | RCtl |
WD | WDac |
WO | WOwn |
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.
Code | User type |
DA | Domain Administrators |
DG | Domain Guests |
DU | Domain Users |
ED | Enterprise Domain Controllers |
DD | Domain Controllers |
DC | Domain Computers |
BA | Built-in (Local ) Administrators |
BG | Built-in (Local ) Guests |
BU | Built-in (Local ) Users |
LA | Local Administrator Account |
LG | Local Guest Account |
AO | Account Operators |
BO | Backup Operators |
PO | Printer Operators |
SO | Server Operators |
AU | Authenticated Users |
PS | Personal Self |
CO | Creator Owner |
CG | Creator Group |
SY | Local System |
PU | Power Users |
WD | Everyone (World) |
RE | Replicator |
IU | Interactive Logon User |
NU | Network Logon User |
SU | Service Logon User |
RC | Restricted Code |
WR | Write Restricted Code |
AN | Anonymous Logon |
SA | Schema Administrators |
CA | Certificate Services Administrators |
RS | Remote Access Servers Group |
EA | Enterprise Administrators |
PA | Group Policy Administrators |
RU | Alias to Allow Previous Windows 2000 |
LS | Local Service Account (for Services) |
NS | Network Service Account (for Services) |
RD | Remote Desktop Users (for Terminal Services) |
NO | Network Configuration Operators |
MU | Performance Monitor Users |
LU | Performance Log Users |
IS | Anonymous Internet Users |
CY | Crypto Operators |
OW | Owner Rights SID |
RM | RMS Service |
How to interpret a DACL string in SDDL format
This 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.
- (A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)
This access control entry (ACE) gives LocalSystem (SY) the following rights:- QueryConf
- ChangeConf
- QueryStat
- EnumDeps
- Start
- Stop
- Pause
- Interrogate
- UserDefined
- Delete
- RCtl
- WDac
- WOwn
The access control entry (ACE) is restricted to LocalSystem. This is good for security because LocalSystem is already the most powerful security context on the workstation. Therefore, there is no elevation risk. - (A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)
This access control entry (ACE) applies to built-in local administrators (BA). This access control entry (ACE) gives the same rights as in the previous access control entry (ACE) to all the local administrators. This is also a very powerful security context on the workstation. Therefore, there is again no elevation risk. - (A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;AU)
This access control entry (ACE) gives all the previous rights to any authenticated user (AU).
In the last access control entry (ACE), a user in a group that has low rights, such as any authenticated user, can change the configuration of the service. The configuration includes the binary file that is run when the service is started and the account under which the service is run.
The following sample DACL does not give ChangeConf rights to authenticated users:
(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPLOCRRC;;;PU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;DT;;;LS)(A;;DT;;;NS)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;NO)
In this DACL, authenticated users (AU) are given only the following rights:
- QueryConf
- QueryStat
- EnumDeps
- Interrogate
- UserDefined
- RCtl
There are no potential risks of escalation via the Authenticated Users group with these rights granted. The Power Users (PU) group can already escalate to LocalSystem, so should not be considered an escalation risk. In this example, the Power Users group has all the same rights as the Authenticated Users group except that the Power Users group can also start the service (RP). The Local Administrators (BA) group is next. This group and the next group, the Server Operators (SO) group, both have ChangeConf, WDac, and WOwn permissions. This is acceptable because only the most-trusted users should be in the Local Administrators or the Server Operators group.
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 practices
Limit 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:
- ChangeConf (DC)
- WDac (WD)
- WOwn (WO)
For more information about access rights and permissions, visit the following Microsoft Web site: