Unsecured Credentials: Group Policy Preferences
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:
On the SYSVOL share, adversaries may use the following command to enumerate potential GPP XML files:
dir /s * .xml
|Active Directory Configuration||
Remove vulnerable Group Policy Preferences.
Search SYSVOL for any existing GGPs that may contain credentials and remove them.
Monitor for attempts to access SYSVOL that involve searching for XML files.
Deploy a new XML file with permissions set to Everyone:Deny and monitor for Access Denied errors.
- Microsoft. (2016, August 31). Group Policy Preferences. Retrieved March 9, 2020.
- Microsoft. (n.d.). 188.8.131.52.4 Password Encryption. Retrieved April 11, 2018.
- Campbell, C. (2012, May 24). GPP Password Retrieval with PowerShell. Retrieved April 11, 2018.
- Security Response attack Investigation Team. (2019, March 27). Elfin: Relentless Espionage Group Targets Multiple Organizations in Saudi Arabia and U.S.. Retrieved April 10, 2019.
- Ackerman, G., et al. (2018, December 21). OVERRULED: Containing a Potentially Destructive Adversary. Retrieved January 17, 2019.
- PowerShellMafia. (2012, May 26). PowerSploit - A PowerShell Post-Exploitation Framework. Retrieved February 6, 2018.
- PowerSploit. (n.d.). PowerSploit. Retrieved February 6, 2018.
- Microsoft. (2014, May 13). MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege. Retrieved January 28, 2015.
- Sean Metcalf. (2015, December 28). Finding Passwords in SYSVOL & Exploiting Group Policy Preferences. Retrieved February 17, 2020.
- Microsoft. (2014, May 13). MS14-025: Vulnerability in Group Policy Preferences could allow elevation of privilege. Retrieved February 17, 2020.