Skip to content

Commit d73a3a4

Browse files
committed
Dont call ExitProcess because it might kill the shell
1 parent efece12 commit d73a3a4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

external/source/exploits/cve-2015-1701/cve-2015-1701/cve-2015-1701.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,12 +424,10 @@ void win32k_client_copy_image(LPVOID lpPayload)
424424
RtlGetVersion(&osver);
425425

426426
if (osver.dwBuildNumber > 7601) {
427-
ExitProcess((UINT)-1);
428427
return;
429428
}
430429

431430
if (supIsProcess32bit(GetCurrentProcess())) {
432-
ExitProcess((UINT)-2);
433431
return;
434432
}
435433

@@ -444,7 +442,6 @@ void win32k_client_copy_image(LPVOID lpPayload)
444442

445443

446444
if (g_PsLookupProcessByProcessIdPtr == NULL) {
447-
ExitProcess((UINT)-3);
448445
return;
449446
}
450447

@@ -496,7 +493,7 @@ void win32k_client_copy_image(LPVOID lpPayload)
496493
if (class_atom)
497494
UnregisterClass(MAKEINTATOM(class_atom), hinst);
498495

499-
ExitProcess(0);
496+
return;
500497
}
501498

502499
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved)

0 commit comments

Comments
 (0)