Running a Reverse-Engineering Agent Safely: REA and ShieldCortex
Reverse engineering used to mean hours in a disassembler. Now you can ask your coding agent how a feature works and let it do the digging. That is genuinely useful. It also means your agent spends the session reading material that someone else wrote.
This post is a practical guide to running REA with sensible precautions, and an honest note on where ShieldCortex fits and where it does not.
What REA is
REA (Reverse Engineer Anything, published on npm as rea-agents) is an MIT-licensed MCP server and CLI that connects your agent to reverse-engineering tools. It can inspect native binaries, JavaScript and Electron apps, .NET assemblies, websites and saved network captures. For native code it drives an existing Hopper, Ghidra or IDA installation and returns pseudocode, assembly, strings, symbols and references. Static JavaScript and .NET inspection need no native engine at all.
REA's README describes the project as changing quickly, with frequent bug-fix releases. Its release workflow publishes to npm with build provenance, so you can check that a given package came from the project's own release pipeline. Analysis runs locally; your agent receives the results, and your model provider's data policy applies to those.
Setup is careful too. npx rea-agents setup asks which agents to configure, then previews its agent-configuration, skill and external-software changes, listing each configuration path and skill destination, before applying them. npm may download the package before that setup approval. Configuration writes keep unrelated entries, create backups (a .rea.backup snapshot) and verify the result. Declining the plan makes no setup changes.
Why this workload deserves extra care
None of this is a criticism of REA. It is the nature of the job. A reverse-engineering agent is pointed at untrusted input on purpose, and that combines several things we normally try to keep apart:
- The agent reads attacker-controlled text. Strings inside a binary, decompiled code, page content, captured request and response bodies. Any of it can contain text written to look like instructions. Prompt injection does not need a chat box; it can arrive through a tool result.
- The agent usually has real permissions. A coding agent typically has shell and file access on the same machine. REA's own security policy is clear that its local bridge is not a sandbox, and that opening an untrusted binary hands parsing to the selected provider with your user's permissions. Runtime capture runs or interacts with the target using your permissions.
- Setup changes your agent. It adds an MCP server to each selected agent and, by default, installs REA's workflow instructions as a skill (for Claude Code's default profile, under
~/.claude/skills; with another profile, the setup plan shows the actual destination). That is exactly what you want, and it is also a change to what your agent trusts. - "Latest" moves often. Frequent releases are good for fixes. They also mean the code behind
@latestcan differ from one week to the next.
A setup checklist (no ShieldCortex required)
1. Use a separate machine, VM or user account
Use a dedicated environment without access to your SSH keys, cloud credentials, browser sessions or production checkouts. A VM or separate OS account can reduce what a misled agent can reach, but only if its filesystem permissions, shared mounts and network access enforce that separation.
2. Pin a version and move deliberately
REA already pins each persistent MCP registration to the exact version that ran setup. The choice left to you is when to move. Pick a version, read its changelog, and request it explicitly, as REA's installation guide documents:
When you upgrade, do it on purpose and review the new setup plan rather than letting a one-off @latest command decide for you.
3. Read the setup plan before you approve it
REA shows its plan and asks before writing; setup also supports --dry-run, which returns a read-only plan. Check which agents it will configure, where the skill goes, and whether it proposes installing Hopper. Select only the agents you will use for this work. Keep the backup it makes.
4. Check you are allowed to analyse the target
Before analysing a target, check the applicable licences, any authorisation you need, and local law.
5. Treat every result as data, not instructions
If decompiled output or a captured payload appears to tell the agent to do something, that is a finding, not a task. Keep Claude Code's permission prompts on for shell commands during these sessions.
What ShieldCortex adds
ShieldCortex does not replace these precautions or eliminate prompt injection. The following is current as of version 5.13.0.
Scanning what the agent writes to memory
Memory writes that go through ShieldCortex are scanned before they are stored. Writes that the configured defence pipeline blocks or quarantines are held out of memory and recorded for review. Recognised credential findings can block, warn or log depending on their severity and configuration, and a review does not guarantee that a held item can be admitted. That matters here because a tidy summary of a hostile binary is exactly the kind of note an agent wants to remember. You can also scan any piece of text yourself:
A caught verdict exits 1; usage errors and tool failures have different non-zero exits, so not every non-zero exit is a detection. Be clear on the limit: ShieldCortex does not automatically inspect every REA result before your agent reads it. On MCP hosts it offers a scan_tool_response tool that the agent can call on another server's output, and that is advisory by default. The scanner is a detection floor; reworded attacks can still pass.
Gating dangerous tool calls with Action Guard
On Claude Code, OpenClaw and Hermes, Action Guard can sit in front of tool calls. When the installed adapter is on and enforcing, calls the Guard allows continue to the host's own permission checks; recognised hard-block patterns are denied, and calls classified as requiring approval follow the host-specific approval or blocking path. Claude Code can ask through its native permission prompt, or use a configured approval channel; the plain-English card is specific to the OpenClaw approval channel. OpenClaw can present a plain-English card through its approval integration. Without a usable approval path the adapters can deny the call instead. The ShieldCortex Hermes adapter does not offer an approval prompt for these Guard verdicts: when enforcing, it blocks calls that require approval.
Since 5.6, the Guard recognises additional teardown patterns, including SQL DROP/TRUNCATE and unscoped DELETE through recognised database clients, terraform/tofu destroy, and selected cluster and cloud-resource deletion commands. When on and enforcing, these recognised calls enter the approval tier on Claude Code and OpenClaw, subject to the host's configured approval path; the Hermes adapter blocks them. This is pattern coverage, not detection of every possible teardown.
Action Guard is off by default in the shared ShieldCortex configuration. The installed Hermes adapter has its own enforcement setting, SHIELDCORTEX_ENFORCE, and defaults to enforcing unless explicitly set to an advisory opt-out value. Interactively, shieldcortex setup offers Off, Watch only and Enforce when ready. On Claude Code and OpenClaw, Watch only normally logs ordinary approval-tier findings rather than stopping them. Enforce when ready normally keeps that tier in watch mode until its readiness conditions pass; as of 5.13.0 there is no published effectiveness evidence for that transition. Recognised catastrophic and self-protection cases still stop or hold calls in those modes. Hermes has its own setting and no readiness gate.
For explicit enforcement in the shared configuration, use shieldcortex config --action-guard-enforce; this does not require a protect pin. Separately and optionally, an administrator can run shieldcortex protect with administrator rights to pin a root-owned policy floor for an unprivileged agent account. That is additional configuration protection, not a guarantee against an agent with administrative privileges or against disabling the integration. Configure the Hermes adapter's own setting separately. On Codex, Cursor and other MCP-only hosts ShieldCortex is a memory scanner, not a gate. shieldcortex doctor reports installed integrations and their configured or observed posture; it is not proof that every tool call is being stopped. It is one layer, not a guarantee.
Scanning the skill REA installs
After setup, scan the workflow instructions it added (REA's skill is called reverse-engineer-anything) before your agent relies on them:
The --dir flag matters: the default scan-skills locations do not include ~/.claude/skills. These paths are for Claude Code's default profile; with another profile, use the skill destination the setup plan showed. The Skill & package scanner (shieldcortex xray <target>) accepts an npm package name, a file or a directory if you want a wider look. A clean scan is a signal, not a guarantee.
An audit trail you can check
ShieldCortex keeps a local audit log, and new rows are hash-chained. shieldcortex ledger verify reports an edited or deleted row in the middle of the history. The chain is local with no external anchor, so it cannot prove completeness. The dashboard's Needs you view gathers held-back items and new scanner findings in one place.
Try it
ShieldCortex supports Node 22.x from 22.14, or Node 24 and later. To run it alongside current REA 6.7.0, use Node 22.x from 22.19, Node 24.x from 24.11, or Node 26 and later:
setup shows a host table and asks before wiring anything. Full steps are in the install guide, and the tool gate is covered on the Iron Dome page.
Key takeaways
- REA provides useful analysis tools and previews its setup changes. The workload still exposes an agent with real permissions to untrusted material.
- Use an isolated environment without access to your normal credentials, and check its shared files and network access.
- Pin a version, read the setup plan, keep the backup.
- ShieldCortex adds memory-write scanning, skill scanning, a checkable local audit ledger and a tool gate through supported host adapters. Check each adapter's settings and limits. Layers, not a cure.
Sources
- REA README, installation and setup, security policy and release process
- ShieldCortex 5.13.0 README and updating and operations notes
REA is published separately as rea-agents. ShieldCortex is open source under the MIT licence. Built by Drakon Systems.