Vector35 / Vector35/binaryninja-api

Library Function Symbol Does Not Show When Analysis is Headless

Open
#7,840 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 5.3.8837-dev Ultimate, d2d9934a
  • OS: macos
  • OS Version: 26.2.0
  • CPU Architecture: arm64

Bug Description:
If a BNDB is generated headless, the _DllMainCRTStartup LibraryFunctionSymbol does not show in the Symbols pane when opening this database in the GUI. The symbol is there in both cases, but it will not show when the database is opened later in the GUI. Below I have shown the symbol list at that location showing the expected symbol, but check the screenshot (or a bndb you make yourself) and the Symbols pane does not show this symbol for some reason.

Steps To Reproduce:
In the following pf is just the raw file in the project.

bv = binaryninja.load(pf)
tdp = pathlib.Path(td)
dest = tdp.joinpath(f'{pf.name}.bndb')
bv.create_database(dest)
bv.file.close()
p.create_file_from_path(dest, f, dest.name)

Expected Behavior:
The BNDB created in the GUI should be the same as one created headless.

Screenshots:
Created in GUI:

Image

Generated headless:

Image

Binary:
Example Database Generated Headless: geometric night breaks personally
Original Binary: sun quartz bootstraps equally

Additional Information:
Symbol List GUI:

>>> bv.get_symbols(current_function.start)
[<FunctionSymbol: "_start" @ 0x1801d4880>, <LibraryFunctionSymbol: "_DllMainCRTStartup" @ 0x1801d4880>]

And Headless:

>>> bv.get_symbols(current_function.start)
[<FunctionSymbol: "_start" @ 0x1801d4880>, <LibraryFunctionSymbol: "_DllMainCRTStartup" @ 0x1801d4880>]

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

Reproduce the discrepancy with the Python entry points binaryninja.load, create_database, and get_symbols, comparing a headless BNDB with one created in the GUI. Trace how the Symbols pane loads LibraryFunctionSymbol entries and verify that the headless database displays _DllMainCRTStartup consistently with the GUI-created database.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
reverse-engineering, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.