Skip to main content

Overview

The Domain GPP Password check searches the domain SYSVOL share for Group Policy Preference (GPP) XML files containing encrypted passwords. SYSVOL is accessible to all authenticated domain users, making any credentials stored there accessible to the entire domain.
This check requires domain connectivity and will only work on domain-joined systems.

How It Works

SharpUp searches the SYSVOL share for policy XML files:
Target Files:
  • Groups.xml
  • Services.xml
  • Scheduledtasks.xml
  • DataSources.xml
  • Printers.xml
  • Drives.xml
  • Registry.xml

Technical Details

  1. Retrieves the DNS domain name from environment variable %USERDNSDOMAIN%
  2. Constructs SYSVOL path: \\domain.com\SYSVOL
  3. Recursively searches for target XML files
  4. Parses files for cpassword attributes
  5. Reports files containing encrypted passwords
The encrypted passwords can be decrypted using Microsoft’s published AES key.

Example Output

Interpretation:
  • Multiple GPP files contain passwords
  • LocalAdmin is a local account (possibly same password on all machines)
  • svc_backup is a domain service account
  • All passwords are easily decryptable

Exploitation

Method 1: Manual Search and Decrypt

Method 2: Using PowerSploit Get-GPPPassword

Method 3: Using Impacket

Method 4: Decrypt Password

Once you find an encrypted password (cpassword value):

Method 5: Using Metasploit

Remediation

1

Identify All GPP Files in SYSVOL

2

Document Found Credentials

Before deletion, document:
  • Which GPOs contain passwords
  • What accounts are affected
  • What systems receive these policies
  • What functionality will break when removed
3

Remove Passwords from GPOs

For each affected GPO:
  1. Open Group Policy Management Console (GPMC)
  2. Navigate to the policy containing passwords
  3. Remove or update the preference items:
    • Groups: Remove password-based group membership, use Restricted Groups instead
    • Services: Remove service credentials, use gMSA or sMSA
    • Scheduled Tasks: Remove task credentials, use gMSA
    • Data Sources: Remove connection strings, use Windows Authentication
    • Drives: Remove credentials, use proper share permissions
4

Delete XML Files from SYSVOL

After removing passwords from GPOs:
5

Change All Exposed Credentials

6

Implement KB2962486

Ensure all systems have MS14-025 installed:
  • Windows Server 2008 R2 / Windows 7: KB2962486
  • Newer systems: Already patched
This removes the ability to set passwords in GPP preferences.
7

Verify Removal

Alternative Solutions

Use Local Administrator Password Solution (LAPS)

Use Group Managed Service Accounts (gMSA)

Use Restricted Groups Instead of GPP Groups

Detection

Defensive Monitoring

Detection Strategies

  • Monitor bulk reading of XML files from SYSVOL
  • Alert on access to Groups.xml, Services.xml, etc.
  • Track unusual access patterns (non-DC accessing SYSVOL extensively)

Real-World Scenarios

Context: IT team used GPP to set same local administrator password on all 5,000 workstations 7 years ago.Impact:
  • Attacker compromises one workstation
  • Extracts GPP password from SYSVOL
  • Gains local admin on all 5,000 workstations
  • Complete enterprise compromise
Lesson: This is why LAPS was created.
Context: Domain service account credentials stored in Scheduledtasks.xml for backup job.Attack Path:
  1. Attacker gets domain user access
  2. Reads SYSVOL and finds Scheduledtasks.xml
  3. Decrypts service account password
  4. Authenticates as service account
  5. Service account has broad permissions for backups
  6. Attacker exfiltrates all data
Solution: Use gMSA for service accounts.
Context: DataSources.xml contains SQL Server connection string with SA password.Impact:
  • Direct access to production database
  • Data exfiltration
  • Data manipulation
  • Ransomware opportunity
Solution: Use Windows Authentication for databases.

Prevention Best Practices

Never Use GPP for Passwords

Microsoft removed this feature for a reason. Don’t work around the security patch.

Implement LAPS

Use LAPS for all local administrator password management.

Use gMSA/sMSA

Service accounts should use managed service accounts without passwords.

Regular Audits

Periodically scan SYSVOL for any XML files with passwords.

Automated Remediation Script

Cached GPP Password

Check for locally cached GPP files

Registry AutoLogons

Find auto-logon credentials in registry

Unattended Install Files

Discover credentials in installation files

Remediation Guide

Comprehensive remediation guidance

References

Microsoft KB2962486

MS14-025: Vulnerability in GPP could allow elevation of privilege

MITRE ATT&CK

T1552.006 - Unsecured Credentials: Group Policy Preferences

LAPS Documentation

Local Administrator Password Solution