1. Resources
  2. Detection rules
  3. Reversible Password Encryption Enabled

Reversible Password Encryption Enabled detection rules

With reversible encryption on, Active Directory keeps a copy of the password that can be decrypted. Attackers enable it on an account or in a password policy so that the next password change leaves a recoverable password.

Platform
Active Directory
Severity
Medium
Log source
Windows Security event log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft Sentinel
What an attacker needs
Write access to userAccountControl on the account or the right to change the domain password policy or a Password Settings object, and access to directory secrets.
Impact
Every password set after the change can be recovered in clear text by whoever can read directory secrets.
Response
Turn the setting off in whichever place it was enabled, then have the passwords that were set while it was on changed, because only a new password removes the recoverable copy.
Mitigation
Keep reversible encryption disabled in the domain password policy and in every fine-grained password policy, and restrict who can change those policies and userAccountControl.
Event IDs
47395136472047384742
Threat groups
None listed in MITRE ATT&CK for this technique

How the attack works

Active Directory normally keeps only one-way hashes of a password. When reversible encryption applies to an account, the domain controller also stores a copy of the password that can be decrypted. The option exists for legacy protocols that need the password itself, such as CHAP in remote access and Digest authentication in IIS, and Microsoft's guidance is to leave it off wherever those are not required.

It can be turned on in three places. Per account, the "Store password using reversible encryption" option sets the "Encrypted Text Password Allowed" flag in userAccountControl. For the whole domain, the "Store passwords using reversible encryption" setting of the domain password policy does it. For selected users or groups, a fine-grained password policy does it through the msDS-PasswordReversibleEncryptionEnabled attribute of a Password Settings object. The setting does not expose the passwords that are already stored. The recoverable copy is written the next time the password of an affected account is set or changed.

An attacker who can write to an account, to the domain password policy or to a Password Settings object turns the setting on and waits for a password change. Reading the stored copy afterwards still takes access to directory secrets, so the technique is used to turn an existing foothold into clear-text passwords, which are worth more than hashes. Each of the three changes leaves its own event on a domain controller.

What an attacker needs

  • Write access to userAccountControl on the target account (for example through Account Operators, delegated helpdesk rights or control of the object), or the right to change the domain password policy or a Password Settings object, which domain administrators hold by default.
  • A password change or reset on the affected account after the setting is on.
  • Access to directory secrets to read the stored copy, through directory replication rights or a copy of the directory database.

Impact

Every password set after the change can be recovered in clear text by whoever can read directory secrets. A clear-text password works where a hash cannot be used, shows how the user builds passwords and is often reused outside the domain. Set in the domain password policy, the change covers every account that changes its password.

Detection rules

Reversible Password Encryption Enabled in the Domain Password Policy

Detects a domain policy change (4739) whose Password Properties value has the bit for "Store passwords using reversible encryption" set (16, DOMAIN_PASSWORD_STORE_CLEARTEXT). Microsoft documents the values 16 and 17 for this event; the pattern matches these and the other combinations of the six password property bits that include 16 (16 to 31 and 48 to 63). The value is matched as text because the event field is a string. With the setting on, every account in the domain gets a decryptable copy of its password at the next password change. The subject of the event is usually the domain controller that applied Group Policy, not the person who edited it. Requires Audit Authentication Policy Change.

LevelHighStatusExperimentalLog sourceWindows Security event log
title: Reversible Password Encryption Enabled in the Domain Password Policy
id: 73cdc422-210d-41f8-9e22-703a8f75aa94
status: experimental
description: >-
  Detects a domain policy change (4739) whose Password Properties value has the
  bit for "Store passwords using reversible encryption" set (16,
  DOMAIN_PASSWORD_STORE_CLEARTEXT). Microsoft documents the values 16 and 17
  for this event; the pattern matches these and the other combinations of the
  six password property bits that include 16 (16 to 31 and 48 to 63). The
  value is matched as text because the event field is a string. With the
  setting on, every account in the domain gets a decryptable copy of its
  password at the next password change. The subject of the event is usually
  the domain controller that applied Group Policy, not the person who edited
  it. Requires Audit Authentication Policy Change.
