Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for out of order encrypted_key in local state #435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mimikatz/modules/dpapi/packages/kuhl_m_dpapi_chrome.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ BOOL kuhl_m_dpapi_chrome_alg_key_from_file(LPCWSTR szState, BOOL forced, int arg
{
if(uData = kull_m_string_qad_ansi_c_to_unicode((const char *) data, dwData))
{
if(begin = wcsstr(uData, L"\"os_crypt\":{\"encrypted_key\":\""))
if(begin = wcsstr(uData, L"\"encrypted_key\":\""))
{
begin += 29;
begin += 17;
if(end = wcsstr(begin, L"\"}"))
{
end = L'\0';
Expand All @@ -263,7 +263,7 @@ BOOL kuhl_m_dpapi_chrome_alg_key_from_file(LPCWSTR szState, BOOL forced, int arg
}
else PRINT_ERROR(L"Unable to find the end of the encrypted_key\n");
}
else if(forced) PRINT_ERROR(L"encrypted_key not fond in state file.\n");
else if(forced) PRINT_ERROR(L"encrypted_key not found in state file.\n");
LocalFree(uData);
}
LocalFree(data);
Expand Down Expand Up @@ -294,4 +294,4 @@ BOOL kuhl_m_dpapi_chrome_alg_key_from_auto(LPCWSTR szFile, int argc, wchar_t * a
free(duplicate);
}
return status;
}
}