Passwords typed into Active Directory free-text fields are readable by almost every account in the domain, and attackers look there first. Service account passwords pasted into the description field "for the helpdesk", initial passwords left in info, and values written to userPassword or unixUserPassword by old integrations all turn the directory into a credential store with no access control worth the name. Microsoft has reported that its Defender for Identity posture analysis had found more than 40,000 exposed credentials across 2,500 tenants. This guide explains how secrets end up in these attributes, which attributes to check, who can read them, how to find and remove them without publishing them further, and how to stop them coming back.
Key takeaways
- Free-text attributes are not secret. Microsoft states that description, info and adminComment are not access-restricted, so any authenticated user in the domain can read them, and they are not monitored by default.
- userPassword is not always a password. In AD DS the dSHeuristics fUserPwdSupport heuristic is FALSE by default, which makes userPassword an ordinary attribute: whatever a tool wrote there may sit as a stored value rather than setting the account password.
- Every discovered secret is compromised. Clearing the attribute is not remediation; the credential must be rotated, and the account's recent use reviewed, because you cannot know who already read it.
- Replace the habit, not just the value. Windows LAPS for local administrator passwords, group managed service accounts for services and a vault for everything else remove the reason people write passwords into the directory.
- Reads are hard to see, writes are easy. Directory reads of a normal attribute are rarely logged, so prevention and write monitoring do most of the work; targeted SACLs and decoy values cover the reads.
Why secrets end up in directory attributes
Most cases come from convenience. The common routes are:
- Service account documentation: Microsoft's own write-up names the pattern directly: a service account's password kept in "the description or info field of an AD object" to make troubleshooting easier. Non-human identities are the most affected group. See the service account inventory guide.
- Helpdesk and onboarding notes: initial passwords, reset hints ("same as old one with 2025 on the end") and PINs recorded in info or description at account creation and never cleaned up.
- Provisioning and identity tools: HR feeds, scripts and older identity management products that write a password to userPassword over LDAP, expecting the directory to treat it as the account password, as an LDAP server such as OpenLDAP would.
- Unix and Linux integration: legacy Services for UNIX style deployments and NIS migration tools that populated unixUserPassword with a Unix-compatible password value.
- Local administrator passwords: before LAPS, some teams stored a computer's local administrator password in a computer object's description or a custom attribute.
- Custom schema extensions: application teams adding attributes for API keys or connection strings without marking them confidential.
Attackers know all of this. Reading these attributes is a standard part of domain reconnaissance (MITRE ATT&CK T1087.002 Domain Account discovery), and a password found there is a case of T1552 Unsecured Credentials that leads straight to T1078.002 use of valid domain accounts.
Attributes to check
The table lists the attributes most often found holding secrets, with what Microsoft's schema reference says about each. "Default readability" describes a default forest without hardening.
| Attribute (ldapDisplayName) | Schema facts | Default readability | Typical secret found |
|---|---|---|---|
| description | Unicode string, up to 1,024 characters; single-valued on security principals; replicated to the global catalog | Any authenticated user (Microsoft Defender for Identity guidance); also searchable through the global catalog across the forest | Service account and local admin passwords, "pwd:" notes |
| info (CN Comment, shown as Notes on the Telephones tab) | Unicode string, up to 1,024 characters; not in the global catalog | Any authenticated user (Defender for Identity guidance) | Initial passwords, reset hints, vendor portal logins |
| adminComment | Free-text field | Listed by Microsoft among attributes that are not access-restricted | Operational notes containing credentials |
| userPassword | OID 2.5.4.35; described as write-only; behaviour depends on dSHeuristics fUserPwdSupport | Depends on the forest's ACLs and the heuristic; test in your own forest rather than assume | Passwords written by LDAP-based provisioning tools |
| unixUserPassword | OID 1.2.840.113556.1.4.1910; searchFlags 0x80 (confidential bit) from Windows Server 2008 schema onwards | Confidential where the 2008 or later schema applies: needs CONTROL_ACCESS, held by administrators by default | Unix-compatible password values from Unix integration |
| Custom schema attributes | Whatever the extension defined | Readable broadly unless the confidential flag or ACLs were set | API keys, connection strings, licence keys |
Also check computer objects, groups and contacts, not only users: the same free-text fields exist there, and computer descriptions are a classic location for old local administrator passwords.
Who can read them by default
Three mechanisms decide whether an attribute value is exposed.
- Default ACLs: Microsoft's Defender for Identity documentation says free-text attributes such as description, info and adminComment are not access-restricted, so any authenticated user can read them. That includes every workstation computer account, every service account and every user whose password has been phished. The description attribute is also in the global catalog, so it can be read from any global catalog server in the forest.
- The confidential flag: setting bit 7 (value 128, 0x80) of an attribute's searchFlags marks it confidential. Reading a confidential attribute then needs both READ_PROPERTY and CONTROL_ACCESS, and by default only administrators hold CONTROL_ACCESS. Microsoft notes that base schema attributes cannot be marked confidential (systemFlags 0x10, FLAG_SCHEMA_BASE_OBJECT), and description, info and userPassword all carry systemFlags 0x10. You therefore cannot fix description by flagging it: you must keep secrets out of it. Note too that the Full Control permission and the All Extended Rights permission include CONTROL_ACCESS, so over-delegated OUs expose confidential attributes. See the Active Directory ACL and Delegation Hygiene Guide.
- The fUserPwdSupport heuristic: the ninth character of the dSHeuristics attribute controls userPassword. Per Microsoft's MS-ADTS specification, if the character is "0" (or absent) fUserPwdSupport is FALSE for AD DS and TRUE for AD LDS; if it is "2" it is FALSE; any other value makes it TRUE. When it is FALSE, "the userPassword attribute is treated as an ordinary attribute and has no special semantics." When it is TRUE (and the domain functional level is Windows Server 2003 or higher), writes to userPassword change or reset the account password using the same access rights as unicodePwd, with values sent as UTF-8.
The practical consequence: in a default AD DS forest a tool that writes to userPassword is not setting a password at all, and the value it wrote is a stored attribute. Whether that stored value can be read back depends on your forest's schema and ACLs, so test it with a low-privileged test account in a lab copy rather than relying on the "write-only" description.
Finding exposed secrets safely
The search itself creates risk: an export of every description field is a password list. Run discovery as a controlled task.
- Agree scope and handling first. Name who runs the search, where results are stored (an encrypted location with access limited to the remediation team) and when they are destroyed. Treat the output as a secrets file under your incident handling rules.
- Use posture tooling where you have it. Microsoft Defender for Identity has a posture recommendation, "Remove discoverable passwords in Active Directory account attributes", which uses generative AI analysis on description, info, adminComment and other free-text fields to flag plaintext passwords, credential patterns and reset hints. Microsoft notes findings can include false positives, so every hit needs review.
- Run a read-only attribute review. Query only the attributes in the table, for users, computers, groups and contacts, and filter for non-empty values. Look for keywords (pass, pwd, pw=, kennwort, mot de passe, login, key), strings that look like passwords (mixed case, digits and symbols with no spaces) and account names repeated with a value. Do not paste results into tickets, chat or spreadsheets on shared drives.
- Check userPassword and unixUserPassword explicitly. Count objects with a value present in each, and read your forest's dSHeuristics value to know how userPassword is being treated. A populated userPassword in a forest where fUserPwdSupport is FALSE almost always means a tool wrote a password it believed it was setting.
- Find custom attributes. List schema attributes added by your organisation or applications, then check their searchFlags for the 0x80 bit and their contents for secrets.
- Record ownership, not values. For each hit record the object, attribute, the system the credential belongs to and the owner. That record drives remediation without spreading the secret.
Remediation and rotation
Treat every discovered credential as compromised: any authenticated user may already have read it, and nothing logged the read. Work in this order.
- Prioritise by privilege. Start with credentials for Tier 0 and privileged accounts, accounts with service principal names, accounts in protected groups and anything that also works outside AD (network devices, cloud consoles, databases). See the AdminSDHolder, SDProp and Protected Groups Guide.
- Rotate the credential. Reset the password (or regenerate the key) in the system it belongs to. For service accounts, coordinate with the application owner and update every place the old password is configured, or the service will fail at next restart.
- Review recent use. Check authentication logs for the account (event 4624 logons, 4768 and 4769 Kerberos requests) for sources and times that do not fit its normal pattern since the value was written. Unexpected use turns a hygiene finding into an incident. See the Active Directory Security Monitoring and Event IDs Guide.
- Clear the attribute completely. Microsoft's guidance is to delete the full value, not mask it, because partial values such as "P@ssw***" still give attackers clues. Replace a legitimate note with a pointer ("credential held in vault, entry owner: team X") if people need one.
- Fix the writer. If a provisioning tool wrote to userPassword, change it to set unicodePwd over an encrypted LDAP session or use the platform's supported password API, then clear the stale values. If Unix integration populated unixUserPassword, confirm whether anything still reads it before clearing.
- Check backups and copies. Old values persist in AD backups, exports, LDIF files and identity tool databases. Rotation is what makes those copies useless.
Rollback is simple because you have not changed schema or ACLs: if a service breaks after rotation, set the new password in its configuration; never restore the old value to the attribute.
| What was stored | Replace with | Why |
|---|---|---|
| Local administrator passwords | Windows LAPS (backup to AD or Microsoft Entra ID) | Unique, rotated password per device, stored in confidential attributes with ACL-controlled retrieval; encryption available at domain functional level 2016 or later |
| Service account passwords for Windows services, tasks and IIS pools | Group managed service accounts (gMSA) | The domain manages and rotates the password; nobody needs to know it |
| Passwords for systems that cannot use gMSA, API keys, connection strings | An enterprise vault or PAM product with check-out and audit | Access is logged per retrieval and rotation can be automated |
| Initial user passwords and reset hints | Temporary access passes or one-time codes delivered out of band, with change at first logon | No lasting secret exists to be stored |
| Application data that must live in AD | A custom attribute with the confidential flag (searchFlags 0x80) and an explicit CONTROL_ACCESS grant to the reading account | Reads need CONTROL_ACCESS, held by administrators by default |
Windows LAPS is free on supported Windows client and server versions, and Microsoft marks all Windows LAPS password attributes as confidential. If you still run legacy LAPS emulation mode, note that Microsoft says it stores AD passwords in clear text, protected only by ACLs. See the Local Administrator Password Solution (LAPS) Guide, Legacy LAPS vs Windows LAPS and Group Managed Service Accounts (gMSA) Guide.
Prevention and monitoring
Once clean, keep it that way with policy, write monitoring and targeted read detections.
- Policy: state in the directory administration standard that no credential, hint or key may be written to any AD attribute, and give administrators the approved alternative (vault, LAPS, gMSA). Add it to helpdesk procedures and service account request forms.
- Write monitoring: with Audit Directory Service Changes enabled and a SACL on the relevant OUs, event 5136 records attribute modifications with the attribute name and new value. Alert on changes to userPassword and unixUserPassword by anything other than an approved tool, and review description and info changes on privileged and service accounts. Remember that 5136 logs the value written, so protect those logs.
- Read detection where feasible: event 4662 (Audit Directory Service Access) is generated only when an object has a SACL that matches the operation; its Properties field lists the GUIDs of the property or property set read, and access mask 0x10 is Read Property. Auditing every read of description domain-wide is impractical, so scope SACLs to confidential attributes, Tier 0 objects and decoys.
- Decoy values: place a fake credential in the description of a monitored decoy account. Any logon attempt with it is a high-fidelity alert that someone harvested directory attributes. See Decoy accounts in Active Directory.
- Recurring scans: repeat the discovery review quarterly or keep the Defender for Identity recommendation in your exposure management review, and treat a new finding as a process failure to fix at source.
- Protect LDAP traffic: Microsoft's dSHeuristics documentation notes that by default an encrypted connection is required when confidential attributes are included in LDAP search, modify or add operations; keep that default, and require LDAP signing so simple binds do not expose passwords in transit. See How to fix LDAP signing and LDAPS errors when hardening domain controllers.
| Metric | Target |
|---|---|
| Objects with secrets in free-text attributes (from the latest scan) | Zero, with each new finding closed within 5 working days |
| Discovered credentials rotated, not just cleared | 100% |
| Objects with a populated userPassword or unixUserPassword value | Zero, or each one justified by a named integration |
| Windows devices with LAPS-managed local administrator passwords | All supported devices; Defender for Identity flags passwords not rotated within 60 days |
| Unexpected 5136 writes to password-related attributes | Each one investigated |
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1552 Unsecured Credentials; T1087.002 Domain Account; T1078.002 Domain Accounts | Harvesting credentials from directory attributes during discovery, then logging on with them |
| NIST SP 800-53 Rev 5 | IA-5 Authenticator Management; AC-6 Least Privilege; SC-28 Protection of Information at Rest; AU-12 Audit Record Generation; CM-6 Configuration Settings | Protecting stored authenticators, restricting reads, logging attribute changes, controlling dSHeuristics and schema flags |
| NIST CSF 2.0 | PR.AA-01; DE.CM-03 | Managing credentials for users and services; monitoring activity for adverse events |
| ISO/IEC 27001:2022 Annex A | 5.17 Authentication information | Allocation and management of authentication information |
Common failure patterns
- Clearing without rotating: the value disappears from the directory but the credential still works, and copies remain in backups and any attacker's notes.
- Masking instead of deleting: "Pa$$w0rd (changed)" or "P@ssw***" tells an attacker the pattern. Delete the whole value.
- Trusting "write-only": assuming userPassword is safe because the schema calls it write-only, when in a default AD DS forest it is an ordinary attribute and the provisioning tool never set a real password.
- Checking users only: computer, group and contact descriptions hold old local administrator and shared passwords just as often.
- Publishing the scan: emailing a spreadsheet of findings or attaching it to a ticket recreates the exposure in a less controlled place.
- Over-broad delegation undoing the confidential flag: Full Control or All Extended Rights on an OU includes CONTROL_ACCESS, so a helpdesk group can read every confidential attribute beneath it, including LAPS passwords. See BloodHound and Active Directory Attack Path Guide.
Practitioner checklist
- Read your forest's dSHeuristics value and record whether fUserPwdSupport is TRUE or FALSE.
- Scan description, info and adminComment on users, computers, groups and contacts, and count populated userPassword and unixUserPassword values, with results stored encrypted.
- Rotate every discovered credential, starting with privileged and service accounts, and review its recent authentication history.
- Delete full attribute values; never mask them.
- Fix any tool that writes passwords to userPassword so it sets the password through a supported method.
- Deploy Windows LAPS for local administrator passwords and move eligible services to gMSA.
- Check custom schema attributes for the 0x80 confidential flag and review who holds CONTROL_ACCESS or All Extended Rights on OUs.
- Enable event 5136 alerting on password-related attributes and SACL-scoped 4662 auditing for confidential attributes and decoys.
- Publish the rule that no secret may be stored in any directory attribute, and repeat the scan quarterly.
Standards and references
- Microsoft Learn: Defender for Identity accounts security posture assessments
- Microsoft: MS-ADTS, password modify operations and userPassword
- Microsoft: MS-ADTS, dSHeuristics
- Microsoft Learn: How to mark an attribute as confidential
- Microsoft Learn: User-Password attribute
- Microsoft Learn: unixUserPassword attribute
- Microsoft Learn: Windows LAPS overview
- MITRE ATT&CK: T1552 Unsecured Credentials
Related NHI Mgmt Group resources: Risky Account Flags in Active Directory · Local Administrator Password Solution (LAPS) Guide · How to convert AD service accounts to gMSA · Secrets Management Guide