Business Value
The New-SmbSpnAuditPlan command provides a way to identify potential issues with ServicePrincipalName (SPN) registrations in Active Directory. This is particularly useful for organizations that rely heavily on Windows-based systems and have complex SPN configurations.
- Potential business benefits:
- Reduce the risk of authentication failures due to incorrect or missing SPNs
- Improve security by ensuring that only authorized services are registered with specific SPNs
- Simplify troubleshooting and auditing of SPN-related issues
Who Uses This
The New-SmbSpnAuditPlan command is typically used by:
- System administrators responsible for managing Windows-based systems and Active Directory
- Security teams tasked with auditing and monitoring system configurations
- Compliance officers who need to ensure that system configurations meet regulatory requirements
Risks
Failure to properly manage SPNs can result in:
- Authentication failures due to incorrect or missing SPNs
- Security vulnerabilities if unauthorized services are registered with specific SPNs
- Non-compliance with regulatory requirements if SPN configurations are not properly documented and audited
When a Manager Cares
A manager should be concerned about the output of New-SmbSpnAuditPlan when:
- Authentication failures occur due to incorrect or missing SPNs
- Security audits identify potential vulnerabilities related to SPN configurations
- Compliance requirements indicate that system configurations need to be updated to meet regulatory standards
Day-to-Day Use
To use the New-SmbSpnAuditPlan command, follow these steps:
- Run
Get-SmbSpnCandidateto retrieve a list of expected SPNs for the current machine account. - Run
New-SmbSpnAuditPlanwith the output from step 1 as input. - Review the audit plan output to identify any missing or orphaned SPNs.
Example code:
$expectedSPNs = Get-SmbSpnCandidate -TargetComputer $env:COMPUTERNAME
(New-SmbSpnAuditPlan -Candidate $expectedSPNs).MissingSpns | Format-Table -AutoSizeCommon Patterns and Code Examples
- Use
Get-SmbSpnCandidateto retrieve a list of expected SPNs for the current machine account. - Use
New-SmbSpnAuditPlanwith the output fromGet-SmbSpnCandidateas input.
Watchpoints:
- Ensure that the machine account’s ServicePrincipalName attribute is properly configured in Active Directory.
- Regularly run
Get-SmbSpnCandidateandNew-SmbSpnAuditPlanto identify any changes or issues with SPN configurations.
What This Does
The New-SmbSpnAuditPlan command compares the expected SPNs for the current machine account with the actual SPNs registered in Active Directory. It identifies any missing or orphaned SPNs and provides a plan for updating the system configuration to meet regulatory requirements.
Step-by-Step Recipe:
- Run
Get-SmbSpnCandidateto retrieve a list of expected SPNs for the current machine account. - Run
New-SmbSpnAuditPlanwith the output from step 1 as input. - Review the audit plan output to identify any missing or orphaned SPNs.
What to Do When Stuck:
- Consult the documentation for
Get-SmbSpnCandidateandNew-SmbSpnAuditPlan. - Reach out to a system administrator or security expert for assistance.
| 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.SMB |
| 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. |
The New-SmbSpnAuditPlan command helps organizations meet regulatory requirements related to SPN configurations. It:
- Identifies any missing or orphaned SPNs, reducing the risk of authentication failures.
- Ensures that only authorized services are registered with specific SPNs, improving security.
- Provides a plan for updating the system configuration to meet regulatory standards.
Data-handling and transit requirements:
- The command reads the machine account’s ServicePrincipalName attribute from Active Directory.
- It uses the output from
Get-SmbSpnCandidateas input, which retrieves a list of expected SPNs for the current machine account.
At-rest requirements:
- The command stores the audit plan output in memory and does not write any data to disk.
Audit trail:
- The command provides a detailed audit plan output that includes information about missing or orphaned SPNs.
- Organizations should regularly review this output to ensure compliance with regulatory requirements.
This is the plan step. It turns a candidate into a plan showing what is missing; nothing is changed. Its output is normally piped into Test-SpnAuditPlan. Providers: AD.SMB.
Example 1
Get-SmbSpnCandidate -TargetComputer 'fileserver01' | New-SmbSpnAuditPlanAlso uses: Get-SmbSpnCandidate (Sense).
Example 2
New-SmbSpnAuditPlan -Candidate $candidateExample 3
Get-SmbSpnCandidate -TargetComputer 'srv01' | New-SmbSpnAuditPlan | Test-SpnAuditPlanAlso uses: Get-SmbSpnCandidate (Sense), Test-SpnAuditPlan (Test).