The Get-DnsSpnCandidate command from the SpnManager module helps administrators ensure DNS SPN settings are correctly configured for their organization’s security needs. This is particularly important on servers running the DNS Server role, as Windows auto-registers specific DNS SPNs that can be a potential security risk if not managed.
- Uses:
- Security teams to identify and remediate DNS SPN misconfigurations.
- IT administrators to ensure correct configuration for their organization’s DNS servers.
- Compliance officers to demonstrate adherence to regulatory requirements.
- Risks:
- Insecurely configured DNS SPNs can allow unauthorized access or data exposure.
- Failing to address auto-registered DNS SPNs on DNS Server role instances can lead to security issues.
- When a manager cares:
- During regular security audits and vulnerability assessments.
- After a security incident where DNS SPN misconfiguration is suspected.
- Prior to implementing changes that could affect DNS or Active Directory.
To use Get-DnsSpnCandidate, follow these steps:
- Install the SpnManager module and import it in your PowerShell session:
Install-Module -Name SpnManager
Import-Module -Name SpnManager- Run the command with no parameters to retrieve the expected DNS SPN set for the target machine:
Get-DnsSpnCandidate- The output will contain two
SpnCandidateobjects describing the auto-registered DNS SPNs. - Use the resulting objects as input for other SpnManager cmdlets, such as
New-DnsSpnAuditPlan.
Watchpoints:
- Be aware of potential security risks associated with auto-registered DNS SPNs on your organization’s servers.
- Regularly review and update your DNS SPN configurations to ensure they align with your organization’s security policies.
Get-DnsSpnCandidate is a PowerShell command that helps you understand what DNS SPNs are registered on your target machine. Here’s how it works in simple terms:
- The command identifies the type of server (e.g., DNS Server) and its role.
- It uses this information to determine which DNS SPNs should be expected for that server.
- The command returns two
SpnCandidateobjects, each describing a potential DNS SPN.
Step-by-step recipe:
- Run
Get-DnsSpnCandidateon your target machine. - Review the output to understand which DNS SPNs are registered.
- Use this information to update your DNS SPN configurations as needed.
When stuck:
- Consult SpnManager documentation for more detailed guidance on using this command.
- Reach out to your IT support team or security experts for assistance with DNS SPN configuration and management.
| 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.DNS |
| 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. |
Get-DnsSpnCandidate does not directly handle sensitive data but rather reports on DNS SPN configurations that can impact security and compliance.
Data handling: No sensitive data is processed or transmitted.
Transit: The command retrieves data locally on the target machine, ensuring no data transmission occurs during execution.
At-rest: DNS SPN configurations are stored in Active Directory; SpnManager cmdlets do not modify these settings directly.
Audit trail: This command does not create a log entry by itself. However, its output can be used as input for other cmdlets that generate audit trails (e.g.,
New-DnsSpnAuditPlan).Compliance requirements:
HIPAA: Ensure proper DNS SPN configuration to maintain security and data confidentiality.
PCI DSS: Regularly review and update DNS SPN configurations to prevent unauthorized access or data exposure.
This is the sense step. It reads the current state and produces a candidate; nothing is changed. Its output is normally piped into New-DnsSpnAuditPlan. Providers: AD.DNS.
Example 1
Get-DnsSpnCandidate -TargetComputer 'dc01'Example 2
Get-DnsSpnCandidateExample 3
Get-DnsSpnCandidate -TargetComputer 'dc01' | New-DnsSpnAuditPlanAlso uses: New-DnsSpnAuditPlan (Plan).