Checklist

Active Directory security checklist: the checks to run yourself before an internal pentest

19 read-only checks, each with its PowerShell command, the expected result, and the matching ANSSI control point and MITRE ATT&CK technique. Enough to fix the obvious issues before the pentest.

What you will be able to check

Here are 19 Active Directory checks you can run on your own, with the ActiveDirectory PowerShell module. For each one: the attack it prevents (MITRE ATT&CK reference), a read-only command, the expected result and the matching control point from ANSSI (France's national cybersecurity agency). The final table prints as it is.

In short

Before an internal pentest, an administrator can check 19 Active Directory points themselves: privileged groups, accounts exposed to Kerberoasting and AS-REP roasting, the age of the krbtgt password, unconstrained delegation, LAPS, passwords in SYSVOL, LLMNR, NTLMv1, SMBv1, SMB and LDAP signing, AD CS certificate templates, the functional level and the separation of administrator accounts. The commands provided read without changing anything. Each check refers to the list of control points published by ANSSI. PingCastle and Purple Knight automate some of these checks. None of these tools shows how an attacker chains weaknesses together: that is the job of an Active Directory penetration test.

What do you need?

A domain-joined machine with the ActiveDirectory module (RSAT tools) and a domain account. A standard user account is enough for most queries, because much of the directory can be read by any authenticated user: an attacker who has phished an employee therefore reads the same thing.

  • Read-only: only Get-*, Search-ADAccount and Select-String. Still, read each command before you run it.
  • Language: on a French-language domain, “Domain Admins” becomes “Admins du domaine”, so the commands use well-known security identifiers (SIDs) rather than group names.
  • Registry: checks C13 to C15 are run on a typical workstation, a member server and each domain controller.
  • ANSSI levels: from 1 (critical) to 5 (state of the art); the vuln_* identifier quoted points to the official recommendation.

Who really holds administrative rights?

Start with the exact list of administrators: the other checks depend on it. The -Recursive parameter reveals members hidden by nested groups.

C1. Members of privileged groups

Why: a single one of these accounts, once compromised, gives control of the domain (Valid Accounts: Domain Accounts, T1078.002).

$sid = (Get-ADDomain).DomainSID.Value
$groupes = "$sid-512", "$sid-518", "$sid-519", 'S-1-5-32-544', 'S-1-5-32-548', 'S-1-5-32-549', 'S-1-5-32-551'
foreach ($g in $groupes) {
    $nom = (Get-ADGroup -Identity $g).Name
    Get-ADGroupMember -Identity $g -Recursive |
        Select-Object @{n='Group'; e={$nom}}, SamAccountName, objectClass
}

Expected result: a few named accounts, used only for administration, and no service accounts. Schema Admins (518) and Enterprise Admins (519) empty except during one-off operations; Account Operators, Server Operators and Backup Operators empty. Groups 518 and 519 exist only in the forest root domain. ANSSI: vuln_privileged_members, levels 1-2, with a threshold of 50 privileged accounts or 3 times the number of domains.

C2. Built-in Administrator account (RID 500)

Why: this account is exempt from some security policies; used day to day, it leaves its password on workstations (T1078.002).

$sid = (Get-ADDomain).DomainSID.Value
Get-ADUser -Identity "$sid-500" -Properties LastLogonDate | Select-Object Name, Enabled, LastLogonDate

Expected result: no logon in the last 30 days; a long, random password kept in a vault. ANSSI: “Built-in domain Administrator account used less than 30 days ago”, level 1.

C3. Protected Users group

Why: its members no longer authenticate with NTLM, leave no cached credentials and cannot be delegated, which hinders Pass the Hash (T1550.002) and the theft of cached credentials (T1003.005 Cached Domain Credentials).

$sid = (Get-ADDomain).DomainSID.Value
Get-ADGroupMember -Identity "$sid-525" | Select-Object SamAccountName, objectClass

Expected result: all the human administrators from C1, after testing; no service or computer accounts, which Microsoft explicitly rules out. Prerequisite: Windows Server 2012 R2 functional level. ANSSI: vuln_protected_users, level 3.

Which accounts expose a Kerberos secret?

These four settings give an ordinary user what they need to attack a password offline, with no lockout, or to reuse tickets. A pentester looks at them first.

C4. Service accounts with an SPN (Kerberoasting)

Why: any authenticated user can obtain a ticket encrypted with the account's key and crack the password offline (Kerberoasting, T1558.003).

Get-ADUser -LDAPFilter '(servicePrincipalName=*)' -Properties servicePrincipalName, PasswordLastSet, adminCount, 'msDS-SupportedEncryptionTypes' |
    Select-Object SamAccountName, PasswordLastSet, adminCount, 'msDS-SupportedEncryptionTypes', servicePrincipalName

Expected result: krbtgt normally appears. For the others: no privileged account (adminCount set to 1), a group managed service account (gMSA, see Get-ADServiceAccount -Filter *) or a long, random password, and the value 24 (AES only) for msDS-SupportedEncryptionTypes. ANSSI: vuln_spn_priv, level 1; an SPN on a privileged account is tolerated only for a managed service account or under strict conditions (a fine-grained password policy requiring more than 32 characters, AES only).

C5. Accounts without Kerberos pre-authentication (AS-REP roasting)

Why: anyone who can reach a domain controller gets, for these accounts, a response encrypted with their password, which can be attacked offline (T1558.004).

Get-ADUser -LDAPFilter '(userAccountControl:1.2.840.113556.1.4.803:=4194304)' | Select-Object SamAccountName, Enabled

Expected result: no results (4194304 is the DONT_REQ_PREAUTH flag). ANSSI: vuln_kerberos_properties_preauth, level 2; vuln_kerberos_properties_preauth_priv, level 1, for a privileged account.

C6. Age of the krbtgt password

Why: the krbtgt key can be used to forge tickets for any account (Golden Ticket, T1558.001); it never changes on its own.

Get-ADUser -Identity krbtgt -Properties PasswordLastSet | Select-Object Name, PasswordLastSet

Expected result: less than a year. The reset must be planned: two changes spaced apart (at least 10 hours according to Microsoft, 24 hours according to ANSSI outside the official script), with healthy replication. ANSSI: vuln_krbtgt, level 2.

C7. Unconstrained delegation

Why: a server with unconstrained delegation keeps the ticket of every user who connects to it; whoever controls it can reuse those tickets (Pass the Ticket, T1550.003), including that of a domain controller coerced into authenticating (Forced Authentication, T1187).

Get-ADComputer -LDAPFilter '(userAccountControl:1.2.840.113556.1.4.803:=524288)' | Select-Object Name
Get-ADUser -LDAPFilter '(userAccountControl:1.2.840.113556.1.4.803:=524288)' | Select-Object SamAccountName

Expected result: domain controllers only, then no users; otherwise, use constrained delegation. ANSSI: vuln_delegation_t4d, level 1.

Which accounts should no longer be able to log on?

Nobody monitors the activity of a forgotten account, which makes it the ideal credential for an attacker.

C8. Enabled but unused accounts

Why: a forgotten account (a leaver, a former contractor) can be reused without anyone noticing (T1078.002).

Search-ADAccount -AccountInactive -TimeSpan 365.00:00:00 | Where-Object Enabled |
    Select-Object Name, ObjectClass, LastLogonDate

Expected result: a short list, with every account justified. ANSSI recommends neutralising the others: disable them, remove them from groups, set a random password. ANSSI: vuln_user_accounts_dormant, level 1 above 25% dormant accounts.

C9. Passwords that never expire

Why: a password that is never changed stays valid for years after a leak, for example through an infostealer (T1078.002).

Search-ADAccount -PasswordNeverExpires -UsersOnly | Where-Object Enabled | Select-Object Name, SamAccountName

Expected result: no privileged accounts; the others justified. For privileged accounts, ANSSI recommends changing the password at least once every 3 years, without excessive frequency. ANSSI: vuln_dont_expire_priv, level 1.

C10. Guest account

Why: when enabled, it opens resources shared with “Everyone” or with guests, without a password (Valid Accounts: Default Accounts, T1078.001).

$sid = (Get-ADDomain).DomainSID.Value
Get-ADUser -Identity "$sid-501" | Select-Object Name, Enabled

Expected result: Enabled set to False. ANSSI: vuln_guest, level 2.

Does a secret found on one machine open the whole estate?

Lateral movement often relies on a shared secret: the same local password everywhere, or a password forgotten in a share that everyone can read.

C11. LAPS

Why: with the same local administrator password everywhere, the hash recovered from one workstation opens all the others (T1550.002, T1078.003 Local Accounts).

Get-ADComputer -LDAPFilter '(!(userAccountControl:1.2.840.113556.1.4.803:=2))' -Properties 'msLAPS-PasswordExpirationTime' |
    Where-Object { -not $_.'msLAPS-PasswordExpirationTime' } | Select-Object Name

Expected result: no machines other than domain controllers. The command reads the expiry date managed by Windows LAPS, never the password; with legacy Microsoft LAPS, use ms-Mcs-AdmPwdExpirationTime. An error on the attribute means the schema has not been extended; an empty value can also come from a missing read permission. Windows LAPS has been built into Windows 11 and Windows Server 2019 and later since the update of 11 April 2023 (and into Windows 10 machines still updated through ESU). ANSSI: “LAPS not in use” (information).

C12. Passwords in SYSVOL

Why: passwords stored in Group Policy Preferences can be decrypted by any domain user (bulletin MS14-025, T1552.006 Group Policy Preferences); logon scripts often contain credentials.

$dom = (Get-ADDomain).DNSRoot
Get-ChildItem -Path "\\$dom\SYSVOL\$dom\Policies" -Recurse -Filter *.xml -ErrorAction SilentlyContinue |
    Select-String -Pattern 'cpassword="[^"]+' -List | Select-Object Path
Get-ChildItem -Path "\\$dom\SYSVOL\$dom\scripts" -Recurse -Include *.bat, *.cmd, *.ps1, *.vbs -ErrorAction SilentlyContinue |
    Select-String -Pattern 'password', 'passwd', '/user:' -List | Select-Object Path, LineNumber

Expected result: no cpassword; for scripts, read each line found (false positives are possible). According to Microsoft, MS14-025 prevents new ones from being created but does not remove existing GPOs.

Does the network accept authentication that can be relayed?

These three checks read the local registry; the correct setting is then deployed by GPO.

C13. LLMNR and NetBIOS

Why: when DNS fails, the machine queries the local network; an attacker answers and captures or relays the authentication (T1557.001, “Name Resolution Poisoning and SMB Relay”).

# LLMNR: 0 expected ("Turn off multicast name resolution" policy)
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient' -ErrorAction SilentlyContinue |
    Select-Object EnableMulticast
# NetBIOS over TCP/IP: 2 (DisableNetbios) expected
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE' |
    Select-Object Description, TcpipNetbiosOptions

Expected result: EnableMulticast set to 0 (no output: the policy is absent and LLMNR is active); TcpipNetbiosOptions set to 2 (0: set by DHCP, 1: enabled). Workstation settings, not in the ANSSI list.

C14. NTLMv1 and SMBv1

Why: a captured NTLM authentication can be relayed or cracked offline (T1557.001, T1110.002 Password Cracking), and Microsoft states that SMBv1 has “significant security vulnerabilities”.

# 5 expected: "Send NTLMv2 response only. Refuse LM & NTLM"
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Lsa' | Select-Object LmCompatibilityLevel
# False expected
Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol

Expected result: LmCompatibilityLevel set to 5, deployed by GPO. If it is empty, the default applies (“Send NTLMv2 response only”), and with it a domain controller still accepts LM and NTLM: inventory legacy devices before hardening. EnableSMB1Protocol set to False; SMBv1 is no longer installed by default on Windows 11 or on Windows Server 2019 and later.

C15. SMB and LDAP signing, channel binding

Why: if signing is not required, an intercepted authentication can be relayed to a file server or to the LDAP directory (T1557.001, T1557 Adversary-in-the-Middle).

# Servers and workstations: True expected
Get-SmbServerConfiguration | Select-Object RequireSecuritySignature
Get-SmbClientConfiguration | Select-Object RequireSecuritySignature
# Domain controllers: 2 and 2 expected
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\NTDS\Parameters' |
    Select-Object LDAPServerIntegrity, LdapEnforceChannelBinding

Expected result: RequireSecuritySignature set to True (required by default on domain controllers: check the member servers). LDAPServerIntegrity set to 2 (“Require signing”), LdapEnforceChannelBinding set to 2 (“Always”), or 1 during the transition. Before hardening, event 2887 (a daily summary) counts unsigned connections; to identify each client (event 2889), set the “16 LDAP Interface Events” diagnostic logging to 2.

Does the configuration offer shortcuts to domain administrator?

The last four checks cover the architecture: certificates, functional level, default rights and the separation of administrative use.

C16. AD CS certificate templates (ESC1)

Why: a template that allows authentication and lets the requester choose the certificate's identity makes it possible to obtain a certificate in an administrator's name (T1649 Steal or Forge Authentication Certificates, the ESC1 scenario described by SpecterOps in 2021).

$cfg = (Get-ADRootDSE).configurationNamingContext
$ekuAuth = '1.3.6.1.5.5.7.3.2', '1.3.6.1.5.2.3.4', '1.3.6.1.4.1.311.20.2.2', '2.5.29.37.0'
Get-ADObject -SearchBase "CN=Certificate Templates,CN=Public Key Services,CN=Services,$cfg" -LDAPFilter '(objectClass=pKICertificateTemplate)' -Properties 'msPKI-Certificate-Name-Flag', 'msPKI-Enrollment-Flag', 'msPKI-RA-Signature', pKIExtendedKeyUsage |
    Where-Object { ($_.'msPKI-Certificate-Name-Flag' -band 1) -and
        ((-not $_.pKIExtendedKeyUsage) -or ($_.pKIExtendedKeyUsage | Where-Object { $_ -in $ekuAuth })) } |
    Select-Object Name, 'msPKI-Enrollment-Flag', 'msPKI-RA-Signature'

Expected result: no templates, or only templates subject to approval (flag 0x2, CT_FLAG_PEND_ALL_REQUESTS, in msPKI-Enrollment-Flag) or to an authorised signature (msPKI-RA-Signature of at least 1). The command reads neither enrolment rights nor publication by a certificate authority: any template listed still needs to be examined. An “object not found” error usually means AD CS is not deployed. ANSSI: vuln_adcs_template_auth_enroll_with_name, level 1; dangerous write permissions on the templates themselves fall under vuln_adcs_template_control, levels 1-2.

C17. Functional level

Why: a low level deprives the domain of protections: the domain controller side of Protected Users requires Windows Server 2012 R2.

Get-ADDomain | Select-Object DomainMode
Get-ADForest | Select-Object ForestMode

Expected result: Windows2016Domain and Windows2016Forest at least; a Windows Server 2025 domain controller requires it anyway. ANSSI: vuln_functional_level, level 1 below 2008 R2, 3 below 2012 R2, 4 below 2016.

C18. Machine account quota

Why: by default, any user can join 10 machines to the domain and keeps write permissions on the accounts created this way, a foothold for several privilege escalation techniques (Create Account: Domain Account, T1136.002).

Get-ADObject -Identity (Get-ADDomain).DistinguishedName -Properties 'ms-DS-MachineAccountQuota' |
    Select-Object 'ms-DS-MachineAccountQuota'

Expected result: 0, with domain joins delegated to a dedicated group. ANSSI: vuln_user_accounts_machineaccountquota, level 4.

C19. Tiered administration model

Why: a domain administrator who logs on to an office workstation leaves their secrets in memory there (OS Credential Dumping: LSASS Memory, T1003.001).

Get-ADAuthenticationPolicySilo -Filter * | Select-Object Name, Enforce

Expected result: there is no single command. Check that each administrator has a dedicated account separate from their everyday account, that Tier 0 accounts (domain controllers, AD CS and their administration tools) never log on anywhere else, and that this rule is enforced by an authentication policy silo (Enforce set to True) or by logon deny rights in GPOs. Reference: ANSSI guide ANSSI-PA-099; Microsoft now calls this the “enterprise access model”. ANSSI: vuln_silo_priv, level 4.

The summary table to print

Print it (Ctrl + P) and tick each line as you go. The ANSSI column gives the identifier without the vuln_ prefix and, in brackets, the associated ANSSI level (1 = critical, 5 = state of the art).

No.CheckExpected resultANSSI (level)ATT&CKDone
C1Privileged groupsFew accounts, all named; operator groups emptyprivileged_members (1-2)T1078.002
C2Built-in AdministratorNo logon in the last 30 daysBuilt-in Administrator (1)T1078.002
C3Protected UsersAll human administratorsprotected_users (3)T1550.002
C4Accounts with an SPNNone privileged; gMSA or long password; AESspn_priv (1)T1558.003
C5Pre-authenticationNo account without itkerberos_properties_preauth (2)T1558.004
C6krbtgtChanged less than a year agokrbtgt (2)T1558.001
C7Unconstrained delegationDomain controllers onlydelegation_t4d (1)T1550.003
C8Inactive accountsShort, justified listuser_accounts_dormant (1)T1078.002
C9Password never expiresNo privileged accountsdont_expire_priv (1)T1078.002
C10Guest accountDisabledguest (2)T1078.001
C11LAPSAll machines except DCsInformationT1550.002
C12SYSVOLNo cpassword or credentialsNot in the ANSSI listT1552.006
C13LLMNR, NetBIOSEnableMulticast 0; NetBIOS 2Not in the ANSSI listT1557.001
C14NTLMv1, SMBv1LmCompatibilityLevel 5; SMBv1 FalseNot in the ANSSI listT1557.001
C15SMB and LDAP signingTrue; 2 and 2Not in the ANSSI listT1557
C16AD CSNo open ESC1 templateadcs_template_auth_enroll_with_name (1)T1649
C17Functional level2016 at leastfunctional_level (1, 3, 4)-
C18MachineAccountQuota0user_accounts_machineaccountquota (4)T1136.002
C19TieringSeparate accounts, Tier 0 isolatedsilo_priv (4)T1003.001

Which free tools complement this checklist?

Three defensive references automate dozens of additional checks, notably on permissions (ACLs) that the commands above do not read. Their access conditions differ.

  • ANSSI. The list of Active Directory control points, published on the CERT-FR website (in French), is open to everyone. The automated analysis, the ADS (Active Directory Security) service, is reserved for public bodies and regulated entities (OIV, i.e. operators of vital importance; OSE, i.e. operators of essential services; etc.) registered on the Club SSI portal; ANSSI states that entities subject to NIS2 will eventually have access to it. Data collection uses ORADAD (GPL-3.0 licence, version 3.6.220b of 15 July 2026), which extracts the data without analysing it.
  • PingCastle (Netwrix) has a free Community Edition. According to its download page, it is free as long as you do not earn revenue from it, for example when a company audits its own systems; the editions page describes it as “for personal use”. Read the licence before use. Version 4.0.0.31 of 13 October 2026; checks designed for an account without domain administrator rights.
  • Purple Knight (Semperis) is free and assesses Active Directory, Entra ID and Okta, with MITRE ATT&CK mapping. Download through a form.

Why does this checklist not replace a pentest?

A checklist verifies settings one by one; an attacker chains them together. Nineteen compliant checks do not prove that there is no path from a user workstation to domain administrator rights.

  • ACLs and attack paths: a write permission on a group, a GPO or a privileged account is often enough. These relationships are mapped with BloodHound and confirmed by exploiting them.
  • Real password strength: the checklist flags an account exposed to Kerberoasting; only a controlled test tells you whether its password holds up.
  • Outside the directory: open shares, credentials in files, administrator sessions left open on servers.
  • Detection: the pentest also shows what your monitoring saw, or missed.

Fix the obvious issues before the test: the pentest days will then focus on what you could not see on your own.

Have the real attack chain tested

The SSHack Active Directory penetration test starts from a standard user workstation and looks, over 5 to 10 days, for the path to domain compromise. You receive a technical report with an executive summary and recommendations prioritised by severity, presented in a debrief meeting.

Get a sample anonymised report

Frequently asked questions

Do you need to be a domain administrator to run these checks?

No. Most queries work with a standard user account, because much of the directory can be read by any authenticated user. The registry checks (C13 to C15) are run locally, with administrative rights on the domain controllers.

Can these commands disrupt production?

No, they only read. On a very large directory, some queries take time: run them outside peak hours.

Are PingCastle or Purple Knight enough?

They cover more points than this checklist, including permissions on sensitive objects, and give a score you can track over time. They describe configurations, without showing how an attacker chains them together from a compromised workstation.

How often should you repeat this checklist?

After every significant change and at least once a year, for example when you renew the krbtgt password. ANSSI observes that the security level of a directory declines over time and with administrative operations.

Further reading

Sources

Contact

A question about this topic?

Describe your context (scope, objectives, regulatory constraints). We will get back to you with a proposal and a detailed quote, usually within one business day.

From the French Ministry of the Armed Forces

A Red Team expert certified OSCP and OSEP, an OSINT / CTI specialist and a DevSecOps engineer.

Confidentiality

NDA, encrypted data, secure destruction of all traces at the end of the engagement.

Across France

Paris, Marseille, Nice, Bordeaux: on site or remotely.

Not ready for a quote yet? Receive a sample anonymised report by email: executive summary, documented vulnerabilities with their evidence, recommendations prioritised by severity. Work email addresses only.

Get a sample report
Approximate scope, deadlines, requirements (GDPR, NIS2, DORA, ISO 27001…).