Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/taviso/loadlibrary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--peloader/winapi/Crypt.c44
-rw-r--r--peloader/winapi/Threads.c22
-rw-r--r--peloader/winapi/rootcert.h130
-rw-r--r--peloader/winstrings.h1
4 files changed, 192 insertions, 5 deletions
diff --git a/peloader/winapi/Crypt.c b/peloader/winapi/Crypt.c
index 27eec18..7ed60ef 100644
--- a/peloader/winapi/Crypt.c
+++ b/peloader/winapi/Crypt.c
@@ -113,12 +113,25 @@ static NTSTATUS WINAPI BCryptGenRandom(PVOID phAlgorithm, PUCHAR pbBuffer, ULONG
return STATUS_SUCCESS;
}
-static BOOL WINAPI CertStrToNameW(DWORD dwCertEncodingType, PVOID pszX500, DWORD dwStrType, void *pvReserved, BYTE *pbEncoded, DWORD *pcbEncoded, PVOID ppszError)
+static BOOL WINAPI CertStrToNameW(DWORD dwCertEncodingType,
+ PVOID pszX500,
+ DWORD dwStrType,
+ void *pvReserved,
+ BYTE *pbEncoded,
+ DWORD *pcbEncoded,
+ PVOID ppszError)
{
uint16_t CertName[] = L"Totally Legitimate Certificate Name";
char *name = CreateAnsiFromWide(pszX500);
- DebugLog("%u, %p [%s], %u, %p, %p, %p, %p", dwCertEncodingType, pszX500, name, dwStrType, pvReserved, pbEncoded, pcbEncoded, ppszError);
+ DebugLog("%u, %p [%s], %u, %p, %p, %p, %p", dwCertEncodingType,
+ pszX500,
+ name,
+ dwStrType,
+ pvReserved,
+ pbEncoded,
+ pcbEncoded,
+ ppszError);
free(name);
*pcbEncoded = sizeof(CertName);
@@ -130,7 +143,11 @@ static BOOL WINAPI CertStrToNameW(DWORD dwCertEncodingType, PVOID pszX500, DWORD
return TRUE;
}
-static HANDLE WINAPI CertOpenStore(PCHAR lpszStoreProvider, DWORD dwMsgAndCertEncodingType, PVOID hCryptProv, DWORD dwFlags, PVOID pvPara)
+static HANDLE WINAPI CertOpenStore(PCHAR lpszStoreProvider,
+ DWORD dwMsgAndCertEncodingType,
+ PVOID hCryptProv,
+ DWORD dwFlags,
+ PVOID pvPara)
{
return (HANDLE) 'STOR';
}
@@ -139,12 +156,26 @@ enum {
CERT_FIND_SUBJECT_NAME = 131079,
};
-static PVOID WINAPI CertFindCertificateInStore(HANDLE hCertStore, DWORD dwCertEncodingType, DWORD dwFindFlags, DWORD dwFindType, PVOID pvFindPara, PVOID pPrevCertContext)
+
+
+#include "rootcert.h"
+
+static PVOID WINAPI CertFindCertificateInStore(HANDLE hCertStore,
+ DWORD dwCertEncodingType,
+ DWORD dwFindFlags,
+ DWORD dwFindType,
+ PVOID pvFindPara,
+ PVOID pPrevCertContext)
{
static CERT_INFO FakeInfo = {0};
static CERT_CONTEXT FakeCert = {0};
- DebugLog("%p, %u, %#x, %#x, %p, %p", hCertStore, dwCertEncodingType, dwFindFlags, dwFindType, pvFindPara, pPrevCertContext);
+ DebugLog("%p, %u, %#x, %#x, %p, %p", hCertStore,
+ dwCertEncodingType,
+ dwFindFlags,
+ dwFindType,
+ pvFindPara,
+ pPrevCertContext);
switch (dwFindType) {
case CERT_FIND_SUBJECT_NAME: {
@@ -155,6 +186,9 @@ static PVOID WINAPI CertFindCertificateInStore(HANDLE hCertStore, DWORD dwCertEn
DebugLog("FakeCert: %p", &FakeCert);
+ FakeCert.dwCertEncodingType = 1;
+ FakeCert.pbCertEncoded = RootCertificate;
+ FakeCert.cbCertEncoded = sizeof(RootCertificate);
FakeCert.pCertInfo = &FakeInfo;
FakeCert.pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId = "1.2.840.113549.1.1.1";
diff --git a/peloader/winapi/Threads.c b/peloader/winapi/Threads.c
index bfd5a4d..ad2f512 100644
--- a/peloader/winapi/Threads.c
+++ b/peloader/winapi/Threads.c
@@ -44,6 +44,25 @@ static __stdcall void CloseThreadpoolTimer(PVOID pti)
DebugLog("%p", pti);
}
+static __stdcall void InitializeConditionVariable(PVOID ConditionVariable)
+{
+ DebugLog("%p", ConditionVariable);
+}
+
+static __stdcall BOOL SleepConditionVariableCS(PVOID ConditionVariable,
+ PVOID CriticalSection,
+ DWORD dwMilliseconds)
+{
+ DebugLog("%p %p %u", ConditionVariable, CriticalSection, dwMilliseconds);
+ return TRUE;
+}
+
+static __stdcall void WakeAllConditionVariable(PVOID ConditionVariable)
+{
+ DebugLog("%p", ConditionVariable);
+}
+
+
static __stdcall PVOID CreateThreadpoolWait() { DebugLog(""); return NULL; }
static __stdcall PVOID SetThreadpoolWait() { DebugLog(""); return NULL; }
static __stdcall PVOID SubmitThreadpoolWork() { DebugLog(""); return NULL; }
@@ -71,6 +90,9 @@ static __stdcall void WaitForThreadpoolWorkCallbacks(PVOID pwk, BOOL fCancelPend
DECLARE_CRT_EXPORT("CreateThreadPoolWait", CreateThreadPoolWait);
DECLARE_CRT_EXPORT("CreateThreadPool", CreateThreadPool);
+DECLARE_CRT_EXPORT("InitializeConditionVariable", InitializeConditionVariable);
+DECLARE_CRT_EXPORT("SleepConditionVariableCS", SleepConditionVariableCS);
+DECLARE_CRT_EXPORT("WakeAllConditionVariable", WakeAllConditionVariable);
DECLARE_CRT_EXPORT("CreateThreadpoolTimer", CreateThreadpoolTimer);
DECLARE_CRT_EXPORT("CloseThreadpoolTimer", CloseThreadpoolTimer);
diff --git a/peloader/winapi/rootcert.h b/peloader/winapi/rootcert.h
new file mode 100644
index 0000000..5988e5f
--- /dev/null
+++ b/peloader/winapi/rootcert.h
@@ -0,0 +1,130 @@
+// Microsoft Root Certificate Authority 2010
+static uint8_t RootCertificate[] = {
+ 0x30, 0x82, 0x05, 0xed, 0x30, 0x82, 0x03, 0xd5, 0xa0, 0x03, 0x02, 0x01,
+ 0x02, 0x02, 0x10, 0x28, 0xcc, 0x3a, 0x25, 0xbf, 0xba, 0x44, 0xac, 0x44,
+ 0x9a, 0x9b, 0x58, 0x6b, 0x43, 0x39, 0xaa, 0x30, 0x0d, 0x06, 0x09, 0x2a,
+ 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x81,
+ 0x88, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
+ 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13,
+ 0x0a, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x31,
+ 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65,
+ 0x64, 0x6d, 0x6f, 0x6e, 0x64, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55,
+ 0x04, 0x0a, 0x13, 0x15, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66,
+ 0x74, 0x20, 0x43, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x31, 0x32, 0x30, 0x30, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x29,
+ 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x52, 0x6f,
+ 0x6f, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
+ 0x20, 0x32, 0x30, 0x31, 0x30, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x30, 0x30,
+ 0x36, 0x32, 0x33, 0x32, 0x31, 0x35, 0x37, 0x32, 0x34, 0x5a, 0x17, 0x0d,
+ 0x33, 0x35, 0x30, 0x36, 0x32, 0x33, 0x32, 0x32, 0x30, 0x34, 0x30, 0x31,
+ 0x5a, 0x30, 0x81, 0x88, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
+ 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55,
+ 0x04, 0x08, 0x13, 0x0a, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74,
+ 0x6f, 0x6e, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
+ 0x07, 0x52, 0x65, 0x64, 0x6d, 0x6f, 0x6e, 0x64, 0x31, 0x1e, 0x30, 0x1c,
+ 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x15, 0x4d, 0x69, 0x63, 0x72, 0x6f,
+ 0x73, 0x6f, 0x66, 0x74, 0x20, 0x43, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x31, 0x32, 0x30, 0x30, 0x06, 0x03, 0x55, 0x04,
+ 0x03, 0x13, 0x29, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74,
+ 0x20, 0x52, 0x6f, 0x6f, 0x74, 0x20, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
+ 0x69, 0x74, 0x79, 0x20, 0x32, 0x30, 0x31, 0x30, 0x30, 0x82, 0x02, 0x22,
+ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
+ 0x01, 0x05, 0x00, 0x03, 0x82, 0x02, 0x0f, 0x00, 0x30, 0x82, 0x02, 0x0a,
+ 0x02, 0x82, 0x02, 0x01, 0x00, 0xb9, 0x08, 0x9e, 0x28, 0xe4, 0xe4, 0xec,
+ 0x06, 0x4e, 0x50, 0x68, 0xb3, 0x41, 0xc5, 0x7b, 0xeb, 0xae, 0xb6, 0x8e,
+ 0xaf, 0x81, 0xba, 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x12, 0x23, 0x22, 0x17, 0xa3, 0x36,
+ 0x64, 0x82, 0x91, 0x04, 0x12, 0xe0, 0xab, 0x6f, 0x1e, 0xcb, 0x50, 0x05,
+ 0x61, 0xb4, 0x40, 0xff, 0x59, 0x86, 0x71, 0xd1, 0xd5, 0x33, 0x69, 0x7c,
+ 0xa9, 0x73, 0x8a, 0x38, 0xd7, 0x64, 0x0c, 0xf1, 0x69
+};
diff --git a/peloader/winstrings.h b/peloader/winstrings.h
index 6f2b9f7..bf3f19b 100644
--- a/peloader/winstrings.h
+++ b/peloader/winstrings.h
@@ -3,5 +3,6 @@
size_t CountWideChars(void *wcharbuf);
char * CreateAnsiFromWide(void *wcharbuf);
+char *string_from_wchar(void *wcharbuf, size_t len);
#endif