Case study · Active Directory security
Taking Active Directory from a PingCastle score of 100 to 4
How I hardened a 70-site hybrid domain as its only infrastructure administrator, without a big-bang change window.
- 100 → 4PingCastle risk score
- 96%Risk reduction
- 0Regressions
The starting point
The first PingCastle run against our domain scored 100, the worst possible result. That wasn't a sign of neglect so much as age: a directory that has grown for years across about 70 locations collects stale objects, over-privileged accounts and settings that made sense once. It's also the source of truth for our hybrid Microsoft Entra ID tenant, so anything I changed on-premises flowed straight into cloud sign-in.
As the only infrastructure administrator, I couldn't run this as a project with a big change window. It had to be a steady, low-risk program alongside everything else.
How I ran it
- Measure every week and diff the results. Weekly scans, compared against the previous one, with new and resolved findings posted to Teams. By the end of the first month, 20 findings had closed with zero regressions, and the domain had moved up a maturity level. (A cleaned-up version of that automation is in ad-security-ops.)
- Fix by blast radius, not by points. First the changes that couldn't break anything (stale objects, orphaned permissions, unused policies), then the ones that could (privileged groups, service accounts, authentication protocols).
- Read-only checks first, every time. Before deleting a dormant server object, for example, I confirmed it had no DNS record, no replication role, and no logon in years.
- Accept some risk on purpose. A few findings can't be fixed without breaking how the business works. They're documented as accepted risks rather than left to hide in the score.
What changed
- Privileged access. Removed disabled accounts from Domain Admins, cleared orphaned admin flags, and removed the cloud sync connector's rights from AdminSDHolder. Those rights had been stamped onto every protected object, including write access to delegation settings on the krbtgt account.
- A loaded gun, unloaded. Deleted an unlinked Group Policy object that would have made every domain user a local administrator on every machine it was linked to. It was one click from an outage.
- Schema and PKI. Fixed a known AD schema vulnerability (CVE-2021-34470) using temporary, removed-afterwards Schema Admins rights; cleaned up the certificates trusted for domain authentication; removed orphaned weak certificates from a trust policy; deleted an unused certificate template.
- Authentication. Configured the domain controllers for NTLMv2 only and applied hardened UNC paths for SYSVOL and NETLOGON.
- Visibility. Found the domain controllers' advanced audit policy GPO disabled and re-enabled it, and grew the DCs' security log from about 45 minutes of history to 4 GB.
- Stale objects. Deleted about a dozen dead computer objects running obsolete operating systems, after checking each one first.
- Local admin rights. A fleet-wide privilege-elevation rollout that removes standing local administrator rights from every computer, run in audit mode first. It closes the last major finding.
What I'd tell someone starting
Build the replacement before you take anything away.
My two rollbacks both came from removing access before its replacement was ready. When I took the first accounts out of Domain Admins, I had to give the access back until delegated permissions existed. And disabling accounts with non-expiring passwords broke our imaging process, because one of them was quietly holding it up. Both were fixed quickly, and both would have been avoided by an inventory of what each account actually does.
Two smaller lessons: progress isn't linear (the score sat flat for two weeks mid-project while the remaining findings got harder), and keep your scan archive clean. A misnamed report once had me working a finding that had already closed.