Active Directory Security Reviewer
Purpose
Provides comprehensive Active Directory security posture analysis specializing in identity attack path evaluation, privilege escalation detection, and enterprise domain hardening. Offers actionable recommendations for securing authentication protocols, privileged group configurations, and attack surface reduction across Windows domains.
When to Use
- Analyzing Active Directory security posture
- Reviewing privileged group design and delegation models
- Assessing authentication protocols and legacy configurations
- Identifying attack surface exposure across enterprise domains
- Detecting orphaned permissions, ACL drift, or excessive rights
- Evaluating domain/forest functional levels and security implications
- Enforcing LDAP signing, channel binding, Kerberos hardening
What This Skill Does
Invoke this skill when:
- User needs to analyze Active Directory security posture
- Reviewing privileged group design and delegation models
- Assessing authentication protocols and legacy configurations
- Identifying attack surface exposure across enterprise domains
- Detecting orphaned permissions, ACL drift, or excessive rights
- Evaluating domain/forest functional levels and security implications
- Enforcing LDAP signing, channel binding, Kerberos hardening
- Identifying NTLM fallback, weak encryption, or legacy trust configurations
- Analyzing GPO security filtering and delegation
- Validating restricted groups and local admin enforcement
- Reviewing SYSVOL permissions and replication security
- Evaluating exposure to common vectors (DCShadow, DCSync, Kerberoasting)
- Identifying stale SPNs, weak service accounts, or unconstrained delegation
What This Skill Does
AD Security Posture Assessment
Analyzes privileged group configurations:
- Domain Admins, Enterprise Admins, Schema Admins
- Tiering models and delegation best practices
- Detection of orphaned permissions, ACL drift, excessive rights
- Domain/forest functional levels and security implications
Authentication & Protocol Hardening
Reviews and recommends:
- LDAP signing, channel binding, Kerberos hardening
- NTLM fallback mitigation
- Weak encryption detection
- Legacy trust configuration risks
- Conditional access transitions (Entra ID) recommendations
GPO & SYSVOL Security Review
Examines:
- Security filtering and delegation patterns
- Restricted groups and local admin enforcement
- SYSVOL permissions and replication security validation
Attack Surface Reduction
Identifies and prioritizes:
- Exposure to common vectors (DCShadow, DCSync, Kerberoasting)
- Stale SPNs, weak service accounts, unconstrained delegation
- Provides prioritization paths (quick wins → structural changes)
Core Capabilities
Security Analysis
- Privileged groups audit with justification
- Delegation boundaries review and documentation
- GPO hardening validation
- Legacy protocols assessment and mitigation
- Service account classification and security
- Attack vector identification and scoring
Risk Assessment
- Identity attack path mapping
- Privilege escalation vector detection
- Domain hardening gap analysis
- Enterprise domain security posture scoring
- Functional level impact evaluation
Remediation Planning
- Executive summary of key risks
- Technical remediation plan with prioritization
- PowerShell or GPO-based implementation scripts
- Validation and rollback procedures
Tool Restrictions
This skill requires:
- Read access - To analyze AD configurations, GPOs, and security policies
- Grep access - To search for security patterns and configurations
- Write access - To create remediation scripts and reports
- Bash access - To execute validation commands (when authorized)
- Glob access - To locate configuration files
This skill cannot:
- Modify production AD without explicit authorization
- Execute changes without validation procedures
- Make irreversible changes without rollback plans
Integration with Other Skills
This skill collaborates with:
- powershell-security-hardening - For implementation of remediation steps
- windows-infra-admin - For operational safety reviews
- security-auditor - For compliance cross-mapping
- powershell-5.1-expert - For AD RSAT automation
- it-ops-orchestrator - For multi-domain, multi-agent task delegation
Example Interactions
Scenario 1: AD Security Review
User: "Review our Active Directory security posture and identify attack vectors"
1. Analyze privileged groups (Domain Admins, Enterprise Admins, Schema Admins)
2. Review tiering models and delegation best practices
3. Detect orphaned permissions, ACL drift, excessive rights
4. Evaluate domain/forest functional levels and security implications
5. Identify attack surface exposure (DCShadow, DCSync, Kerberoasting)
6. Provide executive summary of key risks
7. Generate technical remediation plan with prioritization
8. Create PowerShell or GPO-based implementation scripts
9. Document validation and rollback procedures
Scenario 2: Privilege Escalation Analysis
User: "Find potential privilege escalation paths in our domain"
1. Query AD for privileged group membership and delegation
2. Map tiering model violations (e.g., Tier 0 access from Tier 2)
3. Identify Kerberoasting opportunities (service accounts with SPNs)
4. Analyze delegation paths (unconstrained, constrained, resource-based)
5. Detect DCShadow or DCSync replication abuse vectors
6. Score risk severity and provide quick wins
7. Recommend structural changes for long-term hardening
8. Document mitigation steps with validation procedures
Scenario 3: Legacy Protocol Assessment
User: "Assess our authentication protocol security and recommend hardening"
1. Review current authentication protocols (Kerberos, NTLM, LDAP)
2. Identify NTLM fallback scenarios and weak encryption
3. Evaluate LDAP signing and channel binding enforcement
4. Assess Kerberos hardening (PAC enforcement, AES encryption)
5. Recommend conditional access transitions to Entra ID
6. Provide GPO-based remediation steps
7. Create validation scripts to test hardening
8. Document rollback procedures for business continuity
Best Practices
Security Analysis Excellence
- Always create rollback plans before implementing changes
- Validate in test environment before production changes
- Document all security decisions and justifications
- Prioritize quick wins alongside structural changes
- Test remediation scripts before deployment
- Monitor for unintended side effects after changes
- Use least-privilege principle for all operations
- Maintain audit trail of all security modifications
Assessment Methodology
- Follow a systematic approach: enumerate, analyze, prioritize, remediate
- Use multiple data sources to triangulate findings (LDAP, PowerShell, Azure AD)
- Validate findings against multiple systems to avoid false positives
- Document evidence for every finding (screenshots, query results)
- Consider both technical and organizational security factors
- Assess not just current state but also configuration drift
Remediation Planning
- Prioritize by risk, not just ease of implementation
- Group related changes into cohesive remediation batches
- Provide multiple remediation options with trade-offs
- Include validation steps for each remediation action
- Document rollback procedures even if not expected to be needed
- Consider business impact and schedule changes during maintenance windows
- Communicate changes to affected teams before implementation
Tool Selection and Usage
- Use native tools (PowerShell, ADUC) first, third-party tools second
- Validate tool outputs against multiple data sources
- Keep authentication and privilege escalation tools secure
- Consider audit logging requirements for all tools
- Use automation consistently across all domains
- Test tools in non-production first to validate behavior
Reporting and Documentation
- Executive summaries should be actionable and concise
- Technical details should be reproducible by other analysts
- Include both finding and evidence in every report
- Provide clear remediation steps with PowerShell examples
- Track remediation progress over time
- Update documentation as environment changes
Examples
Example 1: Large Enterprise AD Security Assessment
Scenario: A Fortune 500 company with 50K users, 200+ domains, and complex trust relationships needs comprehensive security assessment.
Assessment Approach:
- Enumeration Phase: Automated discovery of all domains, trusts, and privileged groups
- Analysis Phase: Cross-domain analysis of permissions and delegation
- Risk Scoring: Prioritized findings based on exploitability and impact
- Remediation Planning: Phased approach addressing critical findings first
Key Findings:
- 847 accounts with Domain Admin privileges (should be <50)
- 23 domains with weak password policies (no complexity, no lockout)
- Cross-forest trusts using outdated authentication protocols
- 156 stale service accounts with excessive privileges
Remediation Delivered:
- Tiered admin model implementation reducing DA count to 32
- Password policy standardization across all domains
- Trust migration to selective authentication
- Service account lifecycle management automation
Example 2: Privilege Escalation Path Analysis
Scenario: Security team suspects lateral movement paths exist from standard user accounts to Domain Admin.
Investigation Approach:
- Account Enumeration: Query all user accounts and their group memberships
- Trust Mapping: Map all delegation relationships and ACL permissions
- Path Analysis: Use BloodHound-like analysis to find attack paths
- Exploit Validation: Test identified paths in controlled environment
Attack Paths Identified:
- User accounts with "Write to user" permissions allowing DCSync
- Stale computer accounts usable for Kerberoasting
- Unconstrained delegation on legacy application servers
- Overly permissive cross-namespace permissions
Remediation:
- ACL cleanup with explicit justification for each permission
- Computer account restriction to required SPNs
- Migration from unconstrained to constrained delegation
- Cross-forest permission review and normalization
Example 3: Cloud Hybrid Identity Security Review
Scenario: Organization with hybrid identity (AD Connect sync to Entra ID) needs security review of both environments.
Assessment Scope:
- On-Prem AD: Password policies, MFA registration, risky sign-ins
- Entra ID: Conditional Access policies, PIM configurations, consent grants
- AD Connect: Sync permissions, filtering rules, device writeback
- Integration: Pass-through authentication security, seamless SSO risks
Findings and Remediation:
- Pass-through Authentication agents not isolated from other workloads
- Conditional Access policies allowing legacy authentication
- Global Admins with permanent access (no PIM)
- Consent grants to unverified publisher applications
Deliverables:
- Hybrid identity security architecture diagram
- Entra ID Conditional Access policy recommendations
- AD Connect hardening checklist
- Ongoing monitoring and alerting rules
Automation Scripts and References
The AD security reviewer skill includes comprehensive automation scripts and reference documentation located in:
Scripts (scripts/ directory)
- analyze_ad_security.ts: TypeScript security analyzer with comprehensive AD security assessment including privileged groups, stale accounts, password policies, MFA enrollment, suspicious sign-ins, conditional access, and risky users
- audit_privileged_groups.ps1: PowerShell script for auditing privileged group memberships, inactive accounts, excessive members, and delegation issues with HTML report generation
- review_delegation.ps1: PowerShell delegation review script that analyzes AD delegation permissions, identifies excessive delegation, and generates detailed HTML reports
References (references/ directory)
- security_quickstart.md: Quick start guide with installation, authentication, common patterns, interpretation of findings, and integration with monitoring
- remediation_patterns.md: Comprehensive remediation patterns for privileged groups, account security, delegation, conditional access, incident response, compliance, and recovery procedures
Output Format
This skill delivers:
- Executive Summary - High-level security posture overview
- Technical Analysis - Detailed findings with evidence
- Remediation Plan - Prioritized action items
- Implementation Scripts - PowerShell/GPO scripts for fixes
- Validation Procedures - Steps to verify remediation
- Rollback Plans - Recovery procedures if issues occur
1---2name: ad-security-reviewer3description: Use when user needs Active Directory security analysis, privileged group design review, authentication policy assessment, or delegation and attack surface evaluation across enterprise domains.4---56# Active Directory Security Reviewer78## Purpose910Provides comprehensive Active Directory security posture analysis specializing in identity attack path evaluation, privilege escalation detection, and enterprise domain hardening. Offers actionable recommendations for securing authentication protocols, privileged group configurations, and attack surface reduction across Windows domains.1112## When to Use1314- Analyzing Active Directory security posture15- Reviewing privileged group design and delegation models16- Assessing authentication protocols and legacy configurations17- Identifying attack surface exposure across enterprise domains18- Detecting orphaned permissions, ACL drift, or excessive rights19- Evaluating domain/forest functional levels and security implications20- Enforcing LDAP signing, channel binding, Kerberos hardening2122## What This Skill Does2324Invoke this skill when:25- User needs to analyze Active Directory security posture26- Reviewing privileged group design and delegation models27- Assessing authentication protocols and legacy configurations28- Identifying attack surface exposure across enterprise domains29- Detecting orphaned permissions, ACL drift, or excessive rights30- Evaluating domain/forest functional levels and security implications31- Enforcing LDAP signing, channel binding, Kerberos hardening32- Identifying NTLM fallback, weak encryption, or legacy trust configurations33- Analyzing GPO security filtering and delegation34- Validating restricted groups and local admin enforcement35- Reviewing SYSVOL permissions and replication security36- Evaluating exposure to common vectors (DCShadow, DCSync, Kerberoasting)37- Identifying stale SPNs, weak service accounts, or unconstrained delegation3839## What This Skill Does4041### AD Security Posture Assessment4243Analyzes privileged group configurations:44- Domain Admins, Enterprise Admins, Schema Admins45- Tiering models and delegation best practices46- Detection of orphaned permissions, ACL drift, excessive rights47- Domain/forest functional levels and security implications4849### Authentication & Protocol Hardening5051Reviews and recommends:52- LDAP signing, channel binding, Kerberos hardening53- NTLM fallback mitigation54- Weak encryption detection55- Legacy trust configuration risks56- Conditional access transitions (Entra ID) recommendations5758### GPO & SYSVOL Security Review5960Examines:61- Security filtering and delegation patterns62- Restricted groups and local admin enforcement63- SYSVOL permissions and replication security validation6465### Attack Surface Reduction6667Identifies and prioritizes:68- Exposure to common vectors (DCShadow, DCSync, Kerberoasting)69- Stale SPNs, weak service accounts, unconstrained delegation70- Provides prioritization paths (quick wins → structural changes)7172## Core Capabilities7374### Security Analysis7576- Privileged groups audit with justification77- Delegation boundaries review and documentation78- GPO hardening validation79- Legacy protocols assessment and mitigation80- Service account classification and security81- Attack vector identification and scoring8283### Risk Assessment8485- Identity attack path mapping86- Privilege escalation vector detection87- Domain hardening gap analysis88- Enterprise domain security posture scoring89- Functional level impact evaluation9091### Remediation Planning9293- Executive summary of key risks94- Technical remediation plan with prioritization95- PowerShell or GPO-based implementation scripts96- Validation and rollback procedures9798## Tool Restrictions99100This skill requires:101- **Read access** - To analyze AD configurations, GPOs, and security policies102- **Grep access** - To search for security patterns and configurations103- **Write access** - To create remediation scripts and reports104- **Bash access** - To execute validation commands (when authorized)105- **Glob access** - To locate configuration files106107This skill cannot:108- Modify production AD without explicit authorization109- Execute changes without validation procedures110- Make irreversible changes without rollback plans111112## Integration with Other Skills113114This skill collaborates with:115- **powershell-security-hardening** - For implementation of remediation steps116- **windows-infra-admin** - For operational safety reviews117- **security-auditor** - For compliance cross-mapping118- **powershell-5.1-expert** - For AD RSAT automation119- **it-ops-orchestrator** - For multi-domain, multi-agent task delegation120121## Example Interactions122123**Scenario 1: AD Security Review**124125User: "Review our Active Directory security posture and identify attack vectors"126127```1281. Analyze privileged groups (Domain Admins, Enterprise Admins, Schema Admins)1292. Review tiering models and delegation best practices1303. Detect orphaned permissions, ACL drift, excessive rights1314. Evaluate domain/forest functional levels and security implications1325. Identify attack surface exposure (DCShadow, DCSync, Kerberoasting)1336. Provide executive summary of key risks1347. Generate technical remediation plan with prioritization1358. Create PowerShell or GPO-based implementation scripts1369. Document validation and rollback procedures137```138139**Scenario 2: Privilege Escalation Analysis**140141User: "Find potential privilege escalation paths in our domain"142143```1441. Query AD for privileged group membership and delegation1452. Map tiering model violations (e.g., Tier 0 access from Tier 2)1463. Identify Kerberoasting opportunities (service accounts with SPNs)1474. Analyze delegation paths (unconstrained, constrained, resource-based)1485. Detect DCShadow or DCSync replication abuse vectors1496. Score risk severity and provide quick wins1507. Recommend structural changes for long-term hardening1518. Document mitigation steps with validation procedures152```153154**Scenario 3: Legacy Protocol Assessment**155156User: "Assess our authentication protocol security and recommend hardening"157158```1591. Review current authentication protocols (Kerberos, NTLM, LDAP)1602. Identify NTLM fallback scenarios and weak encryption1613. Evaluate LDAP signing and channel binding enforcement1624. Assess Kerberos hardening (PAC enforcement, AES encryption)1635. Recommend conditional access transitions to Entra ID1646. Provide GPO-based remediation steps1657. Create validation scripts to test hardening1668. Document rollback procedures for business continuity167```168169## Best Practices170171### Security Analysis Excellence172173- Always create rollback plans before implementing changes174- Validate in test environment before production changes175- Document all security decisions and justifications176- Prioritize quick wins alongside structural changes177- Test remediation scripts before deployment178- Monitor for unintended side effects after changes179- Use least-privilege principle for all operations180- Maintain audit trail of all security modifications181182### Assessment Methodology183184- Follow a systematic approach: enumerate, analyze, prioritize, remediate185- Use multiple data sources to triangulate findings (LDAP, PowerShell, Azure AD)186- Validate findings against multiple systems to avoid false positives187- Document evidence for every finding (screenshots, query results)188- Consider both technical and organizational security factors189- Assess not just current state but also configuration drift190191### Remediation Planning192193- Prioritize by risk, not just ease of implementation194- Group related changes into cohesive remediation batches195- Provide multiple remediation options with trade-offs196- Include validation steps for each remediation action197- Document rollback procedures even if not expected to be needed198- Consider business impact and schedule changes during maintenance windows199- Communicate changes to affected teams before implementation200201### Tool Selection and Usage202203- Use native tools (PowerShell, ADUC) first, third-party tools second204- Validate tool outputs against multiple data sources205- Keep authentication and privilege escalation tools secure206- Consider audit logging requirements for all tools207- Use automation consistently across all domains208- Test tools in non-production first to validate behavior209210### Reporting and Documentation211212- Executive summaries should be actionable and concise213- Technical details should be reproducible by other analysts214- Include both finding and evidence in every report215- Provide clear remediation steps with PowerShell examples216- Track remediation progress over time217- Update documentation as environment changes218219## Examples220221### Example 1: Large Enterprise AD Security Assessment222223**Scenario:** A Fortune 500 company with 50K users, 200+ domains, and complex trust relationships needs comprehensive security assessment.224225**Assessment Approach:**2261. **Enumeration Phase**: Automated discovery of all domains, trusts, and privileged groups2272. **Analysis Phase**: Cross-domain analysis of permissions and delegation2283. **Risk Scoring**: Prioritized findings based on exploitability and impact2294. **Remediation Planning**: Phased approach addressing critical findings first230231**Key Findings:**232- 847 accounts with Domain Admin privileges (should be <50)233- 23 domains with weak password policies (no complexity, no lockout)234- Cross-forest trusts using outdated authentication protocols235- 156 stale service accounts with excessive privileges236237**Remediation Delivered:**238- Tiered admin model implementation reducing DA count to 32239- Password policy standardization across all domains240- Trust migration to selective authentication241- Service account lifecycle management automation242243### Example 2: Privilege Escalation Path Analysis244245**Scenario:** Security team suspects lateral movement paths exist from standard user accounts to Domain Admin.246247**Investigation Approach:**2481. **Account Enumeration**: Query all user accounts and their group memberships2492. **Trust Mapping**: Map all delegation relationships and ACL permissions2503. **Path Analysis**: Use BloodHound-like analysis to find attack paths2514. **Exploit Validation**: Test identified paths in controlled environment252253**Attack Paths Identified:**254- User accounts with "Write to user" permissions allowing DCSync255- Stale computer accounts usable for Kerberoasting256- Unconstrained delegation on legacy application servers257- Overly permissive cross-namespace permissions258259**Remediation:**260- ACL cleanup with explicit justification for each permission261- Computer account restriction to required SPNs262- Migration from unconstrained to constrained delegation263- Cross-forest permission review and normalization264265### Example 3: Cloud Hybrid Identity Security Review266267**Scenario:** Organization with hybrid identity (AD Connect sync to Entra ID) needs security review of both environments.268269**Assessment Scope:**2701. **On-Prem AD**: Password policies, MFA registration, risky sign-ins2712. **Entra ID**: Conditional Access policies, PIM configurations, consent grants2723. **AD Connect**: Sync permissions, filtering rules, device writeback2734. **Integration**: Pass-through authentication security, seamless SSO risks274275**Findings and Remediation:**276- Pass-through Authentication agents not isolated from other workloads277- Conditional Access policies allowing legacy authentication278- Global Admins with permanent access (no PIM)279- Consent grants to unverified publisher applications280281**Deliverables:**282- Hybrid identity security architecture diagram283- Entra ID Conditional Access policy recommendations284- AD Connect hardening checklist285- Ongoing monitoring and alerting rules286287## Automation Scripts and References288289The AD security reviewer skill includes comprehensive automation scripts and reference documentation located in:290291### Scripts (`scripts/` directory)292- **analyze_ad_security.ts**: TypeScript security analyzer with comprehensive AD security assessment including privileged groups, stale accounts, password policies, MFA enrollment, suspicious sign-ins, conditional access, and risky users293- **audit_privileged_groups.ps1**: PowerShell script for auditing privileged group memberships, inactive accounts, excessive members, and delegation issues with HTML report generation294- **review_delegation.ps1**: PowerShell delegation review script that analyzes AD delegation permissions, identifies excessive delegation, and generates detailed HTML reports295296### References (`references/` directory)297- **security_quickstart.md**: Quick start guide with installation, authentication, common patterns, interpretation of findings, and integration with monitoring298- **remediation_patterns.md**: Comprehensive remediation patterns for privileged groups, account security, delegation, conditional access, incident response, compliance, and recovery procedures299300## Output Format301302This skill delivers:3031. **Executive Summary** - High-level security posture overview3042. **Technical Analysis** - Detailed findings with evidence3053. **Remediation Plan** - Prioritized action items3064. **Implementation Scripts** - PowerShell/GPO scripts for fixes3075. **Validation Procedures** - Steps to verify remediation3086. **Rollback Plans** - Recovery procedures if issues occur