1. Resources
  2. Detection rules
  3. Group Policy Preferences Passwords

Group Policy Preferences Passwords detection rules

Group Policy Preferences once let administrators store account passwords in XML files on SYSVOL, encrypted with a publicly known key. Any domain user can read the files that remain and recover the passwords.

Platform
Active Directory
Severity
High
Log source
Windows Security event log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Any domain account with network access to a domain controller, and a preference item on SYSVOL that still carries a cpassword value.
Impact
The attacker obtains the clear-text password of every account stored this way, typically a local Administrator password shared by many computers or a privileged service account.
Response
Change the password of every account stored in any preference item on SYSVOL, and disable the account that read the files.
Mitigation
Find and remove every preference item that contains a cpassword value, and manage local administrator passwords with Windows LAPS instead.
Event ID
5145
Threat groups
APT33Wizard Spider

How the attack works

Group Policy Preferences is the part of Group Policy that configures items such as local users, mapped drives, scheduled tasks, services and data sources. Until 2014 several of these preference types could store a user name and a password, for example to set the password of the local Administrator account on every computer in an organizational unit. The password was written, AES encrypted, into the cpassword attribute of an XML file in the GPO's folder on SYSVOL.

The encryption does not protect it. The key is the same in every domain and is publicly known, and SYSVOL is readable by every domain user and computer because policy could not be applied otherwise. Anyone with a domain account can read the files and recover the passwords. Security update MS14-025 (May 2014) removed the ability to save new passwords in preferences, but it does not delete the ones that already exist. Files created before the update stay on SYSVOL until an administrator removes them.

Reading the files is ordinary SMB access to the SYSVOL share of a domain controller. With "Audit Detailed File Share" enabled, the domain controller logs each access in event 5145 with the path in RelativeTargetName. Computers read the preference files under a GPO's Machine folder with their computer account when they apply policy, so a user account reading those files stands out. Files under the User folder, which include every drive mapping (Drives.xml), are read during normal user policy processing. One event cannot tell that apart from an attacker's read, so the rule leaves them out.

What an attacker needs

  • Any domain account, with network access to a domain controller. SYSVOL is readable by all authenticated users.
  • A preference item that still carries a cpassword value, usually one created before MS14-025 was installed on the computers where GPOs are edited.

Impact

The attacker obtains the clear-text password of every account stored this way. These are typically the local Administrator account of all computers the GPO applies to, or the account of a service or scheduled task, which is often privileged. A local administrator password shared by many computers gives lateral movement to all of them.

Detection rules

Computer-Side Group Policy Preferences File Read by a Non-Computer Account

Detects access over SMB (5145, SYSVOL share) to the Group Policy Preferences files that could store a password (Groups.xml, ScheduledTasks.xml, Services.xml, DataSources.xml) under a GPO's Machine folder by an account that is not a computer account. Computers read these files with their own account when they apply policy, so a user account reading them is either a Group Policy administrator or someone collecting stored passwords. The same files under the User folder, and Drives.xml, are read during normal user policy processing and are not covered. A read made with a computer account is excluded by the filter and is not detected. Deploy on domain controllers with "Audit Detailed File Share" enabled for success; the subcategory logs every access to SYSVOL, so plan for its volume.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Computer-Side Group Policy Preferences File Read by a Non-Computer Account
id: 240bb2e7-a02d-4095-8f17-9dc0a4d4fa71
status: experimental
description: >-
  Detects access over SMB (5145, SYSVOL share) to the Group Policy Preferences
  files that could store a password (Groups.xml, ScheduledTasks.xml,
  Services.xml, DataSources.xml) under a GPO's Machine folder by an account
  that is not a computer account. Computers read these files with their own
  account when they apply policy, so a user account reading them is either a
  Group Policy administrator or someone collecting stored passwords. The same
  files under the User folder, and Drives.xml, are read during normal user
  policy processing and are not covered. A read made with a computer account
  is excluded by the filter and is not detected. Deploy on domain controllers
  with "Audit Detailed File Share" enabled for success; the subcategory logs
  every access to SYSVOL, so plan for its volume.
