Group Policy Preferences (GPP) Passwords
Extract credentials stored in legacy Group Policy Preferences XML files on SYSVOL shares.
Although patched in 2014, GPP passwords are still commonly found in older environments and provide easy wins.
Quick Reference
# NetExec GPP module |
What are GPP Passwords?
Group Policy Preferences allowed administrators to create policies with embedded credentials. These credentials were stored in XML files on SYSVOL with AES-256 encryption, but Microsoft published the decryption key on MSDN.
Vulnerable GPP Files
| File | Purpose | Contains |
|---|---|---|
| Groups.xml | Local group management | Local admin passwords |
| Services.xml | Service configuration | Service account passwords |
| Scheduledtasks.xml | Scheduled tasks | Account passwords |
| DataSources.xml | Database connections | Database passwords |
| Printers.xml | Printer configuration | Printer passwords |
| Drives.xml | Mapped drives | Drive mapping credentials |
Automated Discovery
NetExec Modules
# List GPP-related modules |
Get-GPPPassword (PowerShell)
# PowerSploit module |
Manual Discovery
Search SYSVOL
# Connect to SYSVOL |
Search from Windows
# Search SYSVOL for XML files |
Decryption
gpp-decrypt (Linux)
# Decrypt cpassword value |
PowerShell Decryption
function Get-DecryptedCpassword { |
Example Groups.xml File
|
Common Locations
SYSVOL Paths
\\domain.local\SYSVOL\domain.local\Policies\{GUID}\Machine\Preferences\Groups\Groups.xml |
Local Cache
C:\ProgramData\Microsoft\Group Policy\History\{GUID}\Machine\Preferences\Groups\Groups.xml |
Exploitation Scenarios
Local Administrator Password
<User clsid="{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}" |
Decrypt and use for local admin access across domain.
Service Account Password
<NTService clsid="{AB6F0B67-341F-4e51-92F9-005FBFBA1A43}" |
Decrypt and use service account for lateral movement.
Scheduled Task Credentials
<ScheduledTasks clsid="{CC63F200-7309-4ba0-B154-A71CD118DBCC}"> |
Notes
MS14-025 Patch
Microsoft released MS14-025 in May 2014 to prevent administrators from setting passwords using GPP.
What the patch does:
- Prevents creation of new GPP with passwords
- Does NOT remove existing Groups.xml files
- Does NOT delete cached local copies
What the patch does NOT do:
- Remove existing GPP passwords from SYSVOL
- Clear cached GPP files on endpoints
- Decrypt or alert on existing passwords
Why Still Relevant
GPP passwords are still found because:
- Patch only prevents new passwords, doesn’t remove old ones
- Administrators must manually delete XML files
- Cached copies remain on endpoints
- Many organizations never cleaned up after patch
- Legacy systems may not be patched
Detection
GPP password access generates:
- Event ID 5140 (Network share accessed) for SYSVOL
- Event ID 5145 (Detailed file share) for XML file access
- Unusual SYSVOL enumeration patterns
- Multiple XML file reads in short timeframe
Published AES Key
Microsoft published the AES-256 key on MSDN:
4e 99 06 e8 fc b6 6c c9 fa f4 93 10 62 0f fe e8 |
This makes all GPP passwords trivially decryptable.
Common Passwords Found
Frequently discovered in GPP:
- Local administrator passwords
- Service account passwords
- Backup account passwords
- SQL service accounts
- Scheduled task credentials
- Mapped drive credentials
Cached Copies
Even if deleted from SYSVOL, cached copies may exist:
C:\ProgramData\Microsoft\Group Policy\History\C:\Users\*\AppData\Local\Microsoft\Group Policy\History\C:\Windows\System32\GroupPolicy\
Search these locations on compromised systems.
Cleanup Recommendations
For clients:
- Delete all GPP XML files from SYSVOL
- Clear Group Policy cache on all endpoints
- Change all passwords that were in GPP
- Implement LAPS for local admin passwords
- Use gMSA for service accounts
- Monitor SYSVOL access
- Regular audits for GPP files
Alternative Credential Storage
Recommend to clients:
- LAPS (Local Administrator Password Solution) for local admin passwords
- gMSA (Group Managed Service Accounts) for service accounts
- Azure Key Vault for application secrets
- CyberArk/Thycotic for privileged account management
- Never store passwords in Group Policy
Mitigation
Immediate actions:
# Find all GPP XML files |
LAPS Implementation
Replace GPP with LAPS:
- Install LAPS on domain controllers
- Extend AD schema for LAPS attributes
- Create GPO to enable LAPS
- Configure password complexity and rotation
- Delegate read access to help desk
- Remove old GPP policies
Verification
Confirm cleanup:
# Verify no cpassword attributes in SYSVOL |
Historical Context
GPP passwords were introduced in Windows Server 2008 to simplify password management. The feature was widely adopted before the security implications were understood. The published AES key made all stored passwords instantly crackable, leading to the 2014 patch.