mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #4986] [Feature] Decode protobuf and gRPC bodies in inspect-web-network-capture #3082
Closed
opened 2026-10-31 00:36:16 +00:00 by bsakaguchi
·
4 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#3082
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 @KJLavender on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4986
Before submitting
Area
Evidence, artifacts, or reconstruction
Current limitation
inspect-web-network-capturekeeps binary bodies as base64 plus SHA-256. That's the right thing to keep, but for protobuf traffic it's also where the trail ends, and "what does this app actually send to its server" is a pretty common question. gRPC-web and plainapplication/x-protobufAPIs show up a lot in web and mobile apps.To check, I wrote a tiny HAR by hand (below, fully synthetic). It has one gRPC-web response and one raw
application/x-protobufresponse, both carrying the same 14-byte message: field 1 = 150, field 2 = "hello", field 3 = a nested message with field 1 = 1. For the gRPC-web record, REA 6.5.0 returns:There's nothing about the 5-byte gRPC frame header or the fields inside. The raw protobuf record looks the same.
I saw #364 (gRPC/Protobuf capture) is closed, but I couldn't find protobuf decoding in the current capture tools, and the SAZ section of the capture docs says gRPC message bytes are kept opaque. What I'm asking for here is narrower than #364: decode bytes that are already in a capture, with no live capture or interception. If this is tracked somewhere else, feel free to close it as a duplicate.
Desired outcome and success criteria
For records with a protobuf content type (
application/grpc,application/grpc+proto,application/grpc-web+proto,application/grpc-web-text,application/x-protobuf), or ones I select explicitly:grpc-statusand so on).application/grpc-web-textbodies are base64 text, so they need one more decode before the split.protoc --decode_rawdoes: field numbers, wire types, varints, length-delimited values, with byte offsets back into the body..protofile or descriptor set when the user has one. If the schema and the raw decode disagree (the schema says string but the bytes also parse as a nested message, say), show both side by side instead of quietly picking one.For the sample below I'd expect something like: one data frame, 14 bytes, uncompressed. Field 1 is varint 150, field 2 is 5 bytes that read as UTF-8 "hello", and field 3 is 2 bytes that parse as a nested message {1: 1}. For comparison,
protoc --decode_rawshould print this for the same 14 bytes:Expected interaction with targets
Read existing files or captured data
Verification available so far
I can suggest a sample or manual check
Verification details (optional)
The HAR below plus the expected output above. The gRPC-web body is
000000000e089601120568656c6c6f1a020801in hex.grpc-demo.har (synthetic)
Alternatives considered
Copying the base64 out and running
protoc --decode_rawor CyberChef by hand. That works for one body, but you lose the link back to the record and the byte offsets, and you have to repeat it for every request.Possible direction
A decoded view next to
binary_fields, probably only for selected records (--recordalready exists) so normal output stays small.Edit: added
application/grpc-web-text(and nativeapplication/grpc) plus the raw-vs-schema point, from the comment below.@XinwangTao commented on GitHub (Oct 18, 2026):
Agreed this is the right slice: keep the retained base64 as the source of truth and add a decoding view on top, rather than widening #364 into live interception. The decode_raw-style output (field numbers, wire types, varints, length-delimited with byte offsets) is exactly the right level of certainty — without a schema, wire format is the only layer you can decode unambiguously, and marking length-delimited fields as inferred (string/bytes/nested/packed) is the honest thing to do. A few concrete notes: (1) gRPC-web framing needs the 1-byte compressed flag + 4-byte length stripped first, and trailer frames carry grpc-status/grpc-message — worth decoding those rather than dropping them; (2) the content-type set to probe is broader than the two mentioned: application/grpc-web+proto, application/grpc-web-text (base64-encoded), application/x-protobuf, and occasionally text proto; (3) when a caller-supplied descriptor set is used, wire-type-2 fields can disagree with user schemas (string vs nested message vs packed) — suggesting showing both raw decode and schema decode side by side, or an explicit flag to choose. Gating the decoded view behind the existing --record selector keeps default output small, which is a good default.
@jimtje commented on GitHub (Oct 18, 2026):
The flow will necessarily differ depending on whether you have access to the client or not. If the client is available, the definitions (at least the types but usually more) will be either a) assets, with standard Google typing as the base, or b) embedded, in which case you can extract pretty much the literal original .proto files from java, apk packages, decrypted ipa packages or assets from said packages, c#, c++, or binaries. I'm not sure if the scenario where one intercepts straight up messages that are definitely protobuf but have no access to either client or server at all actually is even a realistic one. There are tools that fuzz endpoints but those are loud and not usually effective unless you have a lead and hence a wordlist. The client, if nothing else for debugging, almost always have some if not all of the schema somewhere. This extends out to static files that are serialized in the same way - the definition is in the clients there too, even if the end goal does not involve transmission. This was and I guess to an extent remains common for crypto wallets derived from the BitcoinJ walletss.
I would not simply guess by decoding the message beccause without context you need to at least run enum via the Google proto base schemas and unless it's embedded in the message, which are pretty rare, it's just hunches. Those can be completely off. Sometimes the messagegs are hashes, good luck figuring out those without the schema, and those are actually quite common. After that traditionally json has been the norm but python dataclasses are far easier to work with when you don't have the schema applied yet. Also the same library decode and encode, generally.
I have a written (slightly old, but it works without issue) implementation of a python decode/deserializer of static cryptocurrency files that covers All bitcoinj-derived formats and coinomi in the walletlib repo on my page. This is an IOS one-pager that extracts from .ipas: https://github.com/riyadmondol2006/iOS-Protobuf-Extractor/blob/main/ios_protobuf_extractor.py
Replacement for Google's protoc tool: https://github.com/betterproto/python-betterproto2 as it generates dataclasses from the getgo. There are other libraries but I've preferred this since using it to decode Tinder's gRPC/protobuf login scheme during a baseball rain delay (and spent 2 years fielding questions about it before finally finding someone to take it off my hands, that was bad sincce I don't use Tinder and the sheer number of people who wanted to run Tinder bots was... much higher than I could have expected).
c#: https://github.com/Xpl0itR/protodec can't really test, on a mac, but in theory it should work.
java, apk, c++: https://github.com/marin-m/pbtk CLI tools only. No clue how the GUI works but the cli does the job quite well.
Raw hex decode: https://github.com/pawitp/protobuf-decoder message only, some are obvious, some are not, some are encrypted
Blackboxproto is fairly popular but it essentially still is taking what it appears to contain + format = what it is. That works if you're getting strings and nothing but. That isn't common and without the schema as the context you literally don't need it as you can enumerate types with the stock files Google already posts and is in almost every app that uses profobuf, and the original files would be in the correct hierarchy in terms of folders/levels of granularity. That data isn't kept in messages but are sometimes very helpful and prevents you from ending up with a folder full of json files that you havve to put back together but you have neither all the king's men or all the king's horses and even if you did, do they know a 32 bit int versus a 64 bit int? The schema does. Humpty Dumpty would be something else if he is read as 32 bit instead of 64 and vice versa. You can obviously just do both but it usually doesn't do the trick since the output is valid, but still incorrect.
If it's encrypted, it's almost always RSA. No guarantees that the key would be easy to find, but I've never seen it not at least first pass RSA encrypt and then maybe something else that would require pyopenssl or the like.
I can't write as fast as Claude but I'm pretty sure that Claude trained off my code since I CC0 or public domained everything I wrote in the last 10 years and it's part of every crypto recovery and from 2021 to 2023, every Tinder bot in Python, apparently. Sorry about that if you got conned, it was supposed to be a joke to amuse a groupchat. At the very least this will save you some tokens, but really it's always the unforseen pitfalls of fuzzing blind - noisiness tends to be the first death knell to the project. Tinder literally didn't do anything for a year and didn't put in serious remediation for 18 month, and the remediation was... still the same format. They ended up ripping out their entire login about 6 months after I passed the project off. Somehow my account didn't get banned even though throwaway email with api access and it had TS Eliot's photo on it.
@KJLavender commented on GitHub (Oct 20, 2026):
Fair points, and they match what I saw when I tried a rough raw decoder locally: on a real Chrome
.pbfile the structure came out right (it lined up with Chromium's public.proto), but nothing tells you a field is calledextensionor whether a varint is int32 or int64. So I'd reorder this: decode with a schema recovered from the client first (embedded descriptors, generated code, or a caller-supplied.proto), and keep the raw decode as the fallback and as a way to find which messages and field numbers to look for. One caveat: lite-runtime builds (Chrome, a lot of Android apps) don't embed descriptors, so sometimes raw decode is all you have until you dig through the generated code.@XinwangTao commented on GitHub (Oct 20, 2026):
#5031 已合并,wire-format 级解码作为无 schema 时的基线视图很合适。后续如果考虑增强,建议支持用户侧传入 .proto/.bin 描述文件做字段名映射(在 wire 解码之上叠加 schema 视图),正好覆盖 jimtje 提到的"有 client 定义文件"场景,同时保留现有 base64+SHA-256 作为真相来源。gRPC-web 的 trailer 帧里 grpc-status/grpc-message 也可以单列展示,方便排查 RPC 错误状态。