Pass the Hash (PtH) Attack
Performing Pass the Hash Attacks
1. Mimikatz (Windows)
Mimikatz Pass the Hash Command:
Launches
cmd.exe
asjulio
.Commands executed in Julio’s context.
Mimikatz Extract Hashes Command
dumps the hashes from memory
elevates your token, and dumps the SAM hashes
2. Invoke-TheHash (Windows)
https://github.com/Kevin-Robertson/Invoke-TheHash
Using SMB Execution:
Reverse Shell via WMI:
Start a listener:
Generate reverse shell payload from Reverse Shell Generator.
Execute using: Invoke-TheHash with WMI
3. Impacket-psexec (Linux)
PsExec Example:
Other useful tools:
impacket-wmiexec
impacket-atexec
impacket-smbexec
4. CrackMapExec (Linux)
Authentication and Command Execution:
💬 Pwn3d! means administrative access was successfully obtained.
🔗 NetExec Wiki (formerly CrackMapExec)
5. evil-winrm (Linux)
Establish PowerShell Remoting Session:
6. Pass the Hash via RDP (Linux)
Requirements:
Restricted Admin Mode must be enabled.
Enable Restricted Admin Mode:
This can be enabled by adding a new registry key DisableRestrictedAdmin (REG_DWORD) under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa with the value of 0. It can be done using the following command:
Pass the Hash Using RDP
⚠️ UAC Limitations for Local Accounts
UAC (User Account Control) limits local users' ability to perform remote administration operations. When the registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy is set to 0, it means that the built-in local admin account (RID-500, "Administrator") is the only local account allowed to perform remote administration tasks. Setting it to 1 allows the other local admins as well.
LocalAccountTokenFilterPolicy determines if local users (besides built-in admin) can perform remote administration.
FilterAdministratorToken can UAC-protect even the built-in administrator account.
🔗 Pass-the-Hash is Dead: LocalAccountTokenFilterPolicy
Last updated