A tool to decrypt Group Policy Preferences (GPP) cpassword attributes
Project description
GPP-Decrypt
A tool to decrypt Group Policy Preferences (GPP) passwords
About
Group Policy Preferences (GPP) was introduced in Windows Server 2008 and allows administrators to set domain passwords via Group Policy. However, the passwords are encrypted with a publicly known AES-256 key, making them trivial to decrypt.
This tool decrypts these passwords from GPP XML files commonly found in SYSVOL shares.
Note: Microsoft released MS14-025 which prevents new credentials from being stored in GPP. However, existing GPP XML files with encrypted passwords may still exist in many environments.
Installation
From PyPI (Recommended)
pip install gpp-decrypt
From Source
git clone https://github.com/t0thkr1s/gpp-decrypt.git
cd gpp-decrypt
pip install .
Using Docker
docker build -t gpp-decrypt .
docker run -v $(pwd):/data gpp-decrypt -f /data/groups.xml
Usage
Command Line Interface
# Decrypt passwords from a GPP XML file
gpp-decrypt -f groups.xml
# Decrypt a single cpassword
gpp-decrypt -c "j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw"
# Show verbose output
gpp-decrypt -f groups.xml --verbose
# Suppress banner
gpp-decrypt -f groups.xml --no-banner
As a Python Library
from gpp_decrypt import decrypt_password, parse_xml_file
# Decrypt a single password
password = decrypt_password("j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw")
print(f"Decrypted: {password}")
# Parse and decrypt from XML file
results = parse_xml_file("groups.xml")
for cred in results:
print(f"Username: {cred['username']}, Password: {cred['password']}")
Example
GPP XML files are typically found in the SYSVOL share of a domain controller:
\\<DOMAIN>\SYSVOL\<DOMAIN>\Policies\{<POLICY_GUID>}\Machine\Preferences\Groups\Groups.xml
\\<DOMAIN>\SYSVOL\<DOMAIN>\Policies\{<POLICY_GUID>}\User\Preferences\Groups\Groups.xml
Example Groups.xml structure:
<?xml version="1.0" encoding="utf-8"?>
<Groups clsid="{3125E937-EB16-4b4c-9934-544FC6D24D26}">
<User clsid="{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}"
name="Administrator"
image="2"
changed="2023-01-01 00:00:00"
uid="{EF57DA28-5F69-4530-A59E-AAB58578219D}">
<Properties action="U"
newName=""
fullName=""
description=""
cpassword="j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw"
changeLogon="0"
noChange="1"
neverExpires="1"
acctDisabled="0"
userName="Administrator"/>
</User>
</Groups>
References
- Microsoft's MS14-025 Security Bulletin
- Original GPP Decrypt Research
- Group Policy Preferences and Getting Your Domain 0wned
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Disclaimer
This tool is designed for authorized security testing and system administration only. Users are responsible for complying with all applicable laws and regulations. The authors assume no liability for misuse or damage caused by this program.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpp_decrypt-2.0.0.tar.gz.
File metadata
- Download URL: gpp_decrypt-2.0.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
347748f0f58e1cc7542065da3aa77d8d593ca253743b64a3824cf0c6f7d86892
|
|
| MD5 |
6a78a0fa34f42ed569b3bcd43c59ea09
|
|
| BLAKE2b-256 |
ab8b61fb00382679d889f0f8d2542561eee007a62629c1ea15fb28960d22fce1
|
Provenance
The following attestation bundles were made for gpp_decrypt-2.0.0.tar.gz:
Publisher:
publish.yml on t0thkr1s/gpp-decrypt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpp_decrypt-2.0.0.tar.gz -
Subject digest:
347748f0f58e1cc7542065da3aa77d8d593ca253743b64a3824cf0c6f7d86892 - Sigstore transparency entry: 357257685
- Sigstore integration time:
-
Permalink:
t0thkr1s/gpp-decrypt@e65cc777155d130066fd92d43b6590ddb43bf4d2 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/t0thkr1s
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e65cc777155d130066fd92d43b6590ddb43bf4d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gpp_decrypt-2.0.0-py3-none-any.whl.
File metadata
- Download URL: gpp_decrypt-2.0.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88b57b134cbdc5300baa0356a38da2da1a5ce726b77e0e7124e91ae207f7af07
|
|
| MD5 |
f6088e183921f81cc4a21400d43affdf
|
|
| BLAKE2b-256 |
4d9bba014a9a972674d2beb6f1ab69ee5751c9b881647a4009c5928001c540b9
|
Provenance
The following attestation bundles were made for gpp_decrypt-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on t0thkr1s/gpp-decrypt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpp_decrypt-2.0.0-py3-none-any.whl -
Subject digest:
88b57b134cbdc5300baa0356a38da2da1a5ce726b77e0e7124e91ae207f7af07 - Sigstore transparency entry: 357257700
- Sigstore integration time:
-
Permalink:
t0thkr1s/gpp-decrypt@e65cc777155d130066fd92d43b6590ddb43bf4d2 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/t0thkr1s
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e65cc777155d130066fd92d43b6590ddb43bf4d2 -
Trigger Event:
push
-
Statement type: