AD-ACC-010: Pre-created computer accounts with predictable passwords¶
high Accounts MITRE ATT&CK T1078.002 Reads: LDAP
Pre-created computer accounts that were never used still have the lower-cased computer name as their password, so anyone can take them over.
Also known as: pre2k-computers
Why it matters¶
When a computer account is created with Assign this computer account as a pre-Windows
2000 computer, its password is set to the computer name in lower case (without the
$). The same happens when an admin uses Reset Account on such an account. The
password stays predictable until a machine actually joins with the account and changes
it.
An attacker lists the enabled computers with PASSWD_NOTREQD and a logonCount of 0
and tries the lower-cased name. A logon then fails with
STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT, which confirms the password; the attacker
changes it (or requests a Kerberos ticket) and owns a domain computer account. That is
enough for authenticated enumeration, and it gives the attacker the account with an SPN
that resource-based delegation attacks need (AD-DEL-003), without
using the machine account quota (AD-POL-002).
How ad-doctor detects it¶
From the LDAP snapshot: every enabled computer that is not a domain controller, has
PASSWD_NOTREQD (0x20) in userAccountControl and a logonCount of 0. Accounts
for which logonCount came back empty are skipped.
logonCount is not replicated: the value is the one held by the DC ad-doctor
queried. The same accounts are also reported, less specifically, by
AD-ACC-001.
Each object is the computer's sAMAccountName, for example PRE2K$.
Attributes and probes read
userAccountControllogonCountobjectClass
Severity¶
Always high: the password is predictable from the account name, and a computer account is a working domain identity (LDAP queries, Kerberos tickets, RBCD targets).
False positives and limits¶
- A computer that joined through another DC. Its logons were counted there, so the
queried DC still shows 0. Its password is a random machine password; clear
PASSWD_NOTREQDand the finding goes away.
Fix¶
-
List the candidates (read-only):
-
Delete accounts no machine will use, or disable them until the machine is built:
-
For accounts that must stay, set a random password with PowerShell. Do not use Reset Account in Active Directory Users and Computers: that sets the lower-cased name again.
-
Clear
PASSWD_NOTREQD. This is whatad-doctor fixgenerates; on its own it does not change the password, so do step 2 or 3 first. -
Stop creating them: pre-stage computers without the pre-Windows 2000 option.
Verify¶
To accept the risk instead, add an entry to the file passed with --accept (see accepted risks):
[[accept]]
check = "AD-ACC-010"
objects = ["..."] # optional; without it the whole check is accepted
reason = "..."
expires = 2027-03-31
Related checks¶
References¶
Specifications
Research
- Diving into pre-created computer accounts (TrustedSec)
- The Hacker Recipes: Pre-Windows 2000 computers
Tools
MITRE ATT&CK
Available since 0.1.0.