Reverse Engineer Anything (Docker)

io.github.psyb0t由 GitHub 账号 psyb0t 发布v0.1.1更新于 Oct 26, 2026

REA reverse-engineering MCP server in Docker, with JADX, Apktool and adb for APKs.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

封装 REA 的 Docker 镜像,让助手反编译 Android APK、检查二进制文件、资源与设备。

可以做什么
  • 检查与反编译 Android 包:列出包、搜索并查看类与方法、追踪引用、解码资源
  • 静态分析 JavaScript/Electron 打包文件、.NET 程序集、Go、Rust、WASM 与 SQLite
  • 通过 adb 操作设备并抓取流量
  • 在启用 Ghidra 后反编译原生二进制(ELF、PE、Mach-O)
  • 通过命令行以 JSON 输出执行同样的分析
适用场景
当助手需要检查没有源码的软件时适用,例如反编译 APK 以追踪登录流程或找出令牌存放位置,同时不想自行安装 JDK、JADX 和 Apktool。
运行要求
主机需安装 Docker;镜像以本地容器运行,在 8080 端口 /mcp 提供 Streamable HTTP,或使用 REA 的 stdio 模式。需要环境变量 REA_BRIDGE_TOKEN(至少 32 个字符),客户端需发送匹配的 Authorization bearer 头。目标文件须挂载到容器的 /work。可选 Ghidra 首次启动需联网,并在 /opt/rea-tools 挂载可写卷;Ghidra 仅支持 amd64。
安装前请注意
REA 会运行、驱动并插桩它所分析的软件,自身不做权限检查,容器是唯一边界;请按示例使用加固参数(只读根文件系统、丢弃全部能力、目标只读挂载、端口仅绑定 127.0.0.1)。bearer 令牌属于机密,勿写入日志,若暴露到 localhost 之外需加 TLS。仅分析你拥有或获授权检查的软件。该打包为非官方版本。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Reverse Engineer Anything (Docker),将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

docker-reverse-engineer-anything

[CI] [version] [license] [Docker Pulls]

REA (Reverse Engineer Anything) in a Docker image, with everything it needs to tear apart Android APKs already inside, and a Streamable HTTP MCP endpoint in front of it.

REA is morluto's MCP server and CLI that lets an AI agent inspect software it has no source for: decompile APKs, trace references, read resources, poke at devices over adb, dig through Electron bundles, .NET assemblies, Go and Rust binaries. Upstream ships it as the rea-agents npm package that talks MCP over stdio and expects you to install a JDK, JADX and Apktool yourself. This image does that part for you.

This is an unofficial packaging. REA itself lives at morluto/rea and is MIT-licensed. Bugs in REA's tools go there; bugs in the image or the HTTP bridge go here.

Table of Contents

What's in the image

PieceVersionWhy
REA (rea-agents)6.4.0The analysis engine, 170 MCP tools
OpenJDK 21 (full)Debian 13REA compiles its JADX bridge with jdk.compiler; a JRE won't do
jadx-headless-mcp0.7.1The exact JADX bridge jar REA pins, checked against REA's SHA-256
Apktool3.0.3Resource and string decoding
adb34.0.5Device tools; the version REA verified
Node.js24Runs REA and the bridge

APK analysis needs no extra setup: inspect_android_package, search_android_classes, inspect_android_class, inspect_android_method, trace_android_references and decode_android_resources work out of the box, and so do REA's static JavaScript/Electron, .NET, Go, Rust, WASM, SQLite and capture tools.

Native-binary decompilation (the .so libraries inside an APK, or any other ELF, PE or Mach-O) needs Ghidra. It is free but adds about 900 MB, so it is not baked in: set REA_INSTALL=ghidra and the container fetches it on first start. See Opt-in tools.

Images are built for linux/amd64 and linux/arm64. CI runs the APK tests on both architectures. Ghidra is amd64 only.

Quick start

bash
export REA_BRIDGE_TOKEN="$(openssl rand -hex 32)"mkdir -p targets && cp /path/to/app.apk targets/
docker run -d --name rea \  -e REA_BRIDGE_TOKEN \  -p 127.0.0.1:8080:8080 \  --read-only \  --tmpfs /tmp:rw,nosuid,size=4g \  --tmpfs /home/rea:rw,nosuid,size=256m \  --cap-drop ALL \  --security-opt no-new-privileges \  -v "$PWD/targets:/work:ro" \  psyb0t/reverse-engineer-anything:latest
claude mcp add --transport http rea http://localhost:8080/mcp \  --header "Authorization: Bearer $REA_BRIDGE_TOKEN"

