Skip to main content
Glama

objdump

Analyze and extract details from object files, including file headers, section headers, and disassembled code, for malware analysis and debugging purposes.

Instructions

Display information from object files

Example usage:

  • Display file headers: { "target": "suspicious.o" }

  • Disassemble code: { "target": "suspicious.exe", "disassemble": true }

  • Show section headers: { "target": "suspicious.exe", "headers": true }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
disassembleNoDisassemble executable sections
headersNoDisplay the contents of the section headers
optionsNoAdditional command-line options
targetYesTarget file or data to analyze

Implementation Reference

  • The handler function that constructs the objdump shell command based on provided arguments, adding flags for disassembly (-d), headers (-h), or default file info (-f).
    buildCommand: (args) => { let options = args.options ? args.options : ''; if (args.disassemble) { options += ' -d'; } if (args.headers) { options += ' -h'; } // Default to displaying file headers if no specific options provided if (!options && !args.disassemble && !args.headers) { options = ' -f'; } return `objdump${options} ${args.target}`; },
  • Input schema definition for the objdump tool, extending base schema with optional disassemble and headers flags.
    schema: baseCommandSchema.extend({ disassemble: z.boolean().optional().describe("Disassemble executable sections"), headers: z.boolean().optional().describe("Display the contents of the section headers") }),
  • serverMCP.js:113-117 (registration)
    Dynamically registers the objdump tool (and other commands) by mapping the commands configuration to MCP tool specifications in the list tools handler.
    const specializedTools = Object.values(commands).map(cmd => ({ name: cmd.name, description: cmd.description + (cmd.helpText ? '\n' + cmd.helpText : ''), inputSchema: zodToJsonSchema(cmd.schema), }));
  • Dispatch handler in callToolRequest that processes objdump calls: validates input, builds command using config, executes via terminalManager, and returns result.
    if (commands[name]) { try { const cmdConfig = commands[name]; // Validate arguments against schema const validationResult = cmdConfig.schema.safeParse(args); if (!validationResult.success) { return { content: [{ type: "text", text: `Error: Invalid parameters for ${name} command.\n${JSON.stringify(validationResult.error.format())}` }], isError: true, }; } // Build the command string const commandStr = cmdConfig.buildCommand(validationResult.data); console.error(`Executing specialized command: ${commandStr}`); // Execute the command via the terminal manager const result = await terminalManager.shellCommand(commandStr); console.error(`${name} command executed with PID: ${result.pid}, blocked: ${result.isBlocked}`); return { content: [{ type: "text", text: JSON.stringify(result) }], }; } catch (error) {

Other Tools

Related Tools

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/abdessamad-elamrani/MalwareAnalyzerMCP'

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