Skip to main content
Glama
elevate.ts2.22 kB
/** * Elevate operation-related MCP tools */ import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { CobaltStrikeClient } from '../api/client.js'; export function createElevateTools(client: CobaltStrikeClient): Tool[] { return [ { name: 'elevate_beacon', description: 'Elevate to a new beacon with higher privileges', inputSchema: { type: 'object', properties: { beaconId: { type: 'string', description: 'The ID of the beacon', }, listener: { type: 'string', description: 'Listener name for the elevated beacon', }, technique: { type: 'string', description: 'Elevation technique (e.g., "uac-token-duplication", "uac-token-duplication")', }, }, required: ['beaconId', 'listener'], }, }, { name: 'elevate_command', description: 'Elevate a command with higher privileges', inputSchema: { type: 'object', properties: { beaconId: { type: 'string', description: 'The ID of the beacon', }, command: { type: 'string', description: 'Command to execute with elevated privileges', }, technique: { type: 'string', description: 'Elevation technique', }, }, required: ['beaconId', 'command'], }, }, ]; } export async function handleElevateTool( name: string, args: any, client: CobaltStrikeClient ): Promise<string> { switch (name) { case 'elevate_beacon': const elevateBeaconResult = await client.elevateBeacon(args.beaconId, args.listener, args.technique); return JSON.stringify({ taskId: elevateBeaconResult, message: 'Elevate beacon command submitted' }, null, 2); case 'elevate_command': const elevateCommandResult = await client.elevateCommand(args.beaconId, args.command, args.technique); return JSON.stringify({ taskId: elevateCommandResult, message: 'Elevate command submitted' }, null, 2); default: throw new Error(`Unknown elevate 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