poc payload

This commit is contained in:
17ms 2023-12-22 16:19:43 +02:00
parent cb5b95a311
commit 7d23b1d1e1

29
payload/payload.c Normal file
View File

@ -0,0 +1,29 @@
#include <windows.h>
#ifdef BUILD_DLL
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif
BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
CreateProcessW(L"C:\\Windows\\System32\\calc.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, NULL, NULL);
}
return TRUE;
}
BOOL SayHello(LPVOID lpUserData, DWORD nUserDataLen)
{
MessageBoxW(NULL, L"Hello from payload!", L"Hello World!", MB_OK);
return TRUE;
}
BOOL SayCustom(LPVOID lpUserData, DWORD nUserDataLen)
{
MessageBoxW(NULL, (LPCWSTR)lpUserData, L"Hello World!", MB_OK);
return TRUE;
}