Skip to content

Commit e91e51f

Browse files
committed
fix: disable win32k lockdown to properly load DLLs Bush2021/chrome_plus@dcde2e9
1 parent fba1792 commit e91e51f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/green.h

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ NET_API_STATUS WINAPI MyNetUserGetInfo(
148148

149149
#define PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON (0x00000001ui64 << 44)
150150

151+
#define PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON (0x00000001ui64 << 28)
152+
151153
typedef BOOL(WINAPI *pUpdateProcThreadAttribute)(
152154
LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
153155
DWORD dwFlags,
@@ -170,8 +172,10 @@ BOOL WINAPI MyUpdateProcThreadAttribute(
170172
{
171173
if (Attribute == PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY && cbSize >= sizeof(DWORD64))
172174
{
175+
// https://source.chromium.org/chromium/chromium/src/+/main:sandbox/win/src/process_mitigations.cc;l=362;drc=4c2fec5f6699ffeefd93137d2bf8c03504c6664c
173176
PDWORD64 policy_value_1 = &((PDWORD64)lpValue)[0];
174177
*policy_value_1 &= ~PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON;
178+
*policy_value_1 &= ~PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON;
175179
}
176180
return RawUpdateProcThreadAttribute(lpAttributeList, dwFlags, Attribute, lpValue, cbSize, lpPreviousValue, lpReturnSize);
177181
}

0 commit comments

Comments
 (0)