Files
reverse-engineering-anything/docs/index.md
T
ca4ca65c5e feat(pe): inspect Authenticode certificate tables (#4830)
* feat(pe): inspect Authenticode certificate tables

Add inspect_pe_certificates for IMAGE_DIRECTORY_ENTRY_SECURITY
WIN_CERTIFICATE entries and structurally decoded PKCS#7 signer
and X.509 identity fields. The workflow reads a stable PE image
without executing it or verifying signatures, chains, timestamps,
or Authenticode digest coverage.

* fix(pe): bound and validate certificate DER decoding

- Cap decoded DER values with a shared node budget so sibling fan-out
  cannot exhaust memory before the PKCS#7 check
- Require SignedData version, encapContentInfo and a final signerInfos
  SET in RFC 5652 order, and a signature OCTET STRING in each SignerInfo
- Decode OBJECT IDENTIFIER arcs as unbounded base-128 values, including
  a multi-byte first combined arc
- Decode UniversalString names as UTF-32BE and reject invalid values
- Share PE header admission with the resource layout so a section table
  that does not fit SizeOfHeaders is rejected

* docs: list PE certificates in the translated READMEs

* fix(pe): cap OBJECT IDENTIFIER length and arc size

A crafted type-2 certificate with a 262,144-byte contentType OID stalled
decodeOid for about 20 seconds, because one arc kept growing a BigInt
before the signedData check ran. decodeOid now rejects an OID longer than
256 bytes and an arc longer than 32 bytes before decoding it. Certificate
OIDs, including 2.25 UUID arcs, fit under both caps.

* fix(pe): reject truncated certificate tables and PKCS#7

SignedData now requires one SignerInfo with a non-empty signature and a
complete issuerAndSerialNumber. Certificate names share a 64 KiB decoded-byte
budget and are copied once. A security directory that ends in a short
WIN_CERTIFICATE header fails instead of reporting a complete table. The
certificate CLI forwards the caller abort signal into cleanup.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* chore(ci): keep fork workflow files unchanged

The certificate restack follows current main. Workflow files stay at the
fork tip so this branch update does not rewrite .github/workflows.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(pe): charge serial and validity text to the decoded budget

Certificate and signer serial numbers and validity times now count against
the shared decoded-text budget before they are converted, so a crafted
certificate cannot push megabytes of text into the hashed evidence. The
budget error now names certificate text rather than only names.

Restore the CI workflow to match main: the CI_TIMING_TIER input, the
tier-named timing artifacts and their publication conditions, the Windows
typecheck, and the path and snapshot suites in the curated Windows lane.

* fix(pe): require certificate fields and preserve signer key ids

Reject X.509 records that omit subjectPublicKeyInfo or signatureValue,
return subjectKeyIdentifier bytes as bounded hex, and advertise an absolute
path in the PE certificate input schema.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(pe): reject extra PKCS#7 wrappers and invalid UTF-8 names

ContentInfo and its signedData wrapper no longer ignore trailing values, and
directory strings must round-trip as UTF-8 instead of becoming U+FFFD.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-22 17:20:07 +08:00

7.7 KiB

layout, hero, features
layout hero features
home
name text tagline actions
REA Reverse Engineer Anything Understand binaries, applications, and runtime behavior with one CLI and MCP server.
theme text link
brand Get started /installation
theme text link
alt View on GitHub https://github.com/morluto/rea
title details link
Investigate with your agent Connect REA to your coding agent, describe the app or feature you want to understand, and follow the evidence. /mcp-prompts
title details link
Inspect across formats Explore native binaries, JavaScript and Electron apps, .NET assemblies, Android packages, firmware, and websites. /installation
title details link
Keep the evidence Analysis runs locally and returns observations, limitations, and unknowns through the CLI and MCP. /mcp-contracts

Start with one command

npx rea-agents setup

Choose your agent, review the planned changes, and approve setup. Native binary analysis can use an existing Hopper, Ghidra, or IDA installation; static JavaScript analysis needs no native analysis engine.

For a first result from an extracted JavaScript application or ASAR:

npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app --json

See installation and setup for requirements and configuration.

For runtime instrumentation, see the Frida guide.

Choose a guide

Task Guides
Identify a desktop installation Runtime candidates, evidence and follow-up files
Inspect native functions, references, or types Native binaries, Go metadata, Rust dependencies, PE certificates, ELF notes, offline ELF layout, recorded crashes
Select a native provider or import format Ghidra semantics, Windows, DOS, raw bytes, MIPS, PSP, NativeAOT, IDA, Kuna, JEB
Analyze JavaScript or Electron artifacts Static analysis, tracing and comparisons, application graph, source recovery
Compare static JavaScript with runtime observations Runtime attribution, reconciliation, Electron observation, Electron fuses
Inspect assemblies, packages, or firmware Godot PCK, .NET, Python packages, Android, Apktool resources, ADB acquisition, Apple, Harmony, firmware, WASM, EVM
Observe or compare a browser scenario CDP observation, scenarios, runtime evidence, historical captures
Serve recorded behavior as an agent environment Agent environments
Trace captured website source Source locations, module traces, script export
Capture and compare a command Process capture
Use CLI/MCP and retain evidence CLI, MCP contracts, agent prompts, obligation ledgers

For development, use testing, client verification, tool design, and releasing. Reconstruction readiness describes a development conformance verifier. The 6.2 migration records that release's compatibility changes; the roadmap tracks future work.

REA inspecting a native binary in Hopper