githubEdit

Kerberoasting

Kerberoasting Overview

  • This attack targets Service Principal Names (SPNs) accounts.

    • Purpose of Service Principal Names (SPN) in Active Directory

      • SPNs are unique identifiers that Kerberos uses to map a service instance to a service account in whose context the service is running

        • Domain accounts are often used to run services to overcome the network authentication limitations of built-in accounts such as NT AUTHORITY\LOCAL SERVICE.

Kerberoasting - Performing the Attack

  • Depending on your position in a network, this attack can be performed in multiple ways:

    • From a non-domain joined Linux host using valid domain user credentials.

    • From a domain-joined Linux host as root after retrieving the keytab file.

    • From a domain-joined Windows host authenticated as a domain user.

    • From a domain-joined Windows host with a shell in the context of a domain account.

    • As SYSTEM on a domain-joined Windows host.

    • From a non-domain joined Windows host using runasarrow-up-right /netonly.

Kerberoasting - from Linux

Kerberoasting with GetUserSPNs.py

Requesting all TGS Tickets

Requesting a Single TGS ticket

Cracking the Ticket Offline with Hashcat

  • password is database!

Testing Authentication against a Domain Controller

Kerberoasting - from Windows

Manual way

Enumerating SPNs with setspn.executes

Targeting a Single User

Retrieving All Tickets Using setspn.exe

Extracting Tickets from Memory with Mimikatz

Automated / Tool Based Route

Using PowerView to Extract TGS Tickets

Using PowerView to Target a Specific User

Exporting All Tickets to a CSV File

Using Rubeus

Using the /tgtdeleg Flag

  • /tgtdeleg flag, the tool requested an RC4 ticket even though the supported encryption types are listed as AES 128/256

Reference

  • https://adsecurity.org/?p=3458

Last updated