T1556.005 Reversible Encryption
An adversary may abuse Active Directory authentication encryption properties to gain access to credentials on Windows systems. The AllowReversiblePasswordEncryption
property specifies whether reversible password encryption for an account is enabled or disabled. By default this property is disabled (instead storing user credentials as the output of one-way hashing functions) and should not be enabled unless legacy or other software require it.1
If the property is enabled and/or a user changes their password after it is enabled, an adversary may be able to obtain the plaintext of passwords created/changed after the property was enabled. To decrypt the passwords, an adversary needs four components:
- Encrypted password (
G$RADIUSCHAP
) from the Active Directory user-structureuserParameters
- 16 byte randomly-generated value (
G$RADIUSCHAPKEY
) also fromuserParameters
- Global LSA secret (
G$MSRADIUSCHAPKEY
) - Static key hardcoded in the Remote Access Subauthentication DLL (
RASSFM.DLL
)
With this information, an adversary may be able to reproduce the encryption key and subsequently decrypt the encrypted password value.23
An adversary may set this property at various scopes through Local Group Policy Editor, user properties, Fine-Grained Password Policy (FGPP), or via the ActiveDirectory PowerShell module. For example, an adversary may implement and apply a FGPP to users or groups if the Domain Functional Level is set to “Windows Server 2008” or higher.4 In PowerShell, an adversary may make associated changes to user settings using commands similar to Set-ADUser -AllowReversiblePasswordEncryption $true
.
Item | Value |
---|---|
ID | T1556.005 |
Sub-techniques | T1556.001, T1556.002, T1556.003, T1556.004, T1556.005, T1556.006, T1556.007, T1556.008 |
Tactics | TA0006, TA0005, TA0003 |
Platforms | Windows |
Permissions required | Administrator, User |
Version | 1.0 |
Created | 13 January 2022 |
Last Modified | 10 February 2022 |
Mitigations
ID | Mitigation | Description |
---|---|---|
M1027 | Password Policies | Ensure that AllowReversiblePasswordEncryption property is set to disabled unless there are application requirements.1 |
M1026 | Privileged Account Management | Audit domain and local accounts as well as their permission levels routinely to look for situations that could allow an adversary to gain wide access by obtaining credentials of a privileged account.56 These audits should also include if default accounts have been enabled, or if new local accounts are created that have not be authorized. Follow best practices for design and administration of an enterprise network to limit privileged account use across administrative tiers.7 |
Detection
ID | Data Source | Data Component |
---|---|---|
DS0026 | Active Directory | Active Directory Object Modification |
DS0017 | Command | Command Execution |
DS0012 | Script | Script Execution |
DS0002 | User Account | User Account Metadata |
References
-
Microsoft. (2021, October 28). Store passwords using reversible encryption. Retrieved January 3, 2022. ↩↩
-
Teusink, N. (2009, August 25). Passwords stored using reversible encryption: how it works (part 1). Retrieved November 17, 2021. ↩
-
Teusink, N. (2009, August 26). Passwords stored using reversible encryption: how it works (part 2). Retrieved November 17, 2021. ↩
-
Metcalf, S. (2015, November 22). Dump Clear-Text Passwords for All Admins in the Domain Using Mimikatz DCSync. Retrieved November 15, 2021. ↩
-
Microsoft. (2016, April 15). Attractive Accounts for Credential Theft. Retrieved June 3, 2016. ↩
-
Microsoft. (2016, April 16). Implementing Least-Privilege Administrative Models. Retrieved June 3, 2016. ↩
-
Plett, C., Poggemeyer, L. (12, October 26). Securing Privileged Access Reference Material. Retrieved April 25, 2017. ↩