mirror of
https://github.com/gentilkiwi/mimikatz
synced 2024-12-13 17:45:13 +00:00
b4f96ccb6c
[new] RPC support (client & server, multi users) [new] Windows service support [new] token::elevate can run process with impersonate token (when enough privileges and without interactions) [new] process::run [new] standard::hostname
93 lines
9.7 KiB
C
93 lines
9.7 KiB
C
#include "kull_m_rpc_ms-pac.h"
|
|
|
|
#ifdef _M_X64
|
|
#define _ms_pac_MIDL_TYPE_FORMAT_STRING_SIZE 409
|
|
#define _ms_pac_PPAC_CREDENTIAL_DATA_idx 2
|
|
#define _ms_pac_PKERB_VALIDATION_INFO_idx 108
|
|
#elif defined _M_IX86
|
|
#define _ms_pac_MIDL_TYPE_FORMAT_STRING_SIZE 669
|
|
#define _ms_pac_PPAC_CREDENTIAL_DATA_idx 2
|
|
#define _ms_pac_PKERB_VALIDATION_INFO_idx 122
|
|
#endif
|
|
|
|
typedef struct _ms_pac_MIDL_TYPE_FORMAT_STRING {
|
|
SHORT Pad;
|
|
UCHAR Format[_ms_pac_MIDL_TYPE_FORMAT_STRING_SIZE];
|
|
} ms_pac_MIDL_TYPE_FORMAT_STRING;
|
|
|
|
extern const ms_pac_MIDL_TYPE_FORMAT_STRING ms_pac__MIDL_TypeFormatString;
|
|
static const RPC_CLIENT_INTERFACE msKrbPac___RpcClientInterface = {sizeof(RPC_CLIENT_INTERFACE), {{0x00000001, 0x0001, 0x0000, {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71}}, {1, 0}}, {{0x8a885d04, 0x1ceb, 0x11c9, {0x9f, 0xe8, 0x08, 0x00, 0x2b, 0x10, 0x48, 0x60}}, {2, 0}}, 0, 0, 0, 0, 0, 0x00000000};
|
|
static const MIDL_TYPE_PICKLING_INFO __MIDL_TypePicklingInfo = {0x33205054, 0x3, 0, 0, 0,};
|
|
static RPC_BINDING_HANDLE msKrbPac__MIDL_AutoBindHandle;
|
|
static const MIDL_STUB_DESC msKrbPac_StubDesc = {(void *) &msKrbPac___RpcClientInterface, MIDL_user_allocate, MIDL_user_free, &msKrbPac__MIDL_AutoBindHandle, 0, 0, 0, 0, ms_pac__MIDL_TypeFormatString.Format, 1, 0x60000, 0, 0x8000253, 0, 0, 0, 0x1, 0, 0, 0};
|
|
|
|
void PPAC_CREDENTIAL_DATA_Decode(handle_t _MidlEsHandle, PPAC_CREDENTIAL_DATA * _pType)
|
|
{
|
|
NdrMesTypeDecode2(_MidlEsHandle, (PMIDL_TYPE_PICKLING_INFO) &__MIDL_TypePicklingInfo, &msKrbPac_StubDesc, (PFORMAT_STRING) &ms_pac__MIDL_TypeFormatString.Format[_ms_pac_PPAC_CREDENTIAL_DATA_idx], _pType);
|
|
}
|
|
|
|
void PPAC_CREDENTIAL_DATA_Free(handle_t _MidlEsHandle, PPAC_CREDENTIAL_DATA * _pType)
|
|
{
|
|
NdrMesTypeFree2(_MidlEsHandle, (PMIDL_TYPE_PICKLING_INFO) &__MIDL_TypePicklingInfo, &msKrbPac_StubDesc, (PFORMAT_STRING) &ms_pac__MIDL_TypeFormatString.Format[_ms_pac_PPAC_CREDENTIAL_DATA_idx], _pType);
|
|
}
|
|
|
|
size_t PKERB_VALIDATION_INFO_AlignSize(handle_t _MidlEsHandle, PKERB_VALIDATION_INFO * _pType)
|
|
{
|
|
return NdrMesTypeAlignSize2(_MidlEsHandle, (PMIDL_TYPE_PICKLING_INFO) &__MIDL_TypePicklingInfo, &msKrbPac_StubDesc, (PFORMAT_STRING) &ms_pac__MIDL_TypeFormatString.Format[_ms_pac_PKERB_VALIDATION_INFO_idx], _pType);
|
|
}
|
|
|
|
void PKERB_VALIDATION_INFO_Encode(handle_t _MidlEsHandle, PKERB_VALIDATION_INFO * _pType)
|
|
{
|
|
NdrMesTypeEncode2(_MidlEsHandle, (PMIDL_TYPE_PICKLING_INFO) &__MIDL_TypePicklingInfo, &msKrbPac_StubDesc, (PFORMAT_STRING) &ms_pac__MIDL_TypeFormatString.Format[_ms_pac_PKERB_VALIDATION_INFO_idx], _pType);
|
|
}
|
|
|
|
void PKERB_VALIDATION_INFO_Decode(handle_t _MidlEsHandle, PKERB_VALIDATION_INFO * _pType)
|
|
{
|
|
NdrMesTypeDecode2(_MidlEsHandle, (PMIDL_TYPE_PICKLING_INFO) &__MIDL_TypePicklingInfo, &msKrbPac_StubDesc, (PFORMAT_STRING) &ms_pac__MIDL_TypeFormatString.Format[_ms_pac_PKERB_VALIDATION_INFO_idx], _pType);
|
|
}
|
|
|
|
void PKERB_VALIDATION_INFO_Free(handle_t _MidlEsHandle, PKERB_VALIDATION_INFO * _pType)
|
|
{
|
|
NdrMesTypeFree2(_MidlEsHandle, (PMIDL_TYPE_PICKLING_INFO) &__MIDL_TypePicklingInfo, &msKrbPac_StubDesc, (PFORMAT_STRING) &ms_pac__MIDL_TypeFormatString.Format[_ms_pac_PKERB_VALIDATION_INFO_idx], _pType);
|
|
}
|
|
#ifdef _M_X64
|
|
static const ms_pac_MIDL_TYPE_FORMAT_STRING ms_pac__MIDL_TypeFormatString = {0, {
|
|
0x00, 0x00, 0x12, 0x00, 0x5c, 0x00, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x02, 0x00, 0x01, 0x00, 0x17, 0x55, 0x00, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1a, 0x03, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00,
|
|
0x06, 0x06, 0x40, 0x36, 0x5c, 0x5b, 0x12, 0x00, 0xde, 0xff, 0x1b, 0x00, 0x01, 0x00, 0x19, 0x00, 0x10, 0x00, 0x01, 0x00, 0x02, 0x5b, 0x1a, 0x03, 0x20, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x4c, 0x00,
|
|
0xd8, 0xff, 0x08, 0x40, 0x36, 0x5b, 0x12, 0x00, 0xe2, 0xff, 0x21, 0x03, 0x00, 0x00, 0x09, 0x00, 0xf8, 0xff, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x4c, 0x00, 0xda, 0xff, 0x5c, 0x5b,
|
|
0x1a, 0x03, 0x08, 0x00, 0xe6, 0xff, 0x00, 0x00, 0x08, 0x40, 0x5c, 0x5b, 0x12, 0x00, 0xb0, 0x00, 0x15, 0x03, 0x08, 0x00, 0x08, 0x08, 0x5c, 0x5b, 0x1d, 0x00, 0x08, 0x00, 0x02, 0x5b, 0x15, 0x00,
|
|
0x08, 0x00, 0x4c, 0x00, 0xf4, 0xff, 0x5c, 0x5b, 0x1d, 0x00, 0x10, 0x00, 0x4c, 0x00, 0xf0, 0xff, 0x5c, 0x5b, 0x15, 0x00, 0x10, 0x00, 0x4c, 0x00, 0xf0, 0xff, 0x5c, 0x5b, 0x1d, 0x03, 0x08, 0x00,
|
|
0x08, 0x5b, 0x21, 0x03, 0x00, 0x00, 0x19, 0x00, 0x9c, 0x00, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x4c, 0x00, 0xbc, 0xff, 0x5c, 0x5b, 0x1d, 0x00, 0x06, 0x00, 0x01, 0x5b, 0x15, 0x00,
|
|
0x06, 0x00, 0x4c, 0x00, 0xf4, 0xff, 0x5c, 0x5b, 0x1b, 0x03, 0x04, 0x00, 0x04, 0x00, 0xf9, 0xff, 0x01, 0x00, 0x08, 0x5b, 0x17, 0x03, 0x08, 0x00, 0xf0, 0xff, 0x02, 0x02, 0x4c, 0x00, 0xe0, 0xff,
|
|
0x5c, 0x5b, 0x1a, 0x03, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x36, 0x08, 0x40, 0x5b, 0x12, 0x00, 0xe4, 0xff, 0x21, 0x03, 0x00, 0x00, 0x19, 0x00, 0x10, 0x01, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff,
|
|
0x00, 0x00, 0x4c, 0x00, 0xde, 0xff, 0x5c, 0x5b, 0x21, 0x03, 0x00, 0x00, 0x19, 0x00, 0x28, 0x01, 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x4c, 0x00, 0x56, 0xff, 0x5c, 0x5b, 0x1a, 0x03,
|
|
0x38, 0x01, 0x00, 0x00, 0x60, 0x00, 0x4c, 0x00, 0x48, 0xff, 0x4c, 0x00, 0x44, 0xff, 0x4c, 0x00, 0x40, 0xff, 0x4c, 0x00, 0x3c, 0xff, 0x4c, 0x00, 0x38, 0xff, 0x4c, 0x00, 0x34, 0xff, 0x4c, 0x00,
|
|
0xd8, 0xfe, 0x4c, 0x00, 0xd4, 0xfe, 0x4c, 0x00, 0xd0, 0xfe, 0x4c, 0x00, 0xcc, 0xfe, 0x4c, 0x00, 0xc8, 0xfe, 0x4c, 0x00, 0xc4, 0xfe, 0x06, 0x06, 0x08, 0x08, 0x08, 0x36, 0x08, 0x4c, 0x00, 0x33,
|
|
0xff, 0x40, 0x4c, 0x00, 0xb4, 0xfe, 0x4c, 0x00, 0xb0, 0xfe, 0x36, 0x4c, 0x00, 0x2f, 0xff, 0x08, 0x08, 0x4c, 0x00, 0xfd, 0xfe, 0x4c, 0x00, 0xf9, 0xfe, 0x08, 0x08, 0x08, 0x40, 0x36, 0x36, 0x08,
|
|
0x40, 0x36, 0x5c, 0x5b, 0x12, 0x00, 0x1c, 0xff, 0x12, 0x00, 0x4a, 0xff, 0x12, 0x00, 0x64, 0xff, 0x12, 0x00, 0x42, 0xff, 0x12, 0x00, 0x72, 0xff, 0x00,
|
|
}};
|
|
#elif defined _M_IX86
|
|
static const ms_pac_MIDL_TYPE_FORMAT_STRING ms_pac__MIDL_TypeFormatString = {0, {
|
|
0x00, 0x00, 0x12, 0x00, 0x52, 0x00, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x02, 0x00, 0x01, 0x00, 0x17, 0x55, 0x00, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1b, 0x00, 0x01, 0x00, 0x19, 0x00, 0x08, 0x00,
|
|
0x01, 0x00, 0x02, 0x5b, 0x16, 0x03, 0x10, 0x00, 0x4b, 0x5c, 0x46, 0x5c, 0x04, 0x00, 0x04, 0x00, 0x12, 0x00, 0xd4, 0xff, 0x46, 0x5c, 0x0c, 0x00, 0x0c, 0x00, 0x12, 0x00, 0xdc, 0xff, 0x5b, 0x06,
|
|
0x06, 0x08, 0x08, 0x08, 0x5c, 0x5b, 0x1b, 0x03, 0x10, 0x00, 0x09, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x4c, 0x00, 0xd2, 0xff, 0x5c, 0x5b, 0x18, 0x03, 0x04, 0x00, 0xec, 0xff, 0x4b, 0x5c, 0x48, 0x49,
|
|
0x10, 0x00, 0x04, 0x00, 0x02, 0x00, 0x08, 0x00, 0x08, 0x00, 0x12, 0x00, 0x9a, 0xff, 0x10, 0x00, 0x10, 0x00, 0x12, 0x00, 0xa4, 0xff, 0x5b, 0x08, 0x5c, 0x5b, 0x12, 0x00, 0x44, 0x01, 0x15, 0x03,
|
|
0x08, 0x00, 0x08, 0x08, 0x5c, 0x5b, 0x1d, 0x00, 0x08, 0x00, 0x02, 0x5b, 0x15, 0x00, 0x08, 0x00, 0x4c, 0x00, 0xf4, 0xff, 0x5c, 0x5b, 0x1d, 0x00, 0x10, 0x00, 0x4c, 0x00, 0xf0, 0xff, 0x5c, 0x5b,
|
|
0x15, 0x00, 0x10, 0x00, 0x4c, 0x00, 0xf0, 0xff, 0x5c, 0x5b, 0x1d, 0x03, 0x08, 0x00, 0x08, 0x5b, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x32, 0x00, 0x01, 0x00, 0x17, 0x55, 0x30, 0x00, 0x01, 0x00,
|
|
0x05, 0x5b, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x3a, 0x00, 0x01, 0x00, 0x17, 0x55, 0x38, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x42, 0x00, 0x01, 0x00, 0x17, 0x55,
|
|
0x40, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x4a, 0x00, 0x01, 0x00, 0x17, 0x55, 0x48, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x52, 0x00,
|
|
0x01, 0x00, 0x17, 0x55, 0x50, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x5a, 0x00, 0x01, 0x00, 0x17, 0x55, 0x58, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1b, 0x03, 0x08, 0x00,
|
|
0x19, 0x00, 0x6c, 0x00, 0x01, 0x00, 0x4c, 0x00, 0x56, 0xff, 0x5c, 0x5b, 0x1c, 0x01, 0x02, 0x00, 0x17, 0x55, 0x8a, 0x00, 0x01, 0x00, 0x17, 0x55, 0x88, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1c, 0x01,
|
|
0x02, 0x00, 0x17, 0x55, 0x92, 0x00, 0x01, 0x00, 0x17, 0x55, 0x90, 0x00, 0x01, 0x00, 0x05, 0x5b, 0x1d, 0x00, 0x06, 0x00, 0x01, 0x5b, 0x15, 0x00, 0x06, 0x00, 0x4c, 0x00, 0xf4, 0xff, 0x5c, 0x5b,
|
|
0x1b, 0x03, 0x04, 0x00, 0x04, 0x00, 0xf9, 0xff, 0x01, 0x00, 0x08, 0x5b, 0x17, 0x03, 0x08, 0x00, 0xf0, 0xff, 0x02, 0x02, 0x4c, 0x00, 0xe0, 0xff, 0x5c, 0x5b, 0x16, 0x03, 0x08, 0x00, 0x4b, 0x5c,
|
|
0x46, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xe4, 0xff, 0x5b, 0x08, 0x08, 0x5b, 0x1b, 0x03, 0x08, 0x00, 0x19, 0x00, 0xc4, 0x00, 0x01, 0x00, 0x4b, 0x5c, 0x48, 0x49, 0x08, 0x00, 0x00, 0x00,
|
|
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xc4, 0xff, 0x5b, 0x4c, 0x00, 0xcd, 0xff, 0x5b, 0x1b, 0x03, 0x08, 0x00, 0x19, 0x00, 0xd0, 0x00, 0x01, 0x00, 0x4c, 0x00, 0xc2, 0xfe, 0x5c, 0x5b,
|
|
0x16, 0x03, 0xd8, 0x00, 0x4b, 0x5c, 0x46, 0x5c, 0x34, 0x00, 0x34, 0x00, 0x12, 0x00, 0xe2, 0xfe, 0x46, 0x5c, 0x3c, 0x00, 0x3c, 0x00, 0x12, 0x00, 0xea, 0xfe, 0x46, 0x5c, 0x44, 0x00, 0x44, 0x00,
|
|
0x12, 0x00, 0xf2, 0xfe, 0x46, 0x5c, 0x4c, 0x00, 0x4c, 0x00, 0x12, 0x00, 0xfa, 0xfe, 0x46, 0x5c, 0x54, 0x00, 0x54, 0x00, 0x12, 0x00, 0x02, 0xff, 0x46, 0x5c, 0x5c, 0x00, 0x5c, 0x00, 0x12, 0x00,
|
|
0x0a, 0xff, 0x46, 0x5c, 0x70, 0x00, 0x70, 0x00, 0x12, 0x00, 0x12, 0xff, 0x46, 0x5c, 0x8c, 0x00, 0x8c, 0x00, 0x12, 0x00, 0x18, 0xff, 0x46, 0x5c, 0x94, 0x00, 0x94, 0x00, 0x12, 0x00, 0x20, 0xff,
|
|
0x46, 0x5c, 0x98, 0x00, 0x98, 0x00, 0x12, 0x00, 0x44, 0xff, 0x46, 0x5c, 0xc8, 0x00, 0xc8, 0x00, 0x12, 0x00, 0x5c, 0xff, 0x46, 0x5c, 0xcc, 0x00, 0xcc, 0x00, 0x12, 0x00, 0x30, 0xff, 0x46, 0x5c,
|
|
0xd4, 0x00, 0xd4, 0x00, 0x12, 0x00, 0x6a, 0xff, 0x5b, 0x4c, 0x00, 0x33, 0xfe, 0x4c, 0x00, 0x2f, 0xfe, 0x4c, 0x00, 0x2b, 0xfe, 0x4c, 0x00, 0x27, 0xfe, 0x4c, 0x00, 0x23, 0xfe, 0x4c, 0x00, 0x1f,
|
|
0xfe, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x4c, 0x00, 0x24, 0xfe, 0x06, 0x06,
|
|
0x08, 0x06, 0x06, 0x08, 0x08, 0x4c, 0x00, 0x23, 0xfe, 0x08, 0x08, 0x4c, 0x00, 0xf1, 0xfd, 0x4c, 0x00, 0xed, 0xfd, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x5c, 0x5b, 0x00,
|
|
}};
|
|
#endif |