-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
as part of the execution of dpapi::chrome I got the following error
mimikatz # dpapi::chrome /in:"%localappdata%\Google\Chrome\User Data\Default\Login Data" /unprotect
URL : https://one.co.il/ ( https://one.com/ )
Username: johnny1
ERROR kuhl_m_dpapi_chrome_decrypt ; No Alg and/or Key handle despite AES encryption
Looking at mimikatz's code I understand that if no further arguments are provided, mimikatz tries to parse the "Local State" file using kuhl_m_dpapi_chrome_alg_key_from_auto
. The function later on calls kuhl_m_dpapi_chrome_alg_key_from_file
which attempts to get the encrypted key by parsing Local State
:
if(begin = wcsstr(uData, L"\"os_crypt\":{\"encrypted_key\":\""))
The function assumes that encrypted_key
will be the first key under os_crypt
. This assumption got broken in recent chrome versions (mine is 131). In recent chrome versions there are several other keys before encrypted_key
.
The solution will be to properly parse the json, or perform wcsstr(uData, L"\"encrypted_key\":\""))
.
In my own environment, if I manually fixed Local State
then dpapi::chrome
worked like a charm.