Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BeforeAll {
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot '../../../..')
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot '../../..')
. (Join-Path $repoRoot 'powershell/internal/services/ad/ConvertTo-MtAdcsEnrollmentPrerequisiteState.ps1')
function ConvertFrom-MtLdapValue { param($Value) return $Value }
}
Expand Down
8 changes: 6 additions & 2 deletions tests/ad/security/Test.AD-CS-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Evaluates whether an enterprise CA publishes certificate templates whose collect

**Operational**

#### Security Recommendation
#### Remediation action

- Review every published template that supports client authentication and lets the requester supply subject information.
- Require manager approval or authorized signatures where business workflows permit.
Expand All @@ -24,5 +24,9 @@ The test deliberately distinguishes observed prerequisites from exploitability.
- **PotentiallyEligible**: dangerous template and publication conditions exist, with ACL evidence available for follow-up.
- **Inconclusive**: required configuration or authorization evidence is unavailable.

#### Related links

- [AD CS overview](https://learn.microsoft.com/windows-server/identity/ad-cs/active-directory-certificate-services-overview)

<!--- Results --->
%TestResult%
%TestResult%
14 changes: 11 additions & 3 deletions tests/ad/security/Test.AD-CS-01.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
function Test-MtAdcsPublishedTemplatePrerequisites {
function Test-MtAdcsPublishedTemplatePrerequisite {
<#
.SYNOPSIS
Reviews published AD CS templates for modeled enrollment prerequisites.
.DESCRIPTION
Correlates CA publication, authentication EKUs, subject supply, manager approval and available authorization
evidence. Candidate results require review and do not establish effective enrollment rights.
#>
[MaesterTest(
Id = 'AD-CS-01',
Title = 'Published AD CS templates should not expose dangerous enrollment prerequisites',
Expand All @@ -12,7 +19,8 @@
Mitre = 'T1649',
Service = 'ActiveDirectory',
Permission = ('ActiveDirectory:Ldap:Configuration/*:ReadProperty'),
Author = 'Mario Contestabile'
Author = 'rolling-code',
Contributor = 'FiraSenax'
)]
[CmdletBinding()]
[OutputType([bool])]
Expand Down Expand Up @@ -44,4 +52,4 @@

Add-MtTestResultDetail -Result "Published template candidates require authorization review. Configuration prerequisites do not prove exploitation.`n`n$result" -Investigate
return $null
}
}