Then ask your agent something like "decompile the login flow in /work/app.apk and show me where the token gets stored". Paths are container paths: whatever you mount at /work is what REA sees.

Ways to run it

The entrypoint takes one argument:

CommandWhat runs
bridgeDefault. Streamable HTTP MCP on port 8080 at /mcp, bearer token required.
mcpREA's own stdio MCP server, for docker run -i from a stdio-only client.
anything elseThe REA CLI, e.g. --help or inspect-android-package /work/app.apk.

Streamable HTTP bridge

The bridge is a small Node service in front of rea mcp. Each MCP session gets its own REA process, because REA keeps analysis state per process. Messages pass through untouched, progress notifications included. Sessions end on DELETE, after the idle timeout, or when the container stops, and their REA process goes with them.

stdio MCP

For clients that only launch local commands:

json
{  "mcpServers": {    "rea": {      "command": "docker",      "args": [        "run",        "-i",        "--rm",        "--read-only",        "--tmpfs",        "/tmp:rw,nosuid,size=4g",        "--tmpfs",        "/home/rea:rw,nosuid,size=256m",        "--cap-drop",        "ALL",        "--security-opt",        "no-new-privileges",        "-v",        "/absolute/path/to/targets:/work:ro",        "psyb0t/reverse-engineer-anything:latest",        "mcp"      ]    }  }}

CLI

bash
docker run --rm --network none --read-only \  --tmpfs /tmp:rw,nosuid,size=4g --tmpfs /home/rea:rw,nosuid,size=256m \  --cap-drop ALL --security-opt no-new-privileges \  -v "$PWD/targets:/work:ro" \  psyb0t/reverse-engineer-anything:latest \  search-android-classes /work/app.apk MainActivity

Output is JSON. --help lists every command.

Opt-in tools

Some tools REA can drive are free to redistribute but too big to put in every image. Name them in REA_INSTALL and mount a volume at /opt/rea-tools:

bash
docker run -d --name rea \  -e REA_BRIDGE_TOKEN \  -e REA_INSTALL=ghidra \  -v rea-tools:/opt/rea-tools \  -p 127.0.0.1:8080:8080 \  --read-only \  --tmpfs /tmp:rw,nosuid,size=4g \  --tmpfs /home/rea:rw,nosuid,size=256m \  --cap-drop ALL \  --security-opt no-new-privileges \  -v "$PWD/targets:/work:ro" \  psyb0t/reverse-engineer-anything:latest

On start, before REA runs, the entrypoint installs each listed tool that is not already in the volume. It downloads the version pinned in the image, refuses it unless the SHA-256 matches, unpacks it, and points REA at it. Later starts find it in the volume and skip the download. It works in every mode, mcp and the CLI included, and logs to stderr only.

NameInstallsDownload / installedArchitecturesEnables
ghidraGhidra 12.1.4570 MB / 880 MBamd64native decompilation, functions, xrefs, strings

The first start needs network access to GitHub. Without a volume, a --read-only container has nowhere to put the tool and exits with a message saying so; a writable one installs into its own layer and downloads again for every new container. Ghidra's official release has no arm64 decompiler, so on arm64 REA_INSTALL=ghidra refuses with that reason instead of half-working.

Bring your own

