Blog | G5 Cyber Security

Active Directory OU Control to Domain Admin

TL;DR

If an attacker gains control of an Organizational Unit (OU) in Active Directory and has the permissions to modify group membership within that OU, they can add themselves (or a compromised account) to privileged groups like Domain Admins. This guide explains how this is possible and what steps you can take to prevent it.

How It Works

Active Directory uses OUs to organize users, computers, and other objects. Permissions are often delegated at the OU level for easier management. If an attacker compromises an account with sufficient permissions on an OU containing accounts that *are members* of privileged groups (like Domain Admins), they can manipulate group membership to gain domain-wide control.

Steps to Prevent OU Control Leading to Domain Admin Access

  1. Review OU Permissions Regularly:
dsacls "OU=CriticalOU,DC=example,DC=com" /rec?includeaccesses
  • Least Privilege Principle:
  • Protected Groups:
  • Monitor Group Membership Changes:
  • Implement Privileged Access Management (PAM):
  • Regular Security Audits:
  • Restrict Group Policy Object (GPO) Editing:
  • Detecting an Active Attack

    1. Review Event Logs: Look for events indicating unauthorized changes to group memberships, particularly in the Domain Admins group.
    2. Check Group Membership: Regularly verify the membership of privileged groups using PowerShell:
      Get-ADGroupMember -Identity "Domain Admins"
    3. Monitor for New Accounts: Be alert for newly created accounts with administrative privileges, especially if they are not part of your standard onboarding process.
    Exit mobile version