# Well-known security principals count should be retrievable

Well-known security principals are built-in identities with special meaning in Active Directory (for example, principals that Windows and AD components…

Source: https://maester.dev/docs/tests/AD-CFG-10

<!-- This file is generated by website/scripts/generate-test-docs.mjs. Do not edit manually. -->

<div class="test-byline"><div class="test-byline-avatars"><a class="test-byline-avatar test-byline-avatar--author" href="/contributors/soulemike" title="Michael Soule · Original author"><img src="https://github.com/soulemike.png" alt="Michael Soule" width="28" height="28" loading="lazy" decoding="async" /></a></div><div class="test-byline-meta"><span class="test-byline-text">Contributed by <a href="/contributors/soulemike">Michael Soule</a></span><a class="test-byline-link" href="/contributors">All contributors →</a></div></div>

<p class="test-part">Part of <a href="/docs/tests/ad">Active Directory</a> · Active Directory · Directory configuration · <a href="/docs/tests">All checks</a></p>

```powershell title="Run this check"
Invoke-Maester -TestId AD-CFG-10
```

## Overview

Well-known security principals are built-in identities with special meaning in Active Directory (for example, principals that Windows and AD components rely on for system behavior). Unexpected changes to these principals can indicate tampering, malicious SID/object replacement, or unauthorized directory modification.

#### Control Type

**Operational**

#### Security Recommendation
- Validate that only the expected well-known principals exist (default is **27** for typical configurations).
- Restrict permissions to the container(s) holding well-known principals so only AD administrators can modify them.
- Audit changes by enabling directory change auditing and reviewing security event logs for modifications.
- Investigate any deviation immediately as a potential sign of directory tampering.

#### How the Test Works
- Locates the AD container(s) that store well-known security principal objects.
- Enumerates those objects and counts how many are present.
- Compares the count to the expected baseline (default **27**) and flags any unexpected values.

#### Related Tests
- [Test-MtAdAdActivationObjectsCount](/docs/commands/Test-MtAdAdActivationObjectsCount): Detects unexpected AD configuration objects that can reflect tampering.
- [Test-MtAdTrustedRootCaCount](/docs/commands/Test-MtAdTrustedRootCaCount): Identifies unauthorized trust anchors that can undermine authentication integrity.

## Details

<details>
<summary>Every attribute of this check</summary>

| Field | Value |
| --- | --- |
| Test ID | AD-CFG-10 |
| Severity | Info |
| Suite | Active Directory |
| Product | Active Directory |
| Feature | Directory configuration |
| Area | Infrastructure hardening |
| Resource type | Tenant |
| MITRE ATT&CK | None |
| PowerShell test | [Test-MtAdWellKnownSecurityPrincipalsCount](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-10.ps1) |
| Services | ActiveDirectory |
| Permissions | ActiveDirectory:Ldap:Configuration/*:ReadProperty |

</details>

## Source

- Test: [`tests/ad/config/Test.AD-CFG-10.ps1`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-10.ps1)
- Documentation: [`tests/ad/config/Test.AD-CFG-10.md`](https://github.com/maester365/maester/blob/main/tests/ad/config/Test.AD-CFG-10.md)