Paid or login-gated tools are never downloaded. Install them yourself and point REA at them:

  • Ghidra builds of your own (an arm64 build, a newer version): mount it and set GHIDRA_INSTALL_DIR. A set GHIDRA_INSTALL_DIR wins over REA_INSTALL=ghidra.
  • IDA: mount your installation and set REA_IDA_MCP_CONFIG, per REA's IDA guide.
  • JEB: run its MCP server where REA can reach it on loopback (a sidecar sharing the container's network namespace) and set REA_JEB_MCP_URL.
  • Hopper is a desktop app and is not supported here.

Configuration

VariableDefaultDescription
REA_BRIDGE_TOKENrequiredBearer token, at least 32 characters. Never passed to REA.
REA_BRIDGE_PORT8080Listen port inside the container.
REA_BRIDGE_HOST0.0.0.0Listen address inside the container.
REA_BRIDGE_PATH/mcpMCP endpoint path.
REA_BRIDGE_ALLOWED_HOSTSlocalhost,127.0.0.1,[::1]Accepted Host header names (DNS rebinding guard). * disables it.
REA_BRIDGE_MAX_SESSIONS4Concurrent MCP sessions, each with its own REA process.
REA_BRIDGE_IDLE_TIMEOUT_SECONDS1800Idle sessions get closed and their REA process stopped.
REA_BRIDGE_MAX_BODY_BYTES4194304Largest accepted request body.
REA_BRIDGE_LOG_LEVELinfodebug, info, warn or error. Logs are JSON on stdout.
REA_INSTALLunsetComma-separated opt-in tools to install on start.
REA_TOOLS_DIR/opt/rea-toolsWhere opt-in tools are installed. Mount a volume here.

REA's own variables pass straight through, for example REA_JADX_HEAP_MIB and REA_JADX_OPERATION_TIMEOUT_MS for big APKs, REA_LOG_LEVEL, or REA_MCP_MAX_RESPONSE_BYTES. See REA's documentation. The image presets JAVA_HOME, REA_JADX_MCP_JAR, REA_APKTOOL_COMMAND and REA_ADB_PATH.

GET /healthz answers without a token: {"status":"ok","sessions":N}.

Security

REA can run, drive and instrument the software it looks at, and it does no permission checks of its own. The container is the boundary, so keep it tight:

  • The bridge won't start without a token, compares it in constant time, checks the Host header, and never hands the token to REA.
  • The image runs as an unprivileged rea user. Run it the way the examples do: read-only root, tmpfs for /tmp and /home/rea, all capabilities dropped, no-new-privileges, targets mounted read-only, port bound to 127.0.0.1.
  • /tmp can't be noexec: the JVM loads native libraries from it.
  • Exposing it beyond localhost? Put TLS in front and add the hostname to REA_BRIDGE_ALLOWED_HOSTS.
  • Only analyze software you own or are authorized to examine. REA's disclaimer applies.

Agent integrations

  • Skill for Claude Code, Codex and OpenClaw: claude plugin install reverse-engineer-anything@psyb0t, codex plugin add reverse-engineer-anything@psyb0t, or from ClawHub. It teaches the agent the APK workflow and ships a locked-down CLI wrapper. Add the marketplace first with claude plugin marketplace add psyb0t/agents.
  • OpenClaw plugin @psyb0t/reverse-engineer-anything: a stdio bridge to a running container. Set REA_URL and REA_BRIDGE_TOKEN.
  • MCP registry: io.github.psyb0t/reverse-engineer-anything.

Versions and updates

The image version is this repository's own (VERSION); REA's version is in the table above and in package.json. REA ships releases almost daily. This image only takes a REA release, or any other npm package, once it is at least seven days old, installs with lifecycle scripts disabled from a frozen lockfile, and checks every downloaded jar against a pinned SHA-256. The opt-in tools follow the same rule: one version per image release, at least seven days old, checked against its SHA-256. Base images are pinned by digest.

Development

The host needs Docker, Make, Git and a shell. Everything else runs in containers.

bash
make help        # every targetmake lint        # tsc, eslint, prettier, shellcheck, hadolintmake test        # bridge unit tests + the image against a real APKmake build       # build psyb0t/reverse-engineer-anything locallymake run         # run the bridge on 127.0.0.1:8080 (needs REA_BRIDGE_TOKEN)make pkg-update PKG=rea-agents   # move to the newest REA that clears the age gate

The integration test starts the hardened container, checks that a missing token gets a 401, then drives REA's Android tools through the bridge against Appium's ApiDemos APK. It also starts a container with REA_INSTALL=ghidra and has Ghidra analyze a binary through the bridge (on arm64 it checks for the refusal instead). The Ghidra download is cached in the rea-integration-tools volume; make clean removes it.

License

WTFPL for this repository's code. REA is MIT, and the bundled tools keep their own licenses: see THIRD_PARTY_NOTICES.md.

来源:README.md,提交 2c3ec3f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Oct 18, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分