references:
  - https://attack.mitre.org/techniques/T1552/006/
  - https://support.microsoft.com/en-us/servicing/os/windows/2014/05/ms14-025-vulnerability-in-group-policy-preferences-could-allow-elevation-of-privilege-may-13-2014
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5145
author: Forestall
date: 2026-11-14
tags:
  - attack.credential-access
  - attack.t1552.006
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5145
    ShareName|endswith: '\SYSVOL'
    RelativeTargetName|contains: '\Machine\'
    RelativeTargetName|endswith:
      - '\Groups.xml'
      - '\ScheduledTasks.xml'
      - '\Services.xml'
      - '\DataSources.xml'
  filter_computer_accounts:
    SubjectUserName|endswith: '$'
  condition: selection and not 1 of filter_*
falsepositives:
  - Group Policy administrators who open, edit, back up or report on a GPO with their user account. Exclude the management workstations by IpAddress or the administrators by exact SubjectUserName.
  - Backup, antivirus or GPO management products that read SYSVOL through the share with a service account. Exclude that account by exact SubjectUserName.
level: medium

False positives

  • Group Policy administrators who open, edit, back up or report on a GPO with their user account. Exclude the management workstations by IpAddress or the administrators by exact SubjectUserName.
  • Backup, antivirus or GPO management products that read SYSVOL through the share with a service account. Exclude that account by exact SubjectUserName.

Triage

  • Identify the reader (SubjectUserName) and the source address (IpAddress). A Group Policy administrator editing or reporting on that GPO from a management workstation is the common benign cause.
  • Check whether the file named in RelativeTargetName contains a cpassword value. If it does not, this read exposed nothing, but an account that walks through the policy folders is still worth a look.
  • Review the other 5145 events of the same account and address around that time. Reads of preference files across many GPO folders within seconds are enumeration, not administration of one GPO.
  • If a file with a password was read by an account that had no reason to read it, treat the stored account as compromised. Change its password everywhere and look for logons with it (4624, 4776) from the source address.

Response

Once the attack is confirmed:

  1. Disable the account that read the files and isolate the address it came from.
  2. Change the password of every account stored in any preference item on SYSVOL, not only in the file named in the alert. Every domain user could read all of them, and reads made before auditing was enabled left no event.
  3. Where the stored password belongs to a local Administrator account, give each computer the policy applied to a new password of its own, and look for logons with that account across those computers. A shared local password allows movement to all of them.
  4. Remove the preference items that carry a cpassword value from SYSVOL in the way the MS14-025 article describes, once the passwords have been changed.
  5. Search SYSVOL and the GPO backups again and confirm that no cpassword value is left.

Mitigation

  • Find and remove every preference item that contains a cpassword value. Microsoft's MS14-025 article describes how to list them and how to remove them without breaking clients.
  • Change the password of every account whose password was stored in a preference item. Removing the file does not undo an earlier read.
  • Manage local administrator passwords with Windows LAPS, and run services and scheduled tasks with group managed service accounts, instead of distributing passwords through policy.
  • Check GPO backups and copies from other domains before restoring them, so that old items with passwords do not return to SYSVOL.
  • Enable "Audit Detailed File Share" on domain controllers if you want to see who reads these files, and plan for its volume.

Frequently asked questions

MS14-025 is installed. Why are passwords still on SYSVOL?

The update removed the ability to save new passwords in preference items. It does not delete the ones that already exist. Files created before the update stay on SYSVOL, readable by every domain user, until an administrator removes them. Old items can also return when a GPO backup or a copy from another domain is restored.

Why does the rule ignore Drives.xml and the files under the User folder?

Those files are read during normal user policy processing, so one event cannot tell a normal read from an attacker's. The rule therefore covers only the files under the Machine folder, which computers read with their own account. A password stored in a user-side item is not covered by this rule and has to be found by searching SYSVOL.

Is deleting the XML file enough once a stored password is found?

No. Removing the file does not undo an earlier read, and the key that protects the value is public and the same in every domain. Treat the password as known to anyone who had a domain account while the file existed, and change it everywhere it is used.

What does it cost to enable the audit setting the rule needs?

The rule needs Audit Detailed File Share for success on domain controllers. That subcategory logs every access to SYSVOL, including the policy processing of computers and users, so the volume is high. Plan the collection and filtering before enabling it.

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.