reverse-engineering-lord
Lord skill for reverse engineering shipped artifacts — native binaries, Electron/JavaScript apps, .NET assemblies, APKs, firmware, packages — via REA (rea-agents) CLI/MCP. Evidence-tiered analysis (ob
SKILL.mdskills/reverse-engineering-lord/SKILL.md
GitHubReverse Engineering Lord
[SKILL] reverse-engineering-lord
[OBJ] Explain, compare, decompile, or reconstruct shipped artifacts with REA (rea-agents CLI/MCP server). Compressed doctrine adapted from morluto/rea (MIT) .agents/skills/reverse-engineer-anything.
[RULES]
- [REQ] When to Use — Only when a claim depends on a shipped binary/package, decompilation, runtime evidence, or behavior NOT established by available source. Ordinary source-repo analysis → normal repo tools, never REA.
- [REQ] Connect Only When Needed — REA tools available → proceed directly; NEVER run doctor/setup before every investigation. Absent tools → diagnose the exact blocker (missing registration vs stale session vs missing provider) with
npx -y rea-agents@latest doctor --client <client> --json(clients: claude_code, codex, cursor, gemini_cli, windsurf, devin, vscode…), repair scoped, restart agent, resume task. - [REQ] Setup Discipline — Configuration repair starts with a read-only plan:
npx -y rea-agents@latest setup --client <client> --dry-run --json; show proposed paths + backups + skill replacement; apply--yesonly after approval.rea setupNEVER installs/upgrades Node, npm, Java, Ghidra, IDA, JADX, Kuna, Binwalk, Unblob — bring-your-own engines only. - [REQ] Route the Target First — Pick the first tool from the supplied target: extracted JS/Electron tree or ASAR →
analyze_javascript_application; archive members (ZIP/APK/IPA/DMG/PyInstaller) →open_binary(detail: "summary"first for large inventories); Apple plist/assets →open_bundle_resources; APK code/classes →inspect_android_package; .NET PE/CLI →inspect_managed_artifact; firmware →inspect_firmware_regions; open browser page →list_browser_targets. Runtime options are metadata, not files. - [REQ] Evidence Discipline — Distinguish observation / derivation / inference / unknown in every report. Preserve provenance (paths, digests, offsets, source locations). Unresolved identity or applicability stays UNKNOWN — never treated as absent or aligned. Keep complete inline Evidence when the server does not advertise retained references.
- [REQ] Read-Only Authority — Ghidra uses ephemeral DBs without modifying executable bytes; IDA analysis is read-only (never save/close an attached GUI DB); no mutation authority on Windows Ghidra P0. Fail closed: skip capabilities while scope/authority/side-effect questions are unresolved.
- [REQ] Local Checkout First — A full REA source checkout is installed OUTSIDE this repo: resolve
$REA_HOME, else sibling../reanext to the aizee root (tech-stack/useful-repos.mdis the registry). Invoke through the engine-aware wrappernode ../rea-cli.mjs <command> /abs/path --json(siblingrea-cli.mjsnext to the aizee root — it pins the checkout's.nvmrcNode underNVM_HOMEand injectsGHIDRA_INSTALL_DIR/JAVA_HOME); plainnode "$REA_HOME/scripts/rea.mjs"also works for engine-free tasks;npx -y rea-agents@6.7.0is the last resort. All return the same Evidence record, no MCP needed for static JS/.NET/artifact work. Native targets still require their selected engine (Hopper/Ghidra/IDA); a CLI fallback does NOT prove MCP registration. NEVER edit files inside the checkout; refresh it withgit -C <checkout> pull && npm ci && npm run build:cachedunder the pinned Node. Missingdist/→ runnpm ci && npm run build:cachedinside the checkout before use. - [REQ] Timeout Handling — Host timeout without a result ≠ work stopped; check provider startup deadline (
REA_GHIDRA_STARTUP_TIMEOUT_MS/REA_HOPPER_STARTUP_TIMEOUT_MSfor large binaries) before retrying an unchanged call. - [PROHIBIT] Never repeat an unchanged call after a timeout or assume an absent provider blocks unrelated targets — static JavaScript inspection needs neither Hopper nor Ghidra.
- [PROHIBIT] Never run target binaries, inject, mutate, or recover protections beyond declared scope — those need an explicit user scope decision first.
- [PROHIBIT] Never claim runtime reproduction you did not perform; label hypotheses and unverified coverage explicitly (
NOT_ENOUGH_INFObeats a confident guess). - [CMD] Providers — deep native: Hopper/Ghidra/IDA/Kuna/JEB + objdump/rizin/cutter/GDB; mobile: JADX/Apktool/adb; web: Chrome CDP/Playwright, HAR/SAZ captures; formats: WABT (wasm), tshark (pcap), sigrok (signals), binwalk/unblob (firmware), pwntools/GDB (ELF/coredumps). All caller-supplied.
[WORKFLOWS]
- Feature-understanding — locate feature evidence in artifact → open target with routed tool → trace code/references → report observations vs inferences → reconstruct comparable implementation with tests if requested.
- Binary triage —
open_binarysummary → inventory/sections/strings → pick deep provider if pseudocode needed → snapshot session → focused function/CFG reads → evidence ledger report. - Version comparison — inspect both artifacts → diff metadata/symbols/surface → report changed/unchanged/unknown with digests.
- Recovery — diagnose blocker class (registration/provider/session/PATH) → minimal repair → verify tools visible in-session → resume original investigation.