Vector35 / Vector35/binaryninja-api

Expose either `project_binary_id` or the Database without needing to load the BinaryView for the BNDB file

Open
#7,550 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: API Component: Database Effort: Trivial 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?
Expose either the project_binary_id value or the Database (so I can get to that value) without needing to load the binaryview first to get the Database.

Currently the chain is as follows: bv -> database -> read_global('project_binary_id')

Is your feature request related to a problem?
Getting the project_binary_id in the project view for multiple bndb files is slow when having to load the binary view for each one just to get this value (the more bndb files in the project, the longer it takes). Direct SQL is much faster, but it's not recommended to query the bndb directly.

Also, loading the binaryview even with update_analysis=False can cause modifications to the bndb file (like schema version changes in an upcoming release) that I'd like to avoid. I'm looking to avoid this as I don't want to cause any confusion by the user of the plugin that may lead them to think their bndb file(s) were changed somehow - even though the analysis should not change when loading with update_analysis=False.

Are any alternative solutions acceptable?
Query the sqlite database directly (just not recommended).

Additional Information:
Ideally, need this exposed via the Rust API.

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 with the Rust API's Database entry point and the existing bv -> database -> read_global('project_binary_id') path described in the issue. Define an API that retrieves the project_binary_id or Database from a BNDB file without loading its BinaryView; done means the value is available without direct SQLite queries or unintended BNDB modifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust, sqlite
Domain
api, databases, reverse-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.