T1552.006 Group Policy Preferences
Sub-technique of: T1552
High-Level Description
Adversaries may attempt to find unsecured credentials in Group Policy Preferences (GPP). GPP are tools that allow administrators to create domain policies with embedded credentials. These policies allow administrators to set local accounts.
These group policies are stored in SYSVOL on a domain controller. This means that any domain user can view the SYSVOL share and decrypt the password (using the AES key that has been made public).
The following tools and scripts can be used to gather and decrypt the password file from Group Policy Preference XML files:
- Metasploit’s post exploitation module: post/windows/gather/credentials/gpp
- Get-GPPPassword
- gpprefdecrypt.py
On the SYSVOL share, adversaries may use the following command to enumerate potential GPP XML files: dir /s * .xml
Kill Chain Phase
- Credential Access (TA0006)
Platforms: Windows
What to Check
- Identify if Group Policy Preferences technique is applicable to target environment
- Check Windows systems for indicators of Group Policy Preferences
- Verify mitigations are bypassed or absent (3 known mitigations)
- Assess detection coverage (1 detection strategies)
How to Test
Atomic Red Team Tests
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Atomic Test 1: GPP Passwords (findstr)
Look for the encrypted cpassword value within Group Policy Preference files on the Domain Controller. This value can be decrypted with gpp-decrypt on Kali Linux.
Supported Platforms: windows
findstr /S cpassword %logonserver%\sysvol\*.xml
Dependencies:
- Computer must be domain joined
Atomic Test 2: GPP Passwords (Get-GPPPassword)
Look for the encrypted cpassword value within Group Policy Preference files on the Domain Controller. This test is intended to be run from a domain joined workstation, not on the Domain Controller itself. The Get-GPPPasswords.ps1 executed during this test can be obtained using the get-prereq_commands.
Successful test execution will either display the credentials found in the GPP files or indicate "No preference files found".
Supported Platforms: windows
. "#{gpp_script_path}"
Get-GPPPassword -Verbose
Dependencies:
- Get-GPPPassword PowerShell Script must exist at #{gpp_script_path}
- Computer must be domain joined
Manual Testing
If Atomic Red Team tests are not applicable, manually verify the technique by:
Identify Attack Surface: Determine if the target environment is susceptible to Group Policy Preferences by examining the target platforms (Windows).
Assess Existing Defenses: Review whether mitigations for T1552.006 are in place. If defenses are absent or misconfigured, this technique may be exploitable.
Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.
Remediation Guide
M1047 Audit
Search SYSVOL for any existing GGPs that may contain credentials and remove them.
M1051 Update Software
Apply patch KB2962486 which prevents credentials from being stored in GPPs.
M1015 Active Directory Configuration
Remove vulnerable Group Policy Preferences.
Detection
Detect Access and Decryption of Group Policy Preference (GPP) Credentials in SYSVOL
Risk Assessment
| Finding | Severity | Impact |
|---|---|---|
| Group Policy Preferences technique applicable | High | Credential Access |
CWE Categories
| CWE ID | Title |
|---|---|
| CWE-522 | Insufficiently Protected Credentials |