Added patches to mark LDR data as initialized.

This commit is contained in:
Sebastian Lackner
2017-03-19 17:52:25 +01:00
parent 76b749edc9
commit 444ec16851
3 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
From f30fb4fe4ef931b592f1a7edcc3609b9819158ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 7 Mar 2017 04:59:41 +0100
Subject: ntdll: Mark LDR data as initialized.
---
dlls/ntdll/thread.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index c9a5da6226..0506f6bc10 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -259,6 +259,7 @@ HANDLE thread_init(void)
params.CurrentDirectory.DosPath.MaximumLength = sizeof(current_dir);
params.wShowWindow = 1; /* SW_SHOWNORMAL */
ldr.Length = sizeof(ldr);
+ ldr.Initialized = TRUE;
RtlInitializeBitMap( &tls_bitmap, peb->TlsBitmapBits, sizeof(peb->TlsBitmapBits) * 8 );
RtlInitializeBitMap( &tls_expansion_bitmap, peb->TlsExpansionBitmapBits,
sizeof(peb->TlsExpansionBitmapBits) * 8 );
--
2.11.0

View File

@@ -0,0 +1,30 @@
From 4b74342ce0dd261a93f5a2d30140078696b5a46d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 7 Mar 2017 15:26:50 +0100
Subject: include: Update LDR_MODULE to more recent windows versions.
---
include/winternl.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/winternl.h b/include/winternl.h
index 5cd1664f1f..ef9a5bad1c 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2103,6 +2103,13 @@ typedef struct _LDR_MODULE
ULONG CheckSum;
ULONG TimeDateStamp;
HANDLE ActivationContext;
+ PVOID PatchInformation;
+ LIST_ENTRY ForwarderLinks;
+ LIST_ENTRY ServiceTagLinks;
+ LIST_ENTRY StaticLinks;
+ PVOID ContextInformation;
+ ULONG_PTR OriginalBase;
+ LARGE_INTEGER LoadTime;
} LDR_MODULE, *PLDR_MODULE;
/* those defines are (some of the) regular LDR_MODULE.Flags values */
--
2.11.0