BOFs receive a raw byte buffer. Use beacon.h parsing macros:
This guide covers the essential workflow for writing, compiling, and using BOFs in Cobalt Strike.
for (BOOL ok = KERNEL32$Process32First(snap, &pe); ok; ok = KERNEL32$Process32Next(snap, &pe)) BeaconPrintf(CALLBACK_OUTPUT, "%d\t%s\n", pe.th32ProcessID, pe.szExeFile);
void go(char* args, int len) char* target_process; int pid; // Extract arguments passed from Beacon command line BeaconParseArguments(args, len, "iz", &target_process, &pid);
#include <windows.h> #include "beacon.h" void go(char* args, int len) // Your code here