> For the complete documentation index, see [llms.txt](https://ahmed-tarek.gitbook.io/security-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ahmed-tarek.gitbook.io/security-notes/notes/active-directory-pentesting/post-compromise-attacks/gpp-cpassword-attacks.md).

# GPP / cPassword Attacks

**What Happened?**

* **Group Policy Preferences (GPP)** was a feature introduced in **Windows Server 2008** to simplify the management of local accounts and services across domain-joined machines.
* Admins could use GPP to:
  * Set passwords for local admin accounts.
  * Configure services and other tasks via **Group Policies**.

#### **What Made GPP Vulnerable?**

Here’s where things went wrong:

* GPP allowed **embedded credentials** (e.g., local admin passwords) to be set within XML files.
* These credentials were **encrypted** and stored as `cPassword` values in files like `Groups.xml`.
* The `Groups.xml` file resides in **SYSVOL** – a shared folder on every domain controller that **all authenticated users can access**

The encryption should have kept these passwords safe, right? Well…

**The OOPS Moment**

Microsoft made a critical mistake:

* The **AES encryption key** used to encrypt the cPassword was **hardcoded**.
* Worse yet, they accidentally published this encryption key in official **documentation**.
* Result? Anyone who gets access to the XML file can easily **decrypt the cPassword**.

<figure><img src="/files/15Bncyo9yazI0WSEvl1a" alt=""><figcaption></figcaption></figure>

<https://n1chr0x.medium.com/unwrapping-gpp-exposing-the-cpassword-attack-vector-using-active-htb-machine-4d3b97e0ac43>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ahmed-tarek.gitbook.io/security-notes/notes/active-directory-pentesting/post-compromise-attacks/gpp-cpassword-attacks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
