agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/active-directory-security/ad-privileged-access-review/SKILL.md

ad-privileged-access-review

Skill0 starsChanged 13 days agoMITView on GitHub

Review Active Directory privileged access — Tier 0 groups, AdminSDHolder/adminCount, krbtgt age, LAPS coverage, delegation, service accounts with SPNs, Protected Users — with PowerShell, PingCastle or Purple Knight. Use for AD security assessments, post-incident AD hardening, or when asked "who is effectively Domain Admin?".

The file

Files
SKILL.md

AD Privileged Access Review

Tier 0 scope

Domain Admins, Enterprise Admins, Schema Admins, Administrators (builtin), Account/Server/Print/Backup Operators, DnsAdmins, Group Policy Creator Owners, Cert Publishers, Key Admins / Enterprise Key Admins, members of any group with control over DCs, ADCS CAs, Entra Connect servers, and accounts with DCSync rights. Machines: DCs, ADCS, AD FS, Entra Connect, PAWs, backup servers with DC access.

Collection (read-only)

Import-Module ActiveDirectory
# Recursive membership of key groups
"Domain Admins","Enterprise Admins","Schema Admins","Administrators","Account Operators","Backup Operators","Server Operators","Print Operators","DnsAdmins" |
  ForEach-Object { $g=$_; Get-ADGroupMember $g -Recursive | Select-Object @{n='Group';e={$g}}, SamAccountName, objectClass }
# Accounts protected by AdminSDHolder (current or stale)
Get-ADUser -Filter 'adminCount -eq 1' -Properties adminCount, PasswordLastSet, LastLogonDate, Enabled
# krbtgt password age (reset at least every 180 days is a common guidance)
Get-ADUser krbtgt -Properties PasswordLastSet
# Kerberoastable privileged accounts
Get-ADUser -Filter 'servicePrincipalName -like "*"' -Properties servicePrincipalName, adminCount, PasswordLastSet, msDS-SupportedEncryptionTypes
# Unconstrained delegation (non-DC)
Get-ADComputer -Filter 'TrustedForDelegation -eq $true -and PrimaryGroupID -ne 516' -Properties TrustedForDelegation
# Constrained / RBCD
Get-ADObject -Filter 'msDS-AllowedToDelegateTo -like "*" -or msDS-AllowedToActOnBehalfOfOtherIdentity -like "*"' -Properties msDS-AllowedToDelegateTo
# Password never expires / not required
Get-ADUser -Filter 'PasswordNeverExpires -eq $true -or PasswordNotRequired -eq $true' -Properties PasswordNeverExpires, PasswordNotRequired
# AS-REP roastable
Get-ADUser -Filter 'DoesNotRequirePreAuth -eq $true'

Assessment tools: PingCastle (PingCastle.exe --healthcheck), Purple Knight, BloodHound for paths (ad-attack-path-analysis).

Findings to rate

FindingWhy it matters
>5 permanent Domain Admins, or user accounts used daily in DAStanding privilege; credential exposure on workstations
Privileged accounts with SPNsKerberoastable → offline cracking
krbtgt not reset in >180 daysGolden ticket longevity
Unconstrained delegation on non-DCsTGT capture (printer bug/coercion)
Privileged users not in Protected Users / no "sensitive and cannot be delegated"Delegation, NTLM, RC4 exposure
No LAPS (Windows LAPS) on workstations/serversShared local admin → lateral movement
Stale adminCount=1 accountsOrphaned privileged ACLs
Exchange/Entra Connect/backup service accounts with domain-level rightsCommon escalation paths

Output template

AD privileged access review — <domain> <date>
Tier 0 members: <n> (users <n>, service <n>, stale <n>)
Critical: <finding> — <evidence> — <remediation> — <owner>
Metrics: krbtgt age <d>, LAPS coverage <%>, kerberoastable privileged <n>

Related skills

ad-attack-path-analysis, kerberos-attack-detection, privileged-access-review, adcs-security-review

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.