Skip to main content
Glama

search_auxiliary

Find Metasploit auxiliary modules for security testing by searching across scanner, admin, DoS, fuzzer, and data gathering categories to identify appropriate tools for penetration testing workflows.

Instructions

Search for auxiliary modules in Metasploit

Input Schema

NameRequiredDescriptionDefault
queryYesSearch query for auxiliary modules
typeNoOptional: Filter by auxiliary type

Input Schema (JSON Schema)

{ "properties": { "query": { "description": "Search query for auxiliary modules", "type": "string" }, "type": { "description": "Optional: Filter by auxiliary type", "enum": [ "scanner", "admin", "dos", "fuzzers", "gather" ], "type": "string" } }, "required": [ "query" ], "type": "object" }

Implementation Reference

  • Handler implementation for the 'search_auxiliary' tool. Extracts query and optional type from arguments, builds Metasploit search command for auxiliary modules, executes via msfconsole, and returns formatted JSON results or error.
    case "search_auxiliary": { const { query, type } = args as { query: string; type?: string }; const searchQuery = type ? `search type:auxiliary ${type} ${query}` : `search type:auxiliary ${query}`; try { const results = await executeMsfCommand([searchQuery]); return { content: [ { type: "text", text: JSON.stringify( { success: true, query, type: type || null, results, }, null, 2 ), }, ], }; } catch (error: any) { return { content: [ { type: "text", text: JSON.stringify({ success: false, error: error.message, }), }, ], }; } }
  • src/index.ts:90-108 (registration)
    Registration of the 'search_auxiliary' tool in the MCP tools array, including name, description, and input schema definition.
    { name: "search_auxiliary", description: "Search for auxiliary modules in Metasploit", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query for auxiliary modules", }, type: { type: "string", enum: ["scanner", "admin", "dos", "fuzzers", "gather"], description: "Optional: Filter by auxiliary type", }, }, required: ["query"], }, },
  • Input schema definition for the 'search_auxiliary' tool, specifying required 'query' parameter and optional 'type' filter.
    inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query for auxiliary modules", }, type: { type: "string", enum: ["scanner", "admin", "dos", "fuzzers", "gather"], description: "Optional: Filter by auxiliary type", }, }, required: ["query"], },
  • Helper function used by search_auxiliary (and other tools) to execute Metasploit commands via msfconsole.
    async function executeMsfCommand(commands: string[]): Promise<string> { const commandString = commands.join("; "); const fullCommand = `msfconsole -q -x "${commandString}; exit"`; try { const { stdout, stderr } = await execAsync(fullCommand, { timeout: 60000, // 60 second timeout maxBuffer: 10 * 1024 * 1024, // 10MB buffer }); return stdout || stderr; } catch (error: any) { throw new Error(error.message || "Command execution failed"); } }

Latest Blog Posts

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/andreransom58-coder/kali-metasploit-mcp'

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