references:
  - https://attack.mitre.org/techniques/T1556/005/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4739
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-pwdproperties
author: Forestall
date: 2026-11-14
tags:
  - attack.credential-access
  - attack.persistence
  - attack.defense-impairment
  - attack.t1556.005
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4739
    PasswordProperties|re: '^(1[6-9]|2[0-9]|3[01]|4[89]|5[0-9]|6[0-3])$'
  condition: selection
falsepositives:
  - A planned change for an application that needs reversible encryption domain-wide, which Microsoft advises against. Confirm with the change record.
  - A later change to the password policy while the setting stays enabled can report the same value again. Disable the setting instead of excluding the event.
level: high

False positives

  • A planned change for an application that needs reversible encryption domain-wide, which Microsoft advises against. Confirm with the change record.
  • A later change to the password policy while the setting stays enabled can report the same value again. Disable the setting instead of excluding the event.

Reversible Password Encryption Enabled in a Fine-Grained Password Policy

Detects the value TRUE written to msDS-PasswordReversibleEncryptionEnabled (5136), the attribute of a Password Settings object that turns on reversible password encryption for the users and groups the object applies to. Those accounts get a decryptable copy of their password at the next password change. The event shows a change to an existing object; the creation of a new Password Settings object is logged as event 5137, which carries no attribute values, so review new objects separately. Requires Audit Directory Service Changes and an audit entry (SACL) for writes on the Password Settings Container.

LevelHighStatusExperimentalLog sourceWindows Security event log
title: Reversible Password Encryption Enabled in a Fine-Grained Password Policy
id: 266fb895-3fc4-4b30-bc59-23bfc2884654
status: experimental
description: >-
  Detects the value TRUE written to msDS-PasswordReversibleEncryptionEnabled
  (5136), the attribute of a Password Settings object that turns on reversible
  password encryption for the users and groups the object applies to. Those
  accounts get a decryptable copy of their password at the next password
  change. The event shows a change to an existing object; the creation of a
  new Password Settings object is logged as event 5137, which carries no
  attribute values, so review new objects separately. Requires Audit Directory
  Service Changes and an audit entry (SACL) for writes on the Password
  Settings Container.
references:
  - https://attack.mitre.org/techniques/T1556/005/
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-msds-passwordreversibleencryptionenabled
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
author: Forestall
date: 2026-11-14
tags:
  - attack.credential-access
  - attack.persistence
  - attack.defense-impairment
  - attack.t1556.005
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    AttributeLDAPDisplayName: msDS-PasswordReversibleEncryptionEnabled
    AttributeValue: 'TRUE'
    OperationType:
      - '%%14674'
      - 'Value Added'
  condition: selection
falsepositives:
  - A fine-grained password policy created on purpose for accounts of an application that needs the password itself. Confirm with the change record and check which accounts the object applies to (msDS-PSOAppliesTo).
level: high

False positives

  • A fine-grained password policy created on purpose for accounts of an application that needs the password itself. Confirm with the change record and check which accounts the object applies to (msDS-PSOAppliesTo).

Reversible Password Encryption Enabled on an Account

Detects a user account created (4720) or a user or computer account changed (4738, 4742) with "'Encrypted Text Password Allowed' - Enabled" (%%2091) in its User Account Control changes. From the next password change on, the domain controller keeps a copy of that account's password that can be decrypted. Microsoft's event documentation lists this flag among those that should not be enabled. Requires Audit User Account Management and Audit Computer Account Management.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Reversible Password Encryption Enabled on an Account
id: e26e9c7b-3b00-4a29-a40d-a35ca84d0a3d
status: experimental
description: >-
  Detects a user account created (4720) or a user or computer account changed
  (4738, 4742) with "'Encrypted Text Password Allowed' - Enabled" (%%2091) in
  its User Account Control changes. From the next password change on, the
  domain controller keeps a copy of that account's password that can be
  decrypted. Microsoft's event documentation lists this flag among those that
  should not be enabled. Requires Audit User Account Management and Audit
  Computer Account Management.
