Introducing Active Directory Security Testing in Maester
Maester now supports comprehensive Active Directory security testing with 300+ new tests covering users, groups, computers, GPOs, DNS, trusts, and more.
We’re thrilled to announce a major expansion of Maester’s security testing capabilities—comprehensive Active Directory (AD) security testing is now available! This release adds 300+ new tests across 20 categories, giving you unprecedented visibility into your on-premises and hybrid AD infrastructure.
🎯 Highlights at a Glance
Section titled “🎯 Highlights at a Glance”- 300+ New AD Security Tests covering every aspect of your directory infrastructure
- 20 Test Categories from users and groups to DNS, GPOs, and DACL analysis
- Intelligent Caching with
Get-MtADDomainStatefor efficient data collection - Hybrid Ready - Perfect for organizations with on-premises AD and Entra ID
- Validated Against Live DCs - All tests validated on Windows Server 2025 Domain Controllers
Why Active Directory Testing Matters
Section titled “Why Active Directory Testing Matters”Active Directory remains the backbone of identity and access management for millions of organizations worldwide. Despite the shift to cloud, over 90% of Fortune 1000 companies still rely on AD for authentication and authorization. A compromised AD can lead to:
- Complete domain takeover
- Lateral movement across your network
- Ransomware deployment at scale
- Data exfiltration and theft
Maester’s new AD testing capabilities help you identify misconfigurations, security gaps, and compliance issues before attackers do.
📊 Test Coverage Overview
Section titled “📊 Test Coverage Overview”Identity & Access Management
Section titled “Identity & Access Management”| Category | Tests | Description |
|---|---|---|
| Users | 29 | Account status, password policies, delegation, service accounts |
| Groups | 22 | Membership, SID history, privileged access, empty groups |
| Computers | 10 | Disabled accounts, dormant systems, delegation, SID history |
| Service Principal Names | 13 | SPN analysis for Kerberoasting detection |
Domain Infrastructure
Section titled “Domain Infrastructure”| Category | Tests | Description |
|---|---|---|
| Domain & Forest | 12 | Functional levels, naming, tombstone lifetime, recycle bin |
| Domain Controllers | 12 | OS versions, SMB settings, FSMO roles, RODCs, ports |
| Sites & Subnets | 16 | Topology, coverage, catch-all subnets, IPv6 |
| Organizational Units | 5 | Structure, empty OUs, stale containers |
Security Configuration
Section titled “Security Configuration”| Category | Tests | Description |
|---|---|---|
| Password Policies | 11 | Default and fine-grained password policies |
| Group Policy (GPO) | 11 | GPO inventory, links, enforcement, inheritance |
| GPO State | 27 | Detailed GPO analysis, permissions, WMI filters |
| DACL Analysis | 18 | Discretionary Access Control List security |
| Security Accounts | 13 | KRBTGT, delegation, managed service accounts |
Network & Integration
Section titled “Network & Integration”| Category | Tests | Description |
|---|---|---|
| DNS Infrastructure | 19 | Zones, records, delegations, DNSSEC, reverse lookup |
| Trusts | 7 | Inter-forest trusts, quarantine status, stale trusts |
| Replication | 8 | Connection status, optional features, DFS-R |
| Schema | 6 | Schema versions, LAPS, modifications |
| Configuration | 24 | PKI, LDAP policies, DHCP, CA certificates |
🔍 Key Test Categories Explained
Section titled “🔍 Key Test Categories Explained”User Security Tests
Section titled “User Security Tests”Identify risky user configurations that could lead to compromise:
# Run all user security testsConnect-Maester -Service ActiveDirectoryInvoke-Maester -Path "./ad/user" -SkipGraphConnectSample Tests:
Test-MtAdUserPasswordNeverExpiresCount- Find accounts with non-expiring passwordsTest-MtAdUserDelegationAllowedCount- Detect accounts trusted for delegationTest-MtAdUserNoPreAuthCount- Identify AS-REP Roasting vulnerabilitiesTest-MtAdUserKerberosDesOnlyCount- Find legacy DES-only accountsTest-MtAdUserBuiltInAdminEnabledDetails- Monitor built-in Administrator accounts
Group Policy Security
Section titled “Group Policy Security”Analyze GPO configurations for security issues:
# Run GPO security testsConnect-Maester -Service ActiveDirectoryInvoke-Maester -Path "./ad/gpostate" -SkipGraphConnectSample Tests:
Test-MtAdGpoCpasswordFoundCount- Detect encrypted passwords in GPOsTest-MtAdGpoNoAuthenticatedUsersCount- Find GPOs missing critical permissionsTest-MtAdGpoVersionMismatchCount- Identify AD/Sysvol version mismatchesTest-MtAdGpoWmiFilterCount- Audit WMI filter usage
DACL Analysis
Section titled “DACL Analysis”Deep-dive into Access Control Lists:
# Run DACL analysis testsConnect-Maester -Service ActiveDirectoryInvoke-Maester -Path "./ad/dacl" -SkipGraphConnectSample Tests:
Test-MtAdDaclPrivilegedAllowAceCount- Find privileged ACE entriesTest-MtAdDaclDenyAceCount- Audit deny authorization entriesTest-MtAdDaclUnresolvedSidCount- Detect orphaned SIDs in ACLsTest-MtAdDaclConflictObjectCount- Find conflict objects (CNF)
🚀 Getting Started
Section titled “🚀 Getting Started”Prerequisites
Section titled “Prerequisites”- Windows Server with Active Directory role, or domain-joined machine
- PowerShell 5.1 or later
- ActiveDirectory and GroupPolicy PowerShell modules
- Domain Admin or equivalent permissions (for full coverage)
Active Directory testing is always opt-in. Connect-Maester -Service All does not connect to AD, and Invoke-Maester excludes every AD-tagged test until Connect-Maester -Service ActiveDirectory succeeds in the current PowerShell session.
Installation
Section titled “Installation”# Install or update MaesterInstall-Module Maester -Scope CurrentUser -Force
# Install Maester testsmd ~/maester-testscd ~/maester-testsInstall-MaesterTestsRunning AD Tests
Section titled “Running AD Tests”# Import the Maester moduleImport-Module Maester -Force
# Explicitly validate the Active Directory connectionConnect-Maester -Service ActiveDirectory
# Run all AD testsInvoke-Maester -Path "./ad" -OutputFolder "./ad-results" -SkipGraphConnect -NonInteractive
# Run specific categoriesInvoke-Maester -Path "./ad/user" -OutputFolder "./ad-results" -SkipGraphConnect -NonInteractiveInvoke-Maester -Path "./ad/gpostate" -OutputFolder "./ad-results" -SkipGraphConnect -NonInteractive
# Run with specific tagsInvoke-Maester -Tag "AD.User" -OutputFolder "./ad-results" -SkipGraphConnect -NonInteractiveUsing the AD Test Runner
Section titled “Using the AD Test Runner”For convenience, use the included test runner script:
# From the repository root on a domain controller.\build\activeDirectory\Run-ADTests-And-CopyReports.ps1 -ConnectActiveDirectory
# With verbose output.\build\activeDirectory\Run-ADTests-And-CopyReports.ps1 -ConnectActiveDirectory -Verbose📈 Understanding Test Results
Section titled “📈 Understanding Test Results”Test Output Format
Section titled “Test Output Format”Tests return standardized results:
| Result | Meaning |
|---|---|
$true | Test executed successfully / Configuration compliant |
$false | Configuration non-compliant |
$null | AD not available (test skipped) |
Sample Output
Section titled “Sample Output”# Example: Password Policy TestConnect-Maester -Service ActiveDirectory
Test-MtAdPasswordComplexityRequired# Returns: $true (complexity enabled - good)
Test-MtAdPasswordMinLength# Returns: 7 (below recommended 14+)
Test-MtAdAccountLockoutThreshold# Returns: 0 (disabled - security risk!)HTML Reports
Section titled “HTML Reports”Generate professional HTML reports for stakeholders:
Connect-Maester -Service ActiveDirectoryInvoke-Maester -Path "./ad" -OutputFolder "./reports" -SkipGraphConnect -NonInteractive# Open ./reports/TestResults-*.html🔐 Security Recommendations
Section titled “🔐 Security Recommendations”Based on AD test results, consider these best practices:
Password Policies
Section titled “Password Policies”- ✅ Set minimum password length to 14+ characters
- ✅ Enable account lockout (threshold ≤ 5 attempts)
- ✅ Configure lockout duration to 30+ minutes
- ✅ Implement fine-grained password policies for privileged accounts
User Accounts
Section titled “User Accounts”- ✅ Disable accounts with passwords that never expire
- ✅ Remove delegation from non-DC accounts
- ✅ Eliminate DES-only Kerberos accounts
- ✅ Monitor dormant enabled accounts (>90 days)
Group Policy
Section titled “Group Policy”- ✅ Remove cpassword entries from GPOs
- ✅ Ensure all GPOs have Authenticated Users permission
- ✅ Resolve AD/Sysvol version mismatches
- ✅ Audit and remove unlinked GPOs
Domain Controllers
Section titled “Domain Controllers”- ✅ Disable SMBv1 on all DCs
- ✅ Enable SMB signing
- ✅ Use standard LDAP/LDAPS ports (389/636)
- ✅ Keep DC OS versions current
🔄 Integration with CI/CD
Section titled “🔄 Integration with CI/CD”Run AD tests in your automation pipelines from a self-hosted Windows agent that can reach a domain controller and has the required RSAT modules installed. Cloud-hosted runners do not have access to your AD environment.
GitHub Actions
Section titled “GitHub Actions”name: AD Security Testson: schedule: - cron: '0 2 * * *' # Daily at 2 AM
jobs: test: runs-on: [self-hosted, windows, ad-connected] steps: - name: Run Maester AD Tests shell: pwsh run: | Install-Module Maester -Force Import-Module Maester $testPath = Join-Path $env:RUNNER_TEMP 'maester-tests' Install-MaesterTests -Path $testPath -SkipPesterCheck Connect-Maester -Service ActiveDirectory Invoke-Maester -Path (Join-Path $testPath 'ad') -Tag 'AD' -SkipGraphConnect -NonInteractiveAzure DevOps
Section titled “Azure DevOps”trigger:- main
pool: name: 'AD-connected Windows agents'
steps:- task: PowerShell@2 inputs: targetType: 'inline' script: | Install-Module Maester -Force Import-Module Maester $testPath = Join-Path $env:AGENT_TEMPDIRECTORY 'maester-tests' Install-MaesterTests -Path $testPath -SkipPesterCheck Connect-Maester -Service ActiveDirectory Invoke-Maester -Path (Join-Path $testPath 'ad') -Tag 'AD' -OutputFolder "$(Build.ArtifactStagingDirectory)" -SkipGraphConnect -NonInteractive🧪 Test Development & Validation
Section titled “🧪 Test Development & Validation”All 300+ tests were developed following a rigorous 20-phase methodology:
- Phase 1-6: Core objects (Computers, SPNs, Password Policies, DNS, Domain, DCs)
- Phase 7-10: Policy and structure (GPO, Groups, Users, OUs)
- Phase 11-14: Infrastructure (Sites, Trusts, Schema, Config)
- Phase 15-20: Advanced security (DC details, Forest, Security Accounts, Replication, GPO State, DACL)
Each test includes:
- PowerShell test function
- Pester unit tests
- Markdown documentation with security context
- Validation against live Domain Controllers
📚 Available Commands
Section titled “📚 Available Commands”New AD-Specific Cmdlets
Section titled “New AD-Specific Cmdlets”| Cmdlet | Description |
|---|---|
Get-MtADDomainState | Collect and cache AD state data |
Get-MtADDacls | Retrieve DACL information |
Get-MtADDomainState | Get domain configuration state |
Get-MtADGpoState | Get GPO detailed state |
Clear-MtADCache | Clear AD cache data |
🤝 Contributing
Section titled “🤝 Contributing”Active Directory testing is an ongoing effort. We welcome contributions for:
- New test categories (e.g., Certificate Services, ADFS)
- Additional test cases for existing categories
- Performance optimizations
- Documentation improvements
See our Contributing Guide to get started.
🙏 Thank You
Section titled “🙏 Thank You”This massive undertaking wouldn’t be possible without the Maester community. Special thanks to all contributors who helped design, implement, and validate these 300+ tests.
🚀 Get Started Today
Section titled “🚀 Get Started Today”# Update MaesterUpdate-Module Maester -Force
# Install latest testscd ~/maester-testsUpdate-MaesterTests
# Explicitly validate the Active Directory connectionConnect-Maester -Service ActiveDirectory
# Run AD tests on your domain controllerInvoke-Maester -Path "./ad" -SkipGraphConnect -NonInteractive📖 Resources
Section titled “📖 Resources”Happy AD Testing! 🏰🔒

