SpnManager Kerberos SPN auditing and repair for Active Directory

Get-DfsSpnCandidate

Managers care about the business value of detecting DFS namespace roots and identifying CNAME alias SPN gaps because it:

Managers care about the business value of detecting DFS namespace roots and identifying CNAME alias SPN gaps because it:

  • Helps ensure secure authentication and authorization for network resources
  • Prevents security breaches by detecting and addressing potential vulnerabilities
  • Aligns with industry best practices and compliance requirements (e.g., DR-532 dual-condition rule)

When a manager cares, they may consider the following scenarios:

  • A recent security audit revealed vulnerabilities in their DFS namespace configuration.
  • There have been reports of authentication failures or denied access to network resources.
  • The organization is planning a major infrastructure upgrade or migration and wants to ensure secure SPN management.

To use Get-DfsSpnCandidate, follow these steps:

  1. Run the command with default parameters: Get-DfsSpnCandidate
  2. Use the -DfsRoots injection parameter for unit testing: Get-DfsSpnCandidate -DfsRoots <path>
  3. Optional: use Resolve-DnsName to resolve CNAME aliases

Code examples:

# Get DFS namespace roots and identify potential issues
Get-DfsSpnCandidate | Where-Object {$_.CnameAlias} | Format-Table -AutoSize

# Inject a custom list of DFS roots for testing
$dfsRoots = @("root1", "root2")
Get-DfsSpnCandidate -DfsRoots $dfsRoots

Watchpoints:

  • Verify the presence and accuracy of SPNs on namespace servers.
  • Regularly review DNS configuration to detect potential issues.

Here’s what Get-DfsSpnCandidate does in simple terms:

  1. It detects DFS namespace roots.
  2. For each root, it checks if there are any CNAME aliases.
  3. If a CNAME alias is found and doesn’t match the server FQDN, it identifies potential SPN gaps.

Step-by-step recipe:

  1. Run Get-DfsSpnCandidate to get an overview of your DFS namespace configuration.
  2. Review the output for any warnings or errors related to CNAME aliases.
  3. If necessary, use Resolve-DnsName to resolve CNAME aliases and verify SPN accuracy.
Field Value
Vendor Detent Point LLC
Product SpnManager 0.4.0
Licence Proprietary - licensed, not sold. See LICENSE.
Operational impact Read-only. Queries Active Directory and reports findings; changes nothing.
Rights required Directory read access. Some providers additionally need rights to read delegation and encryption-type attributes.
Providers covered AD.DFS
Approval recommendation Approve for general operational use. It cannot alter directory state.

Licence terms are proprietary and are supplied with the purchase, subscription or evaluation agreement. No open-source licence is granted.

What Why
Windows PowerShell 5.1 or later Declared by the module manifest.
ActiveDirectory 1.0.0.0 Required module. Ships with RSAT; install the Active Directory PowerShell feature.
A reachable domain controller Every provider reads from Active Directory.
An account with directory read access Needed to enumerate accounts and their SPNs.

This command handles sensitive data in the following ways:

  • Data-in-transit: DNS queries are sent over the network; ensure DNS is properly configured and secured.
  • Data-at-rest: None, as no data is stored or cached by Get-DfsSpnCandidate.
  • Audit trail: The cmdlet outputs a list of detected DFS namespace roots and potential SPN gaps for auditing purposes.

Compliance requirements:

  • Meet industry standards for secure authentication and authorization (e.g., DR-532 dual-condition rule).
  • Follow best practices for DNS configuration and security.
  • Regularly review and update your DFS namespace configuration to ensure compliance.

This is the sense step. It reads the current state and produces a candidate; nothing is changed. Its output is normally piped into New-DfsSpnAuditPlan. Providers: AD.DFS.

Example 1

Get-DfsSpnCandidate -TargetComputer 'dfsns01.corp.example.com'

Enumerates DFS namespace roots on dfsns01 and checks for CNAME gaps.

Example 2

$r = @([PSCustomObject]@{Path='\\corp.example.com\files'; NamespaceRoot='\\dfsns01.corp.example.com\files'})
Get-DfsSpnCandidate -DfsRoots $r

Uses injected DFS root data — no DFS module required.

Example 3

Get-DfsSpnCandidate -TargetComputer 'fs01' | New-DfsSpnPlan