Vector35 / Vector35/binaryninja-api

Run output through `rustfilt` (or similar)

Open
#5,218 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Demangler Effort: Low Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

What is the feature you'd like to have?

I am trying to run some Rust-compiled binaries through BinaryNinja (via Dogbolt), but, while some of the "standard" symbols from the Rust library get unmangled, "user-defined" symbols don't (and also some standard ones as well!).

I hope this links works, but here's an example:

You can see that some symbols are unmangled (e.g., std::io::stdio::_print::h9ced0fe1fdc237eb), but others (e.g., _RNvMs0_NtCsf8BuoUQGJw9_4core3fmtNtB5_9Arguments6new_v1Cs3D4dQeFb3sN_4rust) aren't.

Examples:

  • _RNvMs0_NtCsf8BuoUQGJw9_4core3fmtNtB5_9Arguments6new_v1Cs3D4dQeFb3sN_4rust == <core::fmt::Arguments>::new_v1
  • _RNvCs3D4dQeFb3sN_4rust5quack == rust::quack

Is your feature request related to a problem?

No; this is a "quality of life" improvement

Are any alternative solutions acceptable?

I can copy the output out of Dogbolt and run in through rustfilt myself.

Additional Information:

I originally reported this "idea" here:

I am happy to share binaries if it helps (but I believe that tool vendors on Dogbolt already have access to the binaries I submit).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Binary Ninja's symbol demangling and output path, then compare its handling with the Rust symbols in the linked Dogbolt example. Done means Rust user-defined and standard symbols such as rust::quack and <core::fmt::Arguments>::new_v1 are displayed in readable form, with an appropriate validation example.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
reverse-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.