How it works
Group Policy Preferences is the part of Group Policy that configures items such as local users and groups, mapped drives, services, scheduled tasks and data sources. Several of these item types take an account name and a password: the new password of the local Administrator account, the account a service or a scheduled task runs as, the credentials of a mapped drive.
The Group Policy editor stored that password in the cpassword attribute of an XML file in the GPO's folder on SYSVOL. The value is AES encrypted and Base64 encoded, but the key is fixed. It is the same in every domain, and Microsoft printed it in the Group Policy Preferences protocol specification. Two facts follow:
- SYSVOL has to be readable by every domain user and computer, or policy could not be applied. The control on the file is therefore read access, and everyone has it.
- With the file and the published key, recovering the plaintext is a decryption. No guessing or cracking is needed.
Microsoft's security update MS14-025 (May 2014, CVE-2014-1812) removed the ability to configure passwords in the affected preference extensions: local users and groups, mapped drives, services, scheduled tasks and data sources. The update changes the editor. It does not touch preference items that already exist, and Microsoft's bulletin says so: existing items must be found and removed by the administrator. A domain that was built before 2014, or one that had a GPO backup restored or a GPO copied in from an older domain, can still carry these values.
The files that can hold a cpassword value live under \\<domain>\SYSVOL\<domain>\Policies\{GPO GUID}\Machine\Preferences\ and ...\User\Preferences\:
| File | Preference item |
|---|---|
Groups\Groups.xml |
Local users and groups |
Services\Services.xml |
Services |
ScheduledTasks\ScheduledTasks.xml |
Scheduled and immediate tasks |
DataSources\DataSources.xml |
Data sources |
Drives\Drives.xml |
Mapped drives |
Printers\Printers.xml |
Printers (searched by the public tools) |
A preference item with a stored password looks like this:
<User name="Administrator (built-in)" ...>
<Properties action="U" userName="Administrator (built-in)"
cpassword="<Base64 value>" ... />
</User>
Prerequisites
- A valid domain account of any privilege level, and SMB access (TCP 445) to a domain controller.
- At least one preference item on SYSVOL that still carries a
cpasswordvalue. These are items created before MS14-025 was installed on the machines where GPOs are edited, or brought back by a restore. - For the result to be useful: the stored password must still be valid. Local Administrator passwords set once by policy and service account passwords are rarely changed, which is why old values so often still work.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Search SYSVOL for cpassword values
From any domain-joined Windows host, a recursive string search is enough:
findstr /S /I /M "cpassword" \\corp.example.com\SYSVOL\corp.example.com\Policies\*.xml
/S searches subdirectories, /I ignores case and /M prints only the names of the files that match.
2. Find and decrypt in one step
PowerSploit's Get-GPPPassword searches the domain controller's SYSVOL for the preference files, decrypts every cpassword value and prints the account names with their passwords:
Import-Module .\PowerSploit.psd1
# Search the current domain's SYSVOL
Get-GPPPassword
# Search a named domain controller
Get-GPPPassword -Server DC01.corp.example.com
From Linux, Impacket's Get-GPPPassword.py walks the SYSVOL share over SMB. The same script decrypts a file that was copied earlier:
# Search SYSVOL on the domain controller (prompts for the password)
Get-GPPPassword.py corp.example.com/alice@192.0.2.10
# Parse a preference file that is already on disk
Get-GPPPassword.py -xmlfile Groups.xml LOCAL
NetExec has a module that does the same against one or many domain controllers:
nxc smb 192.0.2.10 -u alice -p '<password>' -M gpp_password
3. Decrypt a single value
When only the attribute value is at hand, for example from a GPO backup or a file found on a share, gpp-decrypt takes it as its argument:
gpp-decrypt '<cpassword value>'
4. Use the password
The tools print the user name stored next to each password. The attacker tries the pair where the preference item applied: the local Administrator account on every computer in the GPO's scope, or the domain account that a service, a task or a drive mapping used.
Impact
The attacker gets cleartext passwords without touching any host other than a domain controller's file share. That is credential theft with the lowest possible entry cost.
What the password is worth depends on the item:
- Local users and groups: one local Administrator password for every computer the GPO applies to. That gives administrator access to all of them and to the credentials of whoever is signed in there.
- Services and scheduled tasks: a domain service account, often privileged far beyond what the service needs.
- Mapped drives and data sources: an account with access to file or database content.
Microsoft's bulletin states the outcome plainly: the attacker could acquire local or domain administrator credentials and use them to elevate privileges in the domain. Other places where passwords are left readable are covered in credentials in SYSVOL scripts, file shares and configuration files and passwords in Active Directory attributes.
OPSEC and artifacts
- Reading only what matters. A careful operator lists the
Preferencesfolders and opens only the six file names, instead of downloading all of SYSVOL. Each file opened still produces a file share access check on the domain controller: event 5145 with the share\\*\SYSVOL, the path inRelativeTargetName, the account and the client address. This event is written only when Audit Detailed File Share is enabled, which is not a default. - Blending with policy processing. Every computer and user reads GPO files when policy is applied. Files under a GPO's
Userfolder are read by user accounts during normal processing, so a read there cannot be told apart from an attacker's. Files under theMachinefolder are normally read by computer accounts, so a user account reading them stands out. - Decrypting offline. Decryption happens on the attacker's machine and leaves nothing in the domain.
- Share session events. The SMB session to the domain controller writes event 5140 (Audit File Share) and a network logon, event 4624 type 3. Both are routine for SYSVOL and carry no file name.
- Use of the password. The first logons with the recovered account from a new source address are the most reliable trace: 4624 on member computers for a local Administrator, 4768 and 4776 on domain controllers for a domain account.
- No trace before auditing. Reads made before Audit Detailed File Share was turned on left no event at all. The absence of 5145 events says nothing about whether a file was read in the past.
Detection
Finding the exposure is better than waiting for the read: search SYSVOL for cpassword on a schedule, with the same string search an attacker uses, and treat every hit as an incident.
For the read itself:
- Preference files read by a user account. The Group Policy Preferences passwords detection rules alert on event 5145 where a user account, not a computer account, reads a preference XML file under a GPO's
Machinefolder. - Many preference files in a short time. One account opening preference files across many GPO folders within seconds is enumeration, not administration of one GPO.
- Preference files changed. A preference file that gains a password, or an old GPO that returns, shows as a GPO change. See the GPO modified detection rules.
// User accounts that read computer-side preference files on SYSVOL
WindowsEvent
| where Channel == "Security" and EventID == 5145
| extend Share = tostring(EventData.ShareName),
Path = tostring(EventData.RelativeTargetName),
Account = tostring(EventData.SubjectUserName),
Source = tostring(EventData.IpAddress)
| where Share endswith @"\SYSVOL"
| where Path has @"\Machine\Preferences\"
| where Path endswith "Groups.xml" or Path endswith "Services.xml"
or Path endswith "ScheduledTasks.xml" or Path endswith "DataSources.xml"
| where Account !endswith "$"
| summarize Files = dcount(Path), Reads = count() by Account, Source, bin(TimeGenerated, 10m)
Group Policy administrators who edit or report on a GPO from a management workstation produce the same events. Compare the account and the source address with the people who manage policy. Audit Detailed File Share is a high-volume subcategory on domain controllers; the Active Directory audit policy guide covers how to enable it.
Mitigation
- Remove every preference item that carries a
cpasswordvalue. Microsoft's KB2962486 article describes how to list the affected items and how to remove them without breaking clients. Check GPO backups too: deleting the live file does not rewrite a backup, and a restore brings the value back. - Change every password that was stored. Removing the file does not undo an earlier read. Every domain user could read the value for as long as the file existed.
- Manage local administrator passwords with Windows LAPS, which gives each computer its own rotated password. The Windows LAPS guide covers the rollout.
- Run services and scheduled tasks under group managed service accounts instead of pushing a password through policy. See the gMSA guide.
- Install MS14-025 on every machine where GPOs are edited, including administrators' workstations with the Remote Server Administration Tools, so that no new password can be saved.
- Review what each GPO really delivers. The gpresult and RSoP audit guide shows how to see the settings a computer receives, which helps find preference items that nobody remembers.
- Enable Audit Detailed File Share on domain controllers if you want to see who reads these files, and plan for its volume.
Detection rules for this attack
Log events to collect
FAQ
MS14-025 is installed. Can GPP passwords still be found?
Yes. The update removed the ability to save new passwords in preference items from the Group Policy editor. It does not delete the items that already exist. Files written before the update stay on SYSVOL until an administrator removes them, and old items can return when a GPO backup is restored.
Is the cpassword value encrypted?
It is AES encrypted, but with one fixed key that is the same in every domain and is printed in Microsoft's protocol specification. Anyone who can read the XML file can decrypt the value, so the encryption gives no protection. No password cracking is involved.
Which files can contain a cpassword value?
Preference files under the Policies folder of SYSVOL: Groups.xml (local users), Services.xml, ScheduledTasks.xml, DataSources.xml and Drives.xml. Public tools also search Printers.xml. Each can sit under the Machine or the User folder of a GPO.
What should happen to a password found in a preference file?
Change it everywhere it is used, then remove the preference item. Every domain user could read the file for as long as it existed, and reads made before file share auditing was enabled left no event, so the password has to be treated as known.
References
- Unsecured Credentials: Group Policy Preferences, T1552.006 (MITRE ATT&CK)
- Microsoft Security Bulletin MS14-025: Vulnerability in Group Policy Preferences Could Allow Elevation of Privilege
- MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege (KB2962486)
- [MS-GPPREF] Password Encryption (Microsoft Open Specifications)
- 5145(S, F): A network share object was checked to see whether client can be granted desired access (Microsoft Learn)
- Get-GPPPassword.py (Impacket)
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.