NTLM Toolkit
New Technology LAN Manager is a replacement of LAN Manager used to store users password hashes in Windows.
Credentials are stored when a user logs into an account & when a user runs a service. More information below.
Security Account Manager (SAM)
Passwords hashes on Windows are stored in the Security Account Manager (SAM) database file. This is used to authenticate local and remote users.
Local Security Authority Subystem (LSASS).
LSA stands for Local Security Authority and it is a special process which is responsible for authenticating users and verifying Windows logins.
Mimikatz
NOTE: When running Mimikatz it's very important use proper obfuscation techniques since it's heavily signatures. Running it entirely in memory and never saving it on Disk is a good approach.
We can use various commands to extract passwords from the system.
For both the following commands, we must have SeDebugPrivilege access right enabled, which we'll accomplish with privilege::debug.
LSA memory content
sekurlsa**::logonpasswords**
sekurlsa::logonpasswords attempts to extract plaintext passwords and password hashes from all available sources.
lsadump::sam
lsadump::sam extracts NTLM hashes from SAM. NOTE: we must token::elevate to elevate to SYSTEM user privileges. We need local administrator privileges.
Passing NTLM - p_ass-the-hash_ (PtH)
Depending on situation, we may be able to leverage an NTLM hash without cracking it.
Suppose we are trying to access a share on \\192.168.246.212\. We are entering the necessary permissions to access the share.
Like everything else we need local Administrator on the machine to enable code execution.
Obtaining Hashes - Mimikatz
SMBClient - Access Share
Impacket Psexec
We can use Impacket to get a shell. The format is "LMHash:NTHash". We'll give 32 0's for LM.
Impacket Wmiexec
Like psexec we can use wmiexec to obtain a shell.
NOTE: The difference between Psexec & WmiExec is that Psexec works over SMB while WmiExec uses Windows Management Instrumentation.
Last updated