Computer Accounts and gMSAs
Overview
Section titled “Overview”An Active Directory computer account is a security principal, not just a device name. It is represented by a sAMAccountName ending in $, such as WEB01$, and has a password, Kerberos keys, NTLM authentication, group memberships, and rights in ACLs.
Obtaining computer account credentials can therefore allow authentication as a machine account to LDAP, SMB, WinRM, and other services, along with use of its AD rights and group memberships.
Pre-created Computer Accounts
Section titled “Pre-created Computer Accounts”A pre-created computer account is a computer object made in AD before the device actually joins the domain. Legacy compatibility or operational mistakes can leave it with a predictable initial password.
Common risky patterns include:
- A computer account is created, but the device never joins the domain.
- Pre-Windows 2000 compatibility or similar settings make the initial password resemble the lowercase hostname.
- A stale computer object remains enabled and retains group memberships or ACL rights.
For example, if APP01$ initially has a password like app01, an attacker can authenticate to LDAP as APP01$. This assumption no longer holds after the device joins the domain and its password is randomized.
Rights to Read gMSA Passwords
Section titled “Rights to Read gMSA Passwords”A gMSA (Group Managed Service Account) is a service account whose managed password is maintained by a DC. The hosts or groups allowed to retrieve it are controlled mainly through msDS-GroupMSAMembership (PrincipalsAllowedToRetrieveManagedPassword in PowerShell).
The underlying value is a security descriptor, but conceptually it can be read as follows.
gMSA object: msDS-GroupMSAMembership = WebServers
WebServers group: member = WEB01$
Meaning: WEB01$ can retrieve the gMSA managed password from a DC.The important point is that the allowlist can contain computer accounts and groups, not only users. If a compromised computer account belongs to an allowed group, its credentials may let someone read the gMSA password blob and obtain an NTLM hash or Kerberos key.
Paths to Broader Access
Section titled “Paths to Broader Access”A typical pivot from a computer account to a gMSA looks like this.
1. Obtain credentials for a weak or unused computer account2. Authenticate to LDAP as the machine account3. Check its group memberships4. Find permission to read a gMSA password5. Retrieve the gMSA managed password6. Use the gMSA rights over WinRM, SMB, LDAP, or KerberosThe gMSA itself provides secure password rotation, but an overly broad list of readers makes it a powerful pivot point. The impact is especially high if the gMSA belongs to Remote Management Users or an administrative group, or has delegation settings or an SPN.
Audit Points
Section titled “Audit Points”- Check for unused or stale computer objects.
- Check whether
ms-DS-MachineAccountQuotais unnecessarily high. - Check whether computer accounts belong to privileged groups or groups allowed to read gMSA passwords.
- Limit the trustees in
msDS-GroupMSAMembershipto those needed. - Check whether a gMSA’s group memberships, SPNs, delegation, and local administrator rights fit its purpose.
- Track computer account creation or changes (for example, events 4741/4742) and group membership changes (for example, 4728/4732/4756).
Defensive Priorities
Section titled “Defensive Priorities”- Set a time limit for pre-created computer accounts until domain join is complete; delete or disable them when no longer needed.
- Do not use predictable initial passwords or enable legacy compatibility settings without care.
- Limit gMSA password readers to dedicated host groups containing only the computer accounts required for the work.
- If a gMSA belongs to a remote management or privileged group, document its allowed hosts and audit logs.
- Review stale computer objects and stale group memberships regularly.

