Skip to main content
Glama
bof.ts3 kB
/** * BOF (Beacon Object File) related MCP tools */ import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { CobaltStrikeClient } from '../api/client.js'; export function createBOFTools(client: CobaltStrikeClient): Tool[] { return [ { name: 'execute_bof', description: 'Execute a BOF (Beacon Object File) on a beacon. Common BOFs: @artifacts/BOFs/whoami.x64.o, @artifacts/BOFs/whoami.x86.o', inputSchema: { type: 'object', properties: { beaconId: { type: 'string', description: 'The ID of the beacon', }, bofPath: { type: 'string', description: 'Path to BOF file (e.g., @artifacts/BOFs/whoami.x64.o)', }, arguments: { type: 'string', description: 'Optional arguments for the BOF', }, }, required: ['beaconId', 'bofPath'], }, }, { name: 'execute_bof_pack', description: 'Execute a BOF with packing', inputSchema: { type: 'object', properties: { beaconId: { type: 'string', description: 'The ID of the beacon', }, bofPath: { type: 'string', description: 'Path to BOF file', }, arguments: { type: 'string', description: 'Optional arguments for the BOF', }, }, required: ['beaconId', 'bofPath'], }, }, { name: 'execute_bof_packed', description: 'Execute a packed BOF', inputSchema: { type: 'object', properties: { beaconId: { type: 'string', description: 'The ID of the beacon', }, bofPath: { type: 'string', description: 'Path to packed BOF file', }, arguments: { type: 'string', description: 'Optional arguments for the BOF', }, }, required: ['beaconId', 'bofPath'], }, }, ]; } export async function handleBOFTool( name: string, args: any, client: CobaltStrikeClient ): Promise<string> { switch (name) { case 'execute_bof': const taskId = await client.executeBOF(args.beaconId, args.bofPath, args.arguments); return JSON.stringify({ taskId, message: 'BOF execution submitted. Use get_task to retrieve results.' }, null, 2); case 'execute_bof_pack': const packTaskId = await client.executeBOFPack(args.beaconId, args.bofPath, args.arguments); return JSON.stringify({ taskId: packTaskId, message: 'BOF pack execution submitted' }, null, 2); case 'execute_bof_packed': const packedTaskId = await client.executeBOFPacked(args.beaconId, args.bofPath, args.arguments); return JSON.stringify({ taskId: packedTaskId, message: 'BOF packed execution submitted' }, null, 2); default: throw new Error(`Unknown BOF tool: ${name}`); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MickeyDB/Cobalt-Strike-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server