dpapi.py Add RPC masterkey decryption - #739
Conversation
Added feature to decrypt a user's masterkey using the MS-BKRP (BackupKey Remote Protocol). This is already implemented in mimikatz to decrypt masterkeys using the /rpc flag (https://github.com/gentilkiwi/mimikatz/blob/172200295688ccbb76c44c6db0b3b47d39dd0d4d/modules/rpc/kull_m_rpc_bkrp.c#L51-L54) This makes an RPC call with the user's identity to the function BackuprKey on the DC. The GUID of this operation is BACKUPKEY_RESTORE_GUID and the details can be found on microsoft documentation here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-bkrp/7accb903-3863-4385-9c99-11af8c18d656
|
Thanks for the addition @imaibou!, merging. |
|
any examples using Kerberos? so far only gotten it to work using in -t domain/user:password@dc-ip |
|
Hey @darkoperator Try: |
|
that would be for a backup key, looking at decrypting the key against the domain using masterkeys, but learned a new way to pull backup keys that is not NTLM with -k :) when using a TGT I noticed I had to hit enter in backupkeys to get it to use the TGT specified in the environment variable since -no-pass is not used for the backup key but saw there is an open ticket for that. Still a useful reply |
|
The cases where it is failing for me is when I try to use a ticket and when I try to use aesKey, on the key I see it auth correctly in Wireshark, it reports failure on RPC Any insight on what I could be doing wrong is greatly appreciated |
|
Please run it with |
|
|
@darkoperator, please |
|
worked beutifully! thanks |
Added feature to decrypt a user's masterkey using the MS-BKRP (BackupKey Remote Protocol). This is already implemented in mimikatz to decrypt masterkeys using the /rpc flag (https://github.com/gentilkiwi/mimikatz/blob/172200295688ccbb76c44c6db0b3b47d39dd0d4d/modules/rpc/kull_m_rpc_bkrp.c#L51-L54)
This makes an RPC call with the user's identity to the function BackuprKey on the DC. The GUID of this operation is BACKUPKEY_RESTORE_GUID and the details can be found on microsoft documentation here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-bkrp/7accb903-3863-4385-9c99-11af8c18d656