Group Policy Preferences Passwords (MS14-025)

Group Policy Preferences files in SYSVOL hold cpassword values encrypted with a key Microsoft has published, so any domain user can recover the passwords.

SeverityHigh
CVSS 3.18.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Open in the calculator
CVSS 4.08.7 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator
CWECWE-321: Use of Hard-coded Cryptographic Key
OWASP Top 10A04:2025 Cryptographic Failures
MITRE ATT&CKT1552.006 Group Policy Preferences, T1078.003 Local Accounts, T1078.002 Domain Accounts
CVECVE-2014-1812
CategoryCryptographic Failures

Description

Group Policy Preferences, introduced with Windows Server 2008, could set passwords through preference items for local users and groups, services, scheduled tasks, mapped drives and data sources. Each password is saved in the cpassword attribute of an XML file, such as Groups.xml, Services.xml, ScheduledTasks.xml, Drives.xml or DataSources.xml, in the policy's folder in SYSVOL. The value is encrypted with AES-256, but every installation uses the same key, which Microsoft published in its protocol documentation, so anyone who can read the file can decrypt it.

Every authenticated domain user can read SYSVOL, so any domain user can recover the passwords within seconds. They are most often the password of a local administrator account set on many computers, which gives administrative access to all of them, and sometimes the passwords of domain service accounts used by scheduled tasks or services, which may hold wider rights.

Security update MS14-025 (CVE-2014-1812) removed the ability to enter passwords in these preference items, but it does not remove files that already exist, so passwords set before the update remain until the preference items are deleted. They often survive in old, disabled or unlinked policies that are no longer reviewed. Where an account's password has not changed since the preference item was created, the attacker can use it immediately; an older password may still reveal the pattern used for current ones.

The weakness is identified by searching the XML files in SYSVOL for cpassword values that are not empty, with findstr or with tools that also decrypt them, such as PowerSploit's Get-GPPPassword, NetExec's gpp_password module or Metasploit. Vulnerability scanners report it as MS14-025.

Remediation

  • Find every XML file in SYSVOL that contains a cpassword value, including those in disabled and unlinked policies (see the example below).
  • Delete the preference items that contain passwords, or the whole policy where it is no longer needed, using the Group Policy Management Console so that the change replicates to every domain controller.
  • Change the password of every account named in those files, on every system where it is set, because the passwords must be assumed to be known.
  • Use Windows LAPS for local administrator passwords and group managed service accounts for services and scheduled tasks, instead of setting passwords through Group Policy.
  • Confirm that the systems used to manage Group Policy have the MS14-025 update (KB2962486) or run a later version of Windows that includes it, so that new passwords cannot be added.

For example, from a domain-joined computer:

findstr /S /I /M cpassword \\%USERDNSDOMAIN%\SYSVOL\*.xml

Confirm the fix by repeating the search, which should find no cpassword value with content, and by testing that the recovered passwords no longer authenticate.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Active Directory Findings

Every Active Directory finding