Skip to content

Commit 6f86fcb

Browse files
1.8.4.2 fixes 21390
1 parent 1173d02 commit 6f86fcb

6 files changed

Lines changed: 13 additions & 10 deletions

File tree

Installer.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@echo off
12
rem ====================================================
23
rem TimeDefuser Service Installer Script
34
rem

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Getting over it will weaponize this already versatile patch, so disabling PatchG
5353
> [!IMPORTANT]
5454
> Windows 10 builds are also subject to flight signing, which are code signatures that gets invalid after expiration date, thus preventing system from booting or to be used properly.
5555
> Getting over this requires additional work (resigning all binaries and disabling integrity checks, or patching bootloader & ci.dll) which is not covered by this project.
56-
- Works on pre-RTM, post-RTM ("insider") builds are untested but they likely are same as pre-RTM unless KASLR is enabled, which is not supported by this driver.
56+
- Tested on pre-RTM Windows 10 and early Windows 11 insider builds (i.e. 21390). Builds with security features enabled such as KASLR are not tested.
5757

5858
# Usage
5959
Since TimeDefuser 1.8.3, INF file is deprecated and the driver is instead installed as a service with `sc.exe`. A script for installing named `Installer.bat` will be bundled with subsequent releases.
@@ -102,10 +102,11 @@ These screenshots are all taken by me.
102102
![Windows 7973 x64-2025-05-04-16-08-40](https://github.com/user-attachments/assets/f3d3a116-5b67-4b8f-bd4c-d907485a435b)
103103
![Windows 8331 x64-2026-01-18-22-58-14](https://github.com/user-attachments/assets/7d746160-5626-4af5-916f-f57215eeccc0)
104104
![Windows 10072 x64-2025-11-10-12-53-19](https://github.com/user-attachments/assets/02bb0087-762a-4a2b-98c9-16b3bf850a0d)
105+
<img width="1027" height="768" alt="Windows 21390-2026-06-06-19-18-48" src="https://github.com/user-attachments/assets/55181240-6974-4fdd-9d9b-ae2fd004c11b" />
105106
![Windows 2526-2025-05-08-17-39-56](https://github.com/user-attachments/assets/24e4f5c9-5cdc-4eae-b91f-dc13bb93a22c)
106107

107108
# Thanks to
108-
- **Microsoft** for Windows, Windbg and all else.
109+
- **Microsoft** for Windows, WinDbg and all else.
109110
- **archive.org and BetaArchive** for preserving beta builds and debug symbols.
110111
- **Dimitrios Vlachos** for showing interest while I was developing this.
111112
- **All the precious testers** that opened up issues.

TimeDefuser-Research.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ This research is also bundled with a practical Proof-of-Concept (PoC) implementa
9696
## 7. Threat Model and Abuse Potential
9797
While this research focuses on expiration enforcement mechanisms, the techniques described are broadly applicable to kernel patching and runtime modification of enforcement logic.
9898
In a threat context, these routines can be modified to do any arbitrary and potentially malicious activities with a frequency of once per hour.
99+
99100
## 8. Responsible Use and Ethical Considerations
100101
This research is conducted and presented for educational, defensive, and academic purposes. The techniques described are intended to improve understanding of kernel enforcement mechanisms,
101102
tamper resistance, and system integrity, and to contribute to the broader field of operating system security research.

src/Driver.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ NTSTATUS DriverEntry(PDRIVER_OBEJCT DriverObject, PUNICODE_STRING RegistryPath)
5353
HANDLE hKey = OpenRegistryKey(RegistryPath);
5454
//HANDLE hKey = 0;
5555
unsigned int KernelSize2 = 0; // Var used in loops as a max value
56-
PAGESections ps[5] = { 0 }; // PE sections that name starts with "PAGE"
56+
PAGESections ps[6] = { 0 }; // PE sections that name starts with "PAGE"
5757
unsigned char* PotentialTimestamp = NULL;// Potential address of ExNtExpirationDate/a
5858
BOOLEAN Legacy = FALSE;
5959
int verMajor = 0;
@@ -224,7 +224,7 @@ NTSTATUS DriverEntry(PDRIVER_OBEJCT DriverObject, PUNICODE_STRING RegistryPath)
224224
switch (occurance) {
225225
case 0:
226226
TDPrint("[X] TimeDefuser: can't find ExpNtExpirationDate!\n");
227-
goto patchFail;
227+
//goto patchFail;
228228
break;
229229
case 1:
230230
TDPrint("[+] TimeDefuser: ExpNtExpirationDate address is 0x%p (first occurrance)\n", pExpNtExpirationDate);
@@ -239,13 +239,13 @@ NTSTATUS DriverEntry(PDRIVER_OBEJCT DriverObject, PUNICODE_STRING RegistryPath)
239239
// Due to it's variable being, we will search the PAGE section and next three sections.
240240

241241
for (size_t i = 0; i < 768; i++) {
242-
if (KernelBase[i] == sectNamePAGELK) { // Check if we found the PAGELK\0\0 section name.
242+
if (KernelBase[i] == sectNamePAGE) { // Check if we found the PAGELK\0\0 section name.
243243
int* temp = (int*)&KernelBase[i + 1];
244244
ps[0].size = temp[0]; // Get the section size
245245
ps[0].RVA = temp[1]; // and RVA
246-
TDPrint("[+] TimeDefuser: PAGELK Section found at 0x%p with size %d\n", (unsigned char*)KernelBase + temp[1], temp[0]);
246+
TDPrint("[+] TimeDefuser: PAGE Section found at 0x%p with size %d\n", (unsigned char*)KernelBase + temp[1], temp[0]);
247247
// Get the RVA and size of next three sections.
248-
for (char j = 1; j < 5; j++) {
248+
for (char j = 1; j < 6; j++) {
249249
temp += 10;
250250
ps[j].size = temp[0]; // Get the section size
251251
ps[j].RVA = temp[1]; // and RVA
@@ -255,7 +255,7 @@ NTSTATUS DriverEntry(PDRIVER_OBEJCT DriverObject, PUNICODE_STRING RegistryPath)
255255
}
256256

257257
if (!ps[0].size) {
258-
TDPrint("[X] TimeDefuser: PAGELK Section not found!\n");
258+
TDPrint("[X] TimeDefuser: PAGE Section not found!\n");
259259
goto patchFail;
260260
}
261261

src/TimeDefuser.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "tdwdm/wdm.h"
55

66
/// Definitions
7-
#define td_version "1.8.4.1"
7+
#define td_version "1.8.4.2"
88

99
#define SystemModuleInformation 11
1010
#define PEheader 0x5a4d // MZ
@@ -13,7 +13,7 @@
1313
#define sectNamePAGE 0x0000000045474150 // "PAGE\0\0\0\0"
1414

1515
#if defined(AMD64)
16-
#define KUSERSystemExpirationDate (LARGE_INTEGER*)0xfffff780000002c8;
16+
#define KUSERSystemExpirationDate (LARGE_INTEGER*)0xfffff780000002c8; // c802000080f7ffff
1717
typedef unsigned __int64 ptr_t;
1818
#elif defined(i386)
1919
#define KUSERSystemExpirationDate (LARGE_INTEGER*)0xffdf02c8;

src/TimeDefuser.rc

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)