Vector35 / Vector35/binaryninja-api
Do something about repetitive names?
Nobody has claimed this yet.
- 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?
Consider this function:
It implements a compare operation for a VM in https://crackmes.one/crackme/67f9bdc38f555589f3530a85.
In reality, vm_flags is one-hot: either bit 2 is set (operA < operB), bit 1 (operA != operB), or bit 0 (operA == operB). (Ignore everything but the low 3 bits, the rest is just there for misdirection.)
However, I misread it as a bitmask where bit 2 and bit 1 could be set simultaneously. This cost me two days and an untold amount of hours of wasted SMT solver time.
Humans are notoriously bad at distinguishing opaque and distinct but similar sequences of characters. It's a well-known issue. It also gets worse if mutation is involved (I'm using Pseudo Rust where BN very nicely adds mut qualifiers, but in this case both rax and rax_2 are mutable). I'm sure I'm not the only one to be tripped up by this.
One possible solution is to add a mode to the auto-namer that gives variables with distinct random English words, or something similarly distinct, like it's done by what3words, bitcoin wallets, and so on, all of which hit the same problem.
Alternately, I wonder if in addition to highlighting the background of variables with the same name (as it does currently), BN could dim the foreground of variables with similar but distinct name. This doesn't seem to add that much value on top of the existing functionality, although it might help train users to click on variables to track uses of the same identifier by visually emphasizing the other confusable identifiers.
What do you think?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by locating the auto-namer and the existing same-name highlighting, then clarify whether the scope is distinct-word naming or similar-name dimming. Done requires a selected approach with concrete behavior and acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100