# GPP / cPassword Attacks

## Overview

**Group policy preferences (GPP)** allowed Administrators to create policies using embedded credentials. These credentials were encrypted and placed in a "cPassword". The encryption key was released by accident so the all the passwords are decryptable.

<figure><img src="/files/WQnVEUWiEBXBVZxLFbNK" alt=""><figcaption><p>Hack the Box machine <em>Querier</em></p></figcaption></figure>

<figure><img src="/files/LhZOzoOlcq0lj8SpIsDQ" alt=""><figcaption><p>Hack the Box machine <em>Querier</em></p></figcaption></figure>

## Check with PowerUp.ps1

```powerquery
. .\PowerUp.ps1
Invoke-AllCheck
```

<figure><img src="/files/Jz7MCoxOKfdJGJM4pEYL" alt=""><figcaption><p>Hack the Box machine <em>Querier</em></p></figcaption></figure>

## GPP Attack via Metasploit

```bash
use auxiliary/scanner/smb/smb_enum_gpp 
```

## Mitigation

* Be up to date on patching
* Delete old GPP xml files inside the SYSVOL


---

# Agent Instructions: 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:

```
GET https://pnpt.adot8.com/active-directory/post-compromise-attacks/gpp-cpassword-attacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
