AD security
AD Blue
# Overview
AD Blue is a read-only Active Directory security assessment tool. It runs 55 checks against a domain, scores what it finds, maps each finding to MITRE ATT&CK, and explains how to fix it. It never changes the directory. There is no "fix it" button, and remediation is written guidance only.
It has two front ends that share the same check scripts:
- A Windows desktop app (Electron and React) with a pre-flight screen, scan setup, live progress, a scored dashboard, and a findings table. It's still in development.
- A PowerShell report pack that runs on a domain controller and writes a single self-contained HTML report, plus CSV and ATT&CK Navigator exports. It's built for the kind of AD health report an incident-response team would hand you.
The goal is to give defenders a clear, prioritized picture of the misconfigurations attackers actually use, and to show progress as they get fixed.
# What it checks
There are 55 checks, each in its own folder with a PowerShell script and a manifest. Each one reads the directory (LDAP and ADSI, read-only AD cmdlets, SYSVOL files, and remote registry reads) and returns structured JSON findings with a severity, a confidence level, the affected objects, and remediation steps. Checks are grouped into presets (quick, standard, full), so a short scan or a deep one can be picked.
Kerberos and delegation
Kerberos abuse is one of the most common ways attackers move from a normal user to domain admin. Roastable accounts can be cracked offline, and delegation settings can let a compromised machine impersonate other users.
- Kerberoastable user accounts (
KRB-KERBEROAST): Enabled user accounts that have a service principal name. Any domain user can request a service ticket and crack it offline. ATT&CK: T1558.003 - AS-REP roastable accounts (
KRB-ASREP): Accounts with Kerberos pre-authentication disabled. Anyone can request an AS-REP and crack it offline. ATT&CK: T1558.004 - Weak Kerberos encryption (
KRB-ENCTYPES): DES-only accounts and accounts whose supported encryption types are RC4 without AES. ATT&CK: T1558 - krbtgt password age (
KRB-KRBTGT-AGE): The krbtgt password should be reset twice after 180 days so stolen tickets die. ATT&CK: T1558.001 - Unconstrained delegation (
KRB-UNCONSTRAINED): Computers or users trusted for unconstrained delegation, other than domain controllers. ATT&CK: T1558 - Constrained delegation (
KRB-CONSTRAINED): Constrained delegation, including protocol transition, especially when a target is a domain controller. ATT&CK: T1558 - Resource-based constrained delegation (
KRB-RBCD): Objects with msDS-AllowedToActOnBehalfOfOtherIdentity set, which is resource-based constrained delegation. ATT&CK: T1134
Privileged access
Tier 0 accounts and groups are what attackers want most. These checks look for too many admins, leftover admin flags, and admins missing modern protections.
- Privileged group membership (
PRIV-GROUPS): Recursive membership of the well-known privileged groups. The Guest account is a separate check. ATT&CK: T1078.002 - Privileged accounts outside Protected Users (
PRIV-PROTECTED): Privileged users should be in Protected Users and marked sensitive and cannot be delegated. ATT&CK: T1550 - adminCount orphans (
PRIV-ADMINCOUNT): adminCount=1 on an account that is no longer in a protected group. AdminSDHolder may still be pinning its ACL. ATT&CK: T1078 - Built-in Administrator (
PRIV-BUILTIN-ADMIN): The RID-500 Administrator account should be disabled, unused, and without an SPN. ATT&CK: T1078.002 - Guest account enabled (
PRIV-GUEST): The built-in Guest account should stay disabled. ATT&CK: T1078.001 - Pre-Windows 2000 Compatible Access (
PRIV-PREWIN2K): The group should not contain Everyone, Anonymous, or Authenticated Users. ATT&CK: T1087.002
Directory permissions (ACLs)
A single bad permission on the right object can be a quiet path to domain admin. These checks read security descriptors for the classic dangerous rights.
- Directory replication rights (
ACL-DCSYNC): Non-default principals with DS-Replication-Get-Changes or Get-Changes-All on the domain root. ATT&CK: T1003.006 - Dangerous ACEs on the domain root (
ACL-DOMAINROOT): GenericAll, WriteDacl, or WriteOwner for a non-default principal on the domain object. ATT&CK: T1222 - AdminSDHolder ACEs (
ACL-ADMINSDHOLDER): Non-default dangerous ACEs on AdminSDHolder, which are copied onto privileged objects. ATT&CK: T1098 - Dangerous ACEs on admin OUs (
ACL-ADMIN-OU): Dangerous allow ACEs on the Domain Controllers OU and OUs whose name contains Admin. ATT&CK: T1222 - Low-priv write on GPOs (
ACL-GPO): Non-default principals who can write a group policy object. ATT&CK: T1484.001 - Group Policy Creator Owners (
ACL-GPO-CREATOR): Membership of Group Policy Creator Owners, and GPO owners that are not default privileged principals. ATT&CK: T1484.001
Certificate Services (AD CS)
Misconfigured certificate templates and CAs (the ESC1 to ESC8 family) can let a low-privileged user get a certificate that authenticates as someone else.
- ESC1 enrollee-supplied subject (
ADCS-ESC1): A template lets the enrollee supply the subject, has a client authentication EKU, and low-priv enroll rights. ATT&CK: T1649 - ESC2 any-purpose templates (
ADCS-ESC2): A template has no EKU or the Any Purpose EKU, plus low-priv enroll rights. ATT&CK: T1649 - ESC3 enrollment agent templates (
ADCS-ESC3): An enrollment-agent template can be enrolled by a low-priv principal. ATT&CK: T1649 - ESC4 writable templates (
ADCS-ESC4): A low-priv or non-default principal can write a certificate template. ATT&CK: T1649 - ESC5 weak PKI object ACLs (
ADCS-ESC5): Dangerous allow ACEs on NTAuth, enrollment services, or the CA container. ATT&CK: T1649 - ESC6 subject alternative name flag (
ADCS-ESC6): EDITF_ATTRIBUTESUBJECTALTNAME2 on the CA lets any template request include a subject alternative name. ATT&CK: T1649 - ESC7 CA control rights (
ADCS-ESC7): Non-default principals with GenericAll, WriteDacl, or WriteOwner on an enrollment service object. Full ManageCA rights live on the CA security descriptor and are reported as unreadable when that descriptor is not in LDAP. ATT&CK: T1649 - ESC8 web enrollment (
ADCS-ESC8): HTTP or HTTPS ports open on a CA host. The check does not fetch a page. An open port is Possible, not proof of the CertSrv site. ATT&CK: T1557
Domain controllers and protocols
Domain controller settings decide whether relay, coercion, and known DC exploits work at all.
- LDAP server signing (
DC-LDAP-SIGNING): LDAPServerIntegrity should be 2 so domain controllers require LDAP signing. ATT&CK: T1557 - LDAP channel binding (
DC-LDAP-CB): LdapEnforceChannelBinding should be 2 so LDAP binds over TLS require channel binding. ATT&CK: T1557 - SMB signing on domain controllers (
DC-SMB-SIGNING): Domain controllers should require SMB signing. ATT&CK: T1557 - SMBv1 on domain controllers (
DC-SMBV1): SMBv1 should be disabled on domain controllers. ATT&CK: T1210 - NTLM and LM compatibility (
POL-NTLM-LM): LmCompatibilityLevel should be 5 and NoLMHash should be 1 on domain controllers. ATT&CK: T1557 - Print Spooler on domain controllers (
DC-SPOOLER): The Print Spooler service should not be running on a domain controller. ATT&CK: T1187 - PetitPotam and web enrollment (
DC-PETITPOTAM): A running Print Spooler on a domain controller plus an enterprise CA is a coercion and relay path. ATT&CK: T1187 - ZeroLogon secure channel protection (
DC-ZEROLOGON): FullSecureChannelProtection should be 1 so a zeroed computer password cannot impersonate a DC. ATT&CK: T1210 - noPac patch hints (
DC-NOPAC): Older domain controller operating systems still need a manual check for CVE-2021-42278 and CVE-2021-42287. Machine account quota is included when it is above zero. ATT&CK: T1068 - Domain controller operating systems (
DC-OS): Domain controller OS versions. 2012 and older are flagged harder than 2016 or 2019. ATT&CK: T1210 - SYSVOL replication (
DC-SYSVOL-REPL): SYSVOL should replicate with DFSR, not FRS.
Accounts and passwords
Weak account settings are the easy wins for password spraying, credential theft, and persistence.
- Password not required (
ACCT-PWD-NOTREQD): Enabled accounts with PASSWD_NOTREQD. A blank password is accepted. ATT&CK: T1078 - Passwords that never expire (
ACCT-PWD-NEVER-EXPIRES): Enabled accounts whose password is set to never expire. Privileged accounts count double. ATT&CK: T1078 - Reversible password encryption on accounts (
ACCT-REVERSIBLE): Accounts that store the password with reversible encryption. The domain policy is covered by POL-DEFAULT. ATT&CK: T1003 - Secrets in description attributes (
ACCT-DESC-PWD): Description, info, or comment text that looks like a stored password. Confidence stays Possible. ATT&CK: T1552 - Unexpected key credential links (
ACCT-SHADOWCREDS): User objects with msDS-KeyCredentialLink. That attribute is how a shadow credential is written. ATT&CK: T1556 - Stale users and computers (
ACCT-STALE): Enabled users and computers whose lastLogonTimestamp is older than the chosen number of days. The timestamp replicates about every 9 to 14 days. ATT&CK: T1078 - Service accounts that should be gMSA (
ACCT-GMSA-CANDIDATES): User accounts with a service principal name, a password that does not expire, and no group managed service account class. ATT&CK: T1078 - Group Policy preferences passwords (
GPP-CPASSWORD): cpassword values in SYSVOL preference XML. The password itself is not copied into the finding. ATT&CK: T1552.006
Password and local-admin policy
Policies set the baseline for every account, and LAPS keeps local admin passwords unique so one cracked machine doesn't unlock the rest.
- Default domain password policy (
POL-DEFAULT): Minimum length, complexity, reversible encryption, history, and lockout on the domain object. ATT&CK: T1110 - Fine-grained password policies (
POL-FGPP): Fine-grained policies that are weaker than the baseline or that do not cover privileged accounts while other accounts have a PSO. ATT&CK: T1110 - LAPS coverage (
POL-LAPS): Enabled computers, other than domain controllers, with neither legacy LAPS nor Windows LAPS password expiration. ATT&CK: T1078.003
DNS, domain, and trusts
Domain-wide settings that enable spoofing, quietly allow normal users to add machines, or let a trusted domain become an attack path.
- ADIDNS wildcard records (
DNS-ADIDNS-WILDCARD): AD-integrated zones with no wildcard node. Authenticated users can often create the missing name. ATT&CK: T1557.001 - Non-secure DNS updates (
DNS-INSECURE-UPDATE): AD-integrated zones whose Microsoft DNS server allows non-secure dynamic updates. ATT&CK: T1557 - Machine account quota (
DOM-MAQ): ms-DS-MachineAccountQuota above zero lets a normal user create computer accounts. ATT&CK: T1136.002 - Forest and domain functional levels (
DOM-FUNC-LEVEL): Functional levels below Windows Server 2016. - AD Recycle Bin (
DOM-RECYCLEBIN): The Recycle Bin optional feature should be enabled so deleted objects can be restored with their attributes. - Trust SID filtering (
TRUST-SIDFILTER): External trusts without quarantine, and trusts that allow TGT delegation. ATT&CK: T1482
# Scoring
Every scan gets a score and a letter grade. The score starts at 100 and loses points for each finding. Critical, High, Medium, Low and Info findings are worth 25, 10, 4, 1 and 0 points. Points double when a privileged object is affected, halve when a finding is only "possible," and grow with the number of affected objects on a log curve capped at 3×. Grades run from A to F, and an unaccepted privileged Critical caps the grade at C. Findings can also be exported to CSV.
# HTML report pack
The report pack turns a scan into one HTML file that works offline, with no outside requests. It includes:
- Domain inventory: counts of users (enabled and disabled), computers, groups, OUs, GPOs, and domain controllers.
- Domain story: creation date, functional levels, PDC, machine account quota, oldest user, oldest computer, oldest password change, and krbtgt password age.
- ATT&CK views: a tactic chart, a filter by tactic, and technique links on every finding, plus an ATT&CK Navigator layer file for each run.
- D3FEND links: only where the fix clearly matches an official D3FEND technique, such as strong password policy, password rotation, message authentication, or domain trust policy.
- Findings table: the largest deductions and grouped remediation suggestions come first. Each row expands into why it matters, the point math, and reference links.
- CSV export: every affected object, with spreadsheet-formula injection guarded against.
- Check log: the status, time, and errors for every check. A check that fails is shown as failed, not silently counted as clean.
# Tracking progress over time
Each run saves a small JSON snapshot with counts, key dates, the score, privileged-group sizes, and finding fingerprints. It doesn't save password hashes or a dump of the directory, and it isn't a backup. From the second run on, the report draws trend lines for score, open findings, users, groups, and privileged groups, and lists findings that are newly opened, likely remediated, or still open since the last scan. An optional helper registers a weekly scheduled task to run the report automatically, without storing a password.
# Safety design
- Read-only by contract: checks may only read. A build-time gate fails CI if any check, report, or shared module contains AD write cmdlets, Group Policy write cmdlets, ADSI writes, registry writes, service control,
Invoke-Expression, process launches, or outbound web requests. - No remediation actions: the tool explains fixes and never applies them.
- Locked-down app: the desktop app's window runs sandboxed with context isolation and no Node access. A strict content security policy blocks remote content. Navigation and new windows are blocked, and directory data is always rendered as text, never as HTML.
- No arbitrary scripts: the app only runs check scripts from its own bundled allowlist, with a fixed argument list, no shell, and a timeout per check. The interface talks to the back end only through a few named channels.
- Validated output: every check's JSON is checked against a schema before it's scored, so a broken or partial check can't skew the result.
- Signed scripts for releases: packaged builds will run PowerShell under the AllSigned policy. Code signing is planned before a public release.
- Careful data handling: reports, CSVs, Navigator layers, and snapshots contain directory names (domains, servers, groups, and accounts), so they're treated as sensitive internal data and kept out of public places.
- Safe test lab: a lab-only script plants known weaknesses so every check has something to find. It refuses to run without an explicit test-domain flag and a marker object, aborts if the domain has any trust, only creates clearly named seed objects, logs every change, and comes with a matching undo script.
- Tested: unit tests cover schemas, fingerprints, the write gate (including a deliberately bad sample), the runner's allowlist and timeouts, scoring, and the interface. PowerShell tests use Pester and PSScriptAnalyzer, and CI runs on Ubuntu and Windows.
# Tech stack
- Checks and reports: Windows PowerShell 5.1, LDAP and ADSI. The ActiveDirectory module is optional, with an LDAP fallback.
- Desktop app: Electron, React, TypeScript, TanStack Table, and Radix UI.
- Data contracts: JSON Schema, with generated TypeScript types.
- Testing: Vitest, Pester, and Playwright.
- CI: GitHub Actions.
- Frameworks: MITRE ATT&CK, ATT&CK Navigator, and MITRE D3FEND.
# Open source plans
AD Blue is licensed under Apache-2.0, and the plan is to publish it as a public repository so anyone can measure and improve their Active Directory security. Each check is self-contained, with a script, a manifest, and a documented "how to add a check" guide, so contributors can add new checks without touching the app. Until then, the source is private.