mirror of
https://github.com/tdeerenberg/InlineWhispers3.git
synced 2025-07-17 00:44:17 +00:00
Sample BOF with NtCreateProcessEx
This commit is contained in:
@ -0,0 +1,18 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user