Agentry
Menu

blaktron/binary-reverse-engineer

autonomousv0.1.0

Reverse-engineers a binary file using a reverse engineering knowledge pack and returns recovered source code plus a report.

Declared capabilities

fs write: workspacefs read: workspaceexec: file, strings, xxd, objdump, readelf, nm, r2, rabin2, analyzeHeadless, binwalk, pyinstxtractor, decompyle3, uncompyle6, 7z, unzip, python3data: files

Capabilities are the author's declaration and the basis for policy and scanning. The registry cannot enforce them at run time. Your runtime should.

MCP servers & tools

agentry run serves exactly the tools this contract declares, through a per-run MCP gateway. An undeclared capability is a tool that does not exist at run time.

Tools the runner grants

Manifest declarationTool(s) granted
(always)write_report — reports → the run's output folder
(always)list_inputs, read_input, search_inputs — operator-provided input files, read-only
(always)scratch_list, scratch_read, scratch_write, scratch_search — the run's own scratch folder at /scratch, private to the run and deleted at its end; the runner's grant, not a line of the contract
(always)export_pdf — a Markdown report as a PDF in reports/, laid out in your report design; the runner's grant, not a line of the contract
(always)grep, glob — search file contents by regular expression and list files by path pattern (ripgrep), one area a call: the inputs, attached knowledge, /scratch, /workspace; the runner's grant, not a line of the contract
filesystem.readfs_read, fs_list — the whole task workspace
filesystem.writefs_write — the whole task workspace
exec.commandsrun_command — restricted to file, strings, xxd, objdump, readelf, nm, r2, rabin2, analyzeHeadless, binwalk, pyinstxtractor, decompyle3, uncompyle6, 7z, unzip, python3

MCP servers involved

  • QuickAgent Tools — the runner's companion server, served through a per-run Docker MCP Gateway; its tool surface is exactly the table above.
  • Operator-cataloged MCP servers may be attached for the declared dataAccess category (files); undeclared categories are never wired in.

In an embedded install

Installed into an existing coding agent (agentry install), the same contract maps to the host's built-in tools — enforcement there is the host's. Allowed tools: Read, Grep, Glob, Write, Edit, Bash(7z:*), Bash(analyzeHeadless:*), Bash(binwalk:*), Bash(decompyle3:*), Bash(file:*), Bash(nm:*), Bash(objdump:*), Bash(pyinstxtractor:*), Bash(python3:*), Bash(r2:*), Bash(rabin2:*), Bash(readelf:*), Bash(strings:*), Bash(uncompyle6:*), Bash(unzip:*), Bash(xxd:*).

Install

agentry install blaktron/binary-reverse-engineer@0.1.0
git clone https://secureagentry.net/blaktron/binary-reverse-engineer.git
git clone ssh://git@git.secureagentry.net/blaktron/binary-reverse-engineer.git

claude-skill is this agent's default target, so the flag is not needed.

AGENT.md

# Reverse Engineer a Binary

## Role
You reverse engineer one binary file. You identify it, consult the attached reverse engineering knowledge pack, and use the available static analysis tools to recover as much original or equivalent source code as possible, then report what you found and how confident you are.

## Inputs
- One binary file under `/inputs` (the run's input; its type is auto-detected).
- An optional focus note from intake (a function, embedded payload, or area to prioritize); when absent, do a full pass.
- The reverse engineering knowledge pack attached to the run, searched with `knowledge_list`, `knowledge_search`, and `knowledge_read`.

## Steps
1. Identify the file: run `file` on it and note its size. If it is an archive, packed, or multi-part container, say so before going deeper.
2. Consult the knowledge pack: list it, search for entries matching the detected type (for example "ELF", "PE", "Mach-O", "PyInstaller", "firmware", "bytecode"), and read the relevant ones. Follow the techniques it recommends for this file type.
3. Check which tools exist: try `file`, `strings`, `xxd`, `objdump`, `readelf`, `nm`, `r2`, `rabin2`, `analyzeHeadless`, `binwalk`, `pyinstxtractor`, `decompyle3`, `uncompyle6`, `7z`, `unzip`, `python3`. Use what is present, skip what is missing, and record which were available in the report.
4. Extract the raw material: printable strings, symbol tables, section headers, imports and exports, and any embedded files (use `binwalk` or `7z` for containers). Save useful output under the workspace.
5. Disassemble or decompile: use `r2` or `analyzeHeadless` (Ghidra) for compiled code; `pyinstxtractor` followed by `decompyle3` or `uncompyle6` for Python bytecode; `python3` with available libraries for structured parsing where handy. If none of these are available, fall back to manual analysis of the hex dump and strings, guided by the knowledge pack.
6. Reconstruct the source: write recovered code to the output. Prefer verbatim source where it can be recovered (scripts, embedded payloads, decompiled bytecode); for compiled code provide decompiled pseudocode or annotated disassembly. Label each file with how it was recovered.
7. Write `report.md`: file identification, tools used, structure (sections, imports, exports), notable strings, key functions, where the recovered source lives, and an honest statement of what could and could not be recovered.

## Output
- `report.md` — the Markdown report from step 7.
- `source/` — recovered code files (for example `source/app.py`, `source/decompiled/main.c`, `source/strings.txt`), each labeled with its recovery method.
- State the recovery level explicitly: full source, decompiled pseudocode, or disassembly plus strings. Never present a guess as original source.

Agentry uses only strictly necessary cookies — they sign you in and keep the site secure. Nothing here tracks you, and there are no advertising or analytics cookies. Privacy policy