repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
ad-roasting-asrep.mdMarkdown144 lines6.2 KiBsource raw download

title: "Roasting - ASREP Roasting" section: "Active Directory" sectionSlug: "active-directory" sourcePath: "docs/active-directory/ad-roasting-asrep.md" sourceUrl: "https://github.com/swisskyrepo/InternalAllTheThings/blob/203bb0c0b290/docs/active-directory/ad-roasting-asrep.md" sha: "203bb0c0b290" isIndex: false#

Roasting - ASREP Roasting#

If a domain user does not have Kerberos preauthentication enabled, an AS-REP can be successfully requested for the user, and a component of the structure can be cracked offline a la kerberoasting

Requirements:

Using hashcat or john to crack the ticket.

# crack AS_REP messages with hashcat
root@kali:impacket-examples$ hashcat -m 18200 --force -a 0 hashes.asreproast passwords_kerb.txt 
root@windows:hashcat$ hashcat64.exe -m 18200 '<AS_REP-hash>' -a 0 c:\wordlists\rockyou.txt

# crack AS_REP messages with john
C:\Rubeus> john --format=krb5asrep --wordlist=passwords_kerb.txt hashes.asreproast

Mitigations:

Kerberoasting w/o domain account#

In September 2022 a vulnerability was discovered by Charlie Clark, ST (Service Tickets) can be obtained through KRB_AS_REQ request without having to control any Active Directory account. If a principal can authenticate without pre-authentication (like AS-REP Roasting attack), it is possible to use it to launch an KRB_AS_REQ request and trick the request to ask for a ST instead of a encrypted TGT, by modifying the sname attribute in the req-body part of the request.

The technique is fully explained in this article: Semperis blog post.

:warning: You must provide a list of users because we don't have a valid account to query the LDAP using this technique.

CVE-2022-33679#

CVE-2022-33679 performs an encryption downgrade attack by forcing the KDC to use the RC4-MD4 algorithm and then brute forcing the session key from the AS-REP using a known plaintext attack, Similar to AS-REP Roasting, it works against accounts that have pre-authentication disabled and the attack is unauthenticated meaning we don’t need a client’s password..

Research from Project Zero : RC4 Is Still Considered Harmful - James Forshaw

Requirements:

Accounts with the attribute DONT_REQ_PREAUTH

Exploitation:

Mitigations:

References#