githubEdit

Kerberos

Info

How it works

Step 1

Step 2

Step 3

Step 4

Step 5

Bruteforcing

Requirements: connection with DC/KDC.

Linux (external)

With kerbrute.pyarrow-up-right:

Windows (internal)

With Rubeusarrow-up-right version with brute module:

ASREPRoast

Cracking users password, with KRB_AS_REQ when user has DONT_REQ_PREAUTH attribute, KDC respond with KRB_AS_REP user hash and then go for cracking.

Linux (external)

With Impacketarrow-up-right example GetNPUsers.py:

Windows (internal)

With Rubeusarrow-up-right:

Cracking with dictionary of passwords:

Kerberoasting

Cracking users password from TGS, because TGS requires Service key which is derived from NTLM hash

Linux (external)

With Impacketarrow-up-right example GetUserSPNs.py:

Windows (internal)

With Rubeusarrow-up-right:

With Powershell:

Cracking with dictionary of passwords:

Overpass The Hash/Pass The Key (PTK)

NTDS.DIT, SAM files or lsass with mimi

Linux (external)

By using Impacketarrow-up-right examples:

Windows (internal)

With Rubeusarrow-up-right and PsExecarrow-up-right:

Pass The Ticket (PTT)

MiTM, lsass with mimi

Linux (external)

Check type and location of tickets:

If none return, default is FILE:/tmp/krb5cc_%{uid}.

In case of file tickets, you can copy-paste (if you have permissions) for use them.

In case of being KEYRING tickets, you can use tickeyarrow-up-right to get them:

Windows (internal)

With Mimikatzarrow-up-right:

With Rubeusarrow-up-right in Powershell:

To convert tickets between Linux/Windows format with ticket_converter.pyarrow-up-right:

Using ticket in Linux

With Impacketarrow-up-right examples:

Using ticket in Windows

Inject ticket with Mimikatzarrow-up-right:

Inject ticket with Rubeusarrow-up-right:

Execute a cmd in the remote machine with PsExecarrow-up-right:

Silver ticket

Build a TGS with Service key

Linux (external)

With Impacketarrow-up-right examples:

Windows (internal)

With Mimikatzarrow-up-right:

Inject ticket with Rubeusarrow-up-right:

Execute a cmd in the remote machine with PsExecarrow-up-right:

Golden ticket

Build a TGT with NTLM hash and krbtgt key, valid until krbtgt password is changed or TGT expires

Tickets must be used right after created

Linux (external)

With Impacketarrow-up-right examples:

Windows (internal)

With Mimikatzarrow-up-right:

Inject ticket with Rubeusarrow-up-right:

Execute a cmd in the remote machine with PsExecarrow-up-right:

Misc

To get NTLM from password:

Delegation

Allows a service impersonate the user to interact with a second service, with the privileges and permissions of the user

  • If a user has delegation capabilities, all its services (and processes) have delegation capabilities.

  • KDC only worries about the user who is talking to, not the process.

  • Any process belonging to the same user can perform the same actions in Kerberos, regardless of whether it is a service or not.

  • Unable to delegate if NotDelegated (or ADS_UF_NOT_DELEGATED) flag is set in the User-Account-Control attribute of the user account or user in Protected Users group.

Unconstrained delegation

  1. User1 requests a TGS for ServiceZ, of UserZ.

  2. The KDC checks if UserZ has the TrustedForDelegation flag set (Yes).

  3. The KDC includes a TGT of User1 inside the TGS for ServiceZ.

  4. ServiceZ receives the TGS with the TGT of User1 included and stores it for later use.

Contrained delegation and RBCD (Resource Based Constrained Delegation)

Delegation is constrained to only some whitelisted third-party services.

  • S4U2Proxy Contrained

  • S4U2Proxy RBCD

  • S4U2Proxy Service Name Change

  • S4U2Self

  • S4U2Self & S4U2Proxy combined Contrained

  • S4U2Self & S4U2Proxy combined RBCD

  • RBCD attack

Last updated

Was this helpful?