diff --git a/sample_bof/main.c b/sample_bof/main.c index e69de29..059e0a7 100644 --- a/sample_bof/main.c +++ b/sample_bof/main.c @@ -0,0 +1,18 @@ +#include +#include "beacon.h" +#include "syscalls-aio.h" + +void go(char* args, int length) { + HANDLE hProcess; + OBJECT_ATTRIBUTES oa = {sizeof(oa)}; + + NTSTATUS status = Sw3NtCreateProcessEx(&hProcess, PROCESS_ALL_ACCESS, &oa, + (HANDLE)(LONG_PTR)-1, 0, NULL, NULL, NULL, 0); + + if (status == 0) { + BeaconPrintf(CALLBACK_OUTPUT, "[+] NtCreateProcessEx successful"); + } else { + BeaconPrintf(CALLBACK_ERROR, "[-] NtCreateProcessEx failed: 0x%X\n", status); + return; + } +}