mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #968] [Feature] Modular native runtime instrumentation through a Frida adapter #367
Open
opened 2026-10-15 18:24:20 +00:00 by bsakaguchi
·
6 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#367
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @N0zoM1z0 on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/968
Before submitting
Area
Process capture or runtime observation
Current limitation
REA can inspect native binaries through its static providers, capture process terminal behavior, and observe JavaScript/browser runtimes. Agents still lack a reusable native instrumentation provider for loaded modules, selected function entry/return values, and caller-authored runtime scripts.
The intended capability is general runtime reverse engineering: native applications, ABI reconstruction, dynamic loading, APK/JNI investigation, and firmware userspace programs can all consume it. Frida is the initial replaceable provider. CTF is one application domain/showcase of these general capabilities; public contracts should express reusable analyst questions.
Research baseline: REA main
b5afa5f91eed9ae31d670aeab9bbf5112d790ec2, 2026-10-07. #71/#385 already track Objective-C observation; open PR #964 implements a narrower macOS LLDB entry-call proposal and explicitly excludes Frida and returns. #717 mentions future Android instrumentation. This issue records the shared Frida adapter and its independently useful native capabilities; coordinate with those workstreams. Parent: #32.Use cases
Process PTY capture does not provide these facts. Existing CDP/Inspector ports carry different producer semantics and should remain separate adapters.
Desired outcome and success criteria
Deliver small, independently reviewable capabilities:
First real acceptance: a source-built Linux x64 fixture with known native return values, concurrent calls, dynamic module loading/reload, NUL/non-UTF8 messages, unresolved hooks and target exit. Exercise real Frida through public CLI and MCP, including an isolated installed npm package. Verify cancellation, malformed scripts, output pressure, identity mismatch, cleanup after failed spawn/attach, and detach that preserves an externally launched fixture. Report unverified platforms separately.
Later facets can add selected memory writes, function replacement/calls, Stalker and Java/ObjC/Swift bridges. Each must have its own observed use case, effects and real verification; the provider remains useful without them.
Authority boundaries and non-goals
NOASSERTIONis not absence of licensing.Alternatives considered
frida-tracealready supplies useful selectors/handlers. Reuse those ideas, but native API events provide a firmer boundary than parsing terminal trace text.fuzzmind/frida-mcphas managed sessions/scripts, RPC and binary messages. Selected source review found tail-retained event queues and script preprocessing/bridge compilation; adapt provenance and loss reporting before reuse. Its broad catalog does not establish REA platform verification.Possible direction
Keep pure runtime identities/call evidence in the domain, shared workflows behind application ports, and Frida APIs in a dedicated provider/bridge. Reuse existing process ownership, private runtime roots and Evidence infrastructure. Coordinate neutral call evidence with #964 rather than creating parallel domain models solely because the engines differ.
Start with official Python bindings behind an isolated, versioned bridge; compare the official Node binding only if a small real spike shows a packaging/lifecycle advantage. Optional providers should load lazily and independently. Persistent session infrastructure is justified only for script/debugger operations that actually span calls, with equivalent CLI/MCP lifecycle semantics.
Observed upstream release: Frida 17.22.2. This is a research snapshot, not a tested compatibility claim. Frida 17 API users supply Java/ObjC/Swift bridges separately; REPL/frida-trace availability must not be treated as API bridge availability. Pin the release/binding/bridge profile proven by implementation fixtures.
References
Research reviewed official documentation, version/license metadata and selected source. No new provider runtime support is claimed by this issue. Follow up with focused implementation/proof issues rather than one monolithic PR.
@morluto commented on GitHub (Oct 9, 2026):
Triage note (2026-10-09): keeping open. Related LLDB entry-call work landed via #964 (which explicitly excludes Frida and returns); the Frida adapter scope here remains unaddressed.
@JackLee992 commented on GitHub (Oct 9, 2026):
Thanks for the triage note and for keeping this open. I'd like to take the first independently-mergeable slice: discover configured Frida/binding versions and host/target facets without attaching or launching anything, as a separate Frida adapter (acknowledging #964 is LLDB-only and explicitly excludes Frida; I'd reuse the neutral
nativeCallObservationdomain where it fits, but keep a distinct Frida provider/bridge).Scope for this slice:
AnalysisProviderCandidate.inspectAvailability()/inspectTargetSupport()extension points and add one read-only CLI/MCP tool, registering capabilities/effects/catalog/skills the same way #964 did.Local verification I've already done on Linux x64 (no device/root/frida-server): with real Frida 17.23.1 from the official prebuilt manylinux wheel, owned-spawn + attach into a source-built x64 fixture works. I captured a loaded
.soexport's entry args and return value against exact known inputs, an explicit unresolved-symbol miss, and clean teardown. Two Frida-17 specifics the bridge must pin: the staticModule.getExportByNamewas removed (instance /Process.*Global*APIs only), and exports resolve from.dynsym(a PIE main executable's own symbols are not enumerable; observe a loaded.so, or use DebugSymbol).A few questions before I write it:
runtime/fridaprovider group, or fold into the existingnativegroup alongside #964?--versionacceptable in this PR, with the isolated versioned Python bridge introduced alongside the observation PR — or do you want the Python bridge present from the start?I'll keep Linux x64 as the only verified target and list macOS/Windows/Android as unverified until matching real lanes exist. Happy to open this as a focused implementation issue if you'd prefer that to a long-lived thread here.
@LcokHcak commented on GitHub (Oct 13, 2026):
I tested REA's existing
instrument-with-fridaCLI against the public Appium ApiDemos v6.0.18 APK in a local Android 15 x86_64 emulator. A finitespawnrun captured six Activity entry/exit events; anattachrun captured eight events after one App-menu tap, with the UI change checked independently. In a later comparison, App and Animation both calledActivity.startActivity(Intent)with the same.ApiDemoscomponent; the selectedio.appium.android.apis.Pathextra distinguished them (AppversusAnimation). A bounded caller-authored agent emitted those selected values and a local parser retained them. These are Android fixture results only; they do not establish Linux-native or general Android compatibility.I have a local, unintegrated prototype for an additive normalized trace projection of the existing caller-authored script operation. It preserves raw Frida messages, accepts only explicit versioned
rea_traceenvelopes, checks the claimed PID against the selected session, and reports retained-record indexes, field provenance, rejected/omitted events, retention truncation, and unknown producer loss. Selected decoded values are agent-supplied and bounded (16 keys; 64-character keys; 256-character string values). It distinguishes epoch milliseconds, monotonic nanoseconds, and QPC ticks without claiming a cross-provider total order. There is no public CLI/MCP integration or merged implementation yet.A subsequent controlled App-menu tap, instrumenting four selected
Activityoverloads, produced four nested entries and four matching exits. An optional producer-assignedevent.call(id,parent_id) preserved those observed pairs in the local projection: 8/8 candidate events accepted, zero rejected or omitted, and the UI transition checked independently. A null parent means no parent among the selected active hooks; this does not establish a complete call graph or cross-thread causality.Would this projection fit #968 as a small follow-up to the current script operation, while the Frida provider discovery proposal above proceeds separately? I would keep Java/JNI hook presets, persistent streaming, and native argument/return decoding as later slices with their own real fixtures and cleanup/resource checks. The projection would add no script-execution authority and would not claim a complete call graph. Which output contract and real-provider verification would you want before integration?
Separate proposals: Linux eBPF userspace tracing #2688 and Windows ETW events #2689. Their attachment/permission effects and coverage differ from Frida's. No private APK, raw trace, credentials, or local paths are attached.
@LcokHcak commented on GitHub (Oct 14, 2026):
Controlled follow-up on the proposed read-only projection of the existing Frida script Evidence:
0,1,0; the fixture independently returned42,17,42. A bounded local agent emitted 17 selected function/basic-block events. Per-invocation IDs and TIDs connected each entry, selected block path, and exit. One final agent status followed all 17 retained events. This is selected-path evidence, not whole-program coverage or a zero-loss claim.unloadScriptafter observing all three entries while the fixture had not yet written its result. The target independently returned42,17,42and exited normally, but the main script's retained stream contained only the three entries, no exits, and no terminal status. The local projector kept those observations and reported producer omission/filter/loss as unknown. This is expected uncertainty for an interrupted script stream; unload success cannot stand in for trace completion.Both results are from local experiments, with no public CLI/MCP change or packaged trace provider. I am proposing an initial slice that only projects explicit versioned
rea_traceenvelopes already present in the currentinstrument-with-fridaraw Evidence, optionally scoped to one manager-assigned script ID. It would preserve raw record indexes and uncertainty, and add no new attach, spawn, script execution, or RPC authority. Cooperative finish RPC, bundled hook agents, persistent streaming, and automatic target instrumentation would remain separate proposals.Would this read-only output slice fit #968 for a focused PR, or should it wait for the separate Frida adapter discovery work? I will keep it local until there is an explicit scope decision. I have not attached raw traces, local paths, or private targets.
@LcokHcak commented on GitHub (Oct 14, 2026):
I prepared a focused, read-only Frida trace projection on this fork branch (compare with current main). It contains the v1 event/batch contract, pure parser for opt-in
rea_traceenvelopes already in manager Evidence, and tests. There is no CLI/MCP registration, new attach/spawn/script/RPC authority, bundled agent, or target mutation.Verification on the exact branch: 23 focused tests, test discovery, typecheck, lint, module boundaries, and compile passed. Replaying saved manager messages from the owned Windows x64 Frida fixture produced 17 selected events from 25 raw messages and exactly matched the earlier retained projection. The fixture independently returned
42,17,42for three overlapping calls. Producer loss remains unknown.I intended to open this as a draft PR for the scope decision, but GitHub rejected
CreatePullRequestfor the currently authenticated account (and REST returned 404). The branch and diff are available for review. I will not integrate or publish a runtime tracing workflow without the explicit maintainer decision requested above.@LcokHcak commented on GitHub (Oct 14, 2026):
Local exploratory update for the scope discussion: the trace batch contract is now v2 with required provider, session, target PID and selected stream; individual event records remain v1. This lets an empty selected-script result retain its identity and lets the validator reject mixed-session or mixed-target events.
In a fresh controlled Windows x64 run using the existing REA Frida manager and Frida 17.23.2, an owned three-thread fixture made three overlapping calls returning 42/17/42. REA retained 25 raw manager messages; the opt-in read-only projector selected 17 function/basic-block events from the main script. A companion script produced zero events but retained a distinct batch source. An earlier deliberate mid-call unload retained only three entries, no exits or final producer status; omission/filter/loss claims remain unknown. A saved real CLI capacity-pressure capture was also reprojected to v2: two selected events remain,
records_truncated=true, and producer omission/loss stay unknown. Focused local tests passed 35/35, and raw-to-normalized independent replay plus hashes were checked.An additional local pure projection now groups only producer-assigned
call.idwithin each script stream, retaining batch event indexes and coverage. Saved-evidence replay yielded three distinct paired observations with 4/3/4 selected basic blocks for the overlapping run; three open calls for the deliberate unload; and one paired observation in the truncated capacity-pressure batch, still marked truncated with producer loss unknown. Contradictory thread/parent/name/action records are not silently paired. Focused tests for this projection passed 6/6; typecheck, compile, module boundaries, formatting and lint passed. ETW markers and current synthetic eBPF records without call IDs remain unattributed. This only reconstructs selected observations, not a complete execution path.This is still an isolated prototype. It adds no public CLI/MCP operation, attachment or script authority, bundled agent, or whole-program-flow claim. Is an opt-in read-only projection of explicit versioned events already present in
instrument-with-fridaraw Evidence within REA scope? I will keep the integration pending until that boundary is decided.