references:
  - https://attack.mitre.org/techniques/T1556/005/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4738
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4720
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4742
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/b10cfda1-f24f-441b-8f43-80cb93e786ec
author: Forestall
date: 2026-11-14
tags:
  - attack.credential-access
  - attack.persistence
  - attack.defense-impairment
  - attack.t1556.005
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID:
      - 4720
      - 4738
      - 4742
    UserAccountControl|contains: '%%2091'
  condition: selection
falsepositives:
  - Accounts of legacy applications that need the password itself, such as CHAP in remote access or Digest authentication. Confirm the application with its owner and exclude the documented accounts by TargetSid.
level: medium

False positives

  • Accounts of legacy applications that need the password itself, such as CHAP in remote access or Digest authentication. Confirm the application with its owner and exclude the documented accounts by TargetSid.

Triage

  • Identify who made the change (SubjectUserName) and which account or policy it affects. For event 4739 the subject is usually the domain controller applying Group Policy, so find the person through the changes to the Group Policy object around that time.
  • Ask whether an application that needs reversible encryption is being introduced. Without such a request, treat the change as unauthorized.
  • Look for password changes or resets (4723, 4724) on the affected accounts after the change. Those passwords now have a recoverable copy.
  • Look for directory replication requested by anything other than a domain controller, or access to the directory database and its backups, after the change. That is how the stored copy would be read.
  • Revert the setting, then change the passwords that were set while it was on.

Response

Once the attack is confirmed:

  1. Turn the setting off first, in whichever place it was enabled, that is the account option, the domain password policy or the Password Settings object. A password set while it is still on gets a recoverable copy again.
  2. Reset the credentials of the account that made the change and remove its write access. For a change of the domain policy, find the editor of the Group Policy object, because the event names the domain controller.
  3. List the accounts that set or changed a password while the setting was on and have those passwords changed now that it is off. Only a new password removes the recoverable copy.
  4. If directory replication by anything other than a domain controller, or access to the directory database, followed the change, treat those passwords as known in clear text. Look for their reuse on systems outside the domain.
  5. Confirm that no account, password policy or Password Settings object still enables reversible encryption.

Mitigation

  • Keep "Store passwords using reversible encryption" disabled in the domain password policy and in every fine-grained password policy.
  • Find the accounts that have the per-account option set, clear it and have their passwords changed afterwards, so that no recoverable copy remains.
  • Restrict who can write userAccountControl on accounts, who can edit the Group Policy object that carries the domain password policy and who can manage Password Settings objects.
  • Move applications that depend on the clear-text password, such as CHAP and Digest authentication, to protocols that do not need it.
  • Enable "Audit User Account Management", "Audit Computer Account Management", "Audit Authentication Policy Change" and "Audit Directory Service Changes" on all domain controllers.

Frequently asked questions

Does enabling reversible encryption expose the passwords that are already stored?

No. Turning the setting on changes nothing for passwords that are already stored. The recoverable copy is written the next time the password of an affected account is set or changed. This is why an attacker turns the setting on and waits, and why password changes after the event are what to look for.

Is switching the setting off enough to clean up?

No. Accounts that set a password while the setting was on keep the recoverable copy. Turn the setting off first, then have those passwords changed, so that no recoverable copy remains.

Why does event 4739 name a domain controller and not the person who changed the policy?

The domain password policy is delivered through Group Policy, and the subject of event 4739 is usually the domain controller that applied it, not the person who edited it. Find that person through the changes to the Group Policy object around the same time.

Does the rule notice a new Password Settings object that is created with the option on?

No. The rule sees the value TRUE written to msDS-PasswordReversibleEncryptionEnabled on an existing object, in event 5136. The creation of a new Password Settings object is logged as event 5137, which carries no attribute values. Review new Password Settings objects separately.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.