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.How It Works
SharpUp searches the SYSVOL share for policy XML files:- Groups.xml
- Services.xml
- Scheduledtasks.xml
- DataSources.xml
- Printers.xml
- Drives.xml
- Registry.xml
Technical Details
- Retrieves the DNS domain name from environment variable
%USERDNSDOMAIN% - Constructs SYSVOL path:
\\domain.com\SYSVOL - Recursively searches for target XML files
- Parses files for
cpasswordattributes - Reports files containing encrypted passwords
Example Output
- 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:
- Open Group Policy Management Console (GPMC)
- Navigate to the policy containing passwords
- 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
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
- File Access Monitoring
- Network Monitoring
- PowerShell Monitoring
- Behavioral Analytics
- 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
Scenario 1: Enterprise-Wide Local Admin Password
Scenario 1: Enterprise-Wide Local Admin Password
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
Scenario 2: Service Account in Scheduled Task
Scenario 2: Service Account in Scheduled Task
Context: Domain service account credentials stored in Scheduledtasks.xml for backup job.Attack Path:
- Attacker gets domain user access
- Reads SYSVOL and finds Scheduledtasks.xml
- Decrypts service account password
- Authenticates as service account
- Service account has broad permissions for backups
- Attacker exfiltrates all data
Scenario 3: Database Connection String
Scenario 3: Database Connection String
Context: DataSources.xml contains SQL Server connection string with SA password.Impact:
- Direct access to production database
- Data exfiltration
- Data manipulation
- Ransomware opportunity
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
Related Checks
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