Subscribe to Windows IT Pro
July 05, 2001 12:00 AM

Don't Shoot Yourself in the Foot with Group Policy Security Settings, Part 1

Windows IT Pro
InstantDoc ID #21656
Rating: (2)

Recently, when I presented a Windows 2000 security seminar, one of my students made a simple change to rights assignments in Group Policy, and I discovered how easy it is to lock everyone out of an Active Directory (AD) domain. The incident taught me how important it is to use strict change-management controls, to follow least-privilege doctrine, and to implement some fail-safe measures in AD to protect domain controllers (DCs).

The student, Bob, had completed the hands-on exercises for working with rights assignments using Group Policy and decided to experiment—something I always encourage. Bob edited the Default Domain Policy Group Policy Object (GPO), maneuvered to Computer Configuration, Windows Settings, Security Settings, Local Policies, Rights Assignments, and assigned the Deny access to this computer from network right to Everyone. This deny right prevents users with the proper permissions from connecting to any Win2K resources on the computer over the network—basically, all file or printer sharing and any resources in Computer Management, such as the event log, services, and local users and groups. (Users can still connect to other services that don’t use Win2K authentication, such as anonymous Web or FTP connections.) Because Bob assigned this right at the root of the domain, the deny right applied to all computers in his domain. Furthermore, because Bob assigned the right to the special Everyone group, he locked everyone out of all the computers in the domain.

When Bob brought the problem to my attention, we thought we could simply log on locally to the DC. Then we tried to edit the Default Domain Policy GPO to correct the problem, thinking that we’d be using a local connection and would bypass the Deny access to this computer from network right.] Unfortunately, that approach didn’t work either. Whenever you try to edit a GPO, even when you're logged on locally to the DC, Win2K uses a Lightweight Directory Access Protocol (LDAP) network connection to access the AD groupPolicyContainer object, and uses a file-sharing connection to access Group Policy-related files on a shared folder on the DC called sysvol. If the classroom test domain had been a production domain, Bob would have been in big trouble because no one could log on and use any resource on any computer in the domain. Although the problem was the result of one simple change, Bob's only recourse was to restore the DC from a backup, or do a low-level edit of the appropriate Group Policy file on the DC while logged on locally. Unfortunately, the latter option isn’t much of an option—the format of Group Policy files is not well documented. You can use three strategies to protect your domain from accidents like this. Let's look at the first strategy.

Isolate Your DCs from Accidental Changes to Group Policy
If you can keep your DCs stable, you should always be able to get into AD and Group Policy to correct any problems. To isolate your DCs, you need to lock down the Group Policy options on the root of your domain and each DC's organizational unit (OU). To lock down a DC's OU, open Active Directory Users and Computers, and click the OU of Domain Controllers. Create a new group called Domain Controllers GPO Administrators, and populate it with only the people who you have authorized to configure DCs. Right-click the Domain Controllers OU, select Properties, and click the Group Policy tab, as Figure 1 shows. Check Block Policy inheritance to prevent GPOs at the root of the domain from affecting DCs. (Note: You might need to duplicate some policies in the Domain Controllers OU if you want to apply the policies to all computers in the domain, including DCs.) Next, select the GPO for the Default Domain Controllers Policy, and click Properties. Select the Security tab, and click Advanced. Under the Permissions tab, click Remove to delete the entries for Domain Administrators and for Enterprise Administrators. Click Add to create an entry that grants full control to the Domain Controllers GPO Administrators, as Figure 2 shows. This step also implements a safeguard that prevents Domain Administrators or Enterprise Administrators from changing this GPO unless they purposely take ownership of it. Next, go back to the Domain Controllers Properties, as Figure 1 shows, and select the Security tab. Clear Allow inheritable permissions from parent to propagate to this object. When you are prompted to copy or remove inherited permissions, select Copy, and remove any entries that grant any access to Administrators, Domain Administrators, or Enterprise Administrators. Give full control to your new Domain Controllers GPO Administrators group, as Figure 3 shows. These two changes prevent other administrators from accidentally creating new GPOs in the Domain Controllers OU or clearing Block Policy inheritance check box.

At this point, you've isolated your DCs from changes that users make outside their OU and from mistakes administrators might make. However, DCs will still receive any policies you defined in GPOs that you linked to the domain root, where you can check the No override check box—No override takes precedence over Block Policy inheritance. To guard against overriding your policies, you can add an ACL entry on each GPO linked to the root of the domain that explicitly denies Read and Apply Group Policy access to the Domain Controllers Group. If you've flagged a domain root-linked GPO as No override, when a DC tries to read and apply the GPO, the GPO will deny access. In Part 2, I’ll show you how to use change control techniques and least privilege to protect the rest of your domain from administrator mistakes.

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    7 years ago
    Apr 06, 2005

    For the classroom lockout problem mentioned above, couldn't you have rebooted the DC into Safe Mode (causing Group Policy settings not to apply to that DC for that boot attempt). Then you could try running ADUC and delete the problematic GP setting?

  • whoopsmaster
    8 years ago
    Sep 13, 2004

    We are trying to setup a GPO that adds a domain account to have specific rights on the local servers. However, after applying the GPO, the new domain account replaces rather than adds to the existing local accounts. We want to keep both the local administrator and backup operators groups with the "RESTORE Files and Directories" rights AND add the domain account to have this right at the same time. We will be pushing this GPO to several hundred servers and cannot add each local group to the GPO. Can this be done, if so how?
    Thanks.

  • Matt Newman
    11 years ago
    Dec 07, 2001

    I am currently setting up some Win2k application servers running terminal services. I am having some issues with the GPO policies and keeping track of the changes and how they are relatively affecting each other. I have tried to do an export list, but it refuses to copy the entire contents of the tree to a file. What am I doing wrong, and were do I find the proper documentation for all these policies, besides the explanaition on the explain tab? I am new at this and I am trying to properly set up all the users accounts to be a srestrictive as possible, and at the same time allow them to be able to access the resources they need. Per say, I don't want any of the users to see or access any physical drives, but I need them to have complete access to mapped drives. The policy allows me to restrict all drives or A,C,D, but no drives letters any higher without restricting all drives. I am getting lost and very confused at times, can you help or direct me to proper resources etc?
    Thanks
    Matt N.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.