binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Create UI for adding/modifying binary segments/sections

Open huntergregal opened this issue 5 years ago • 11 comments

Tag: Enhancement / request

Would be nice to have a better way through the UI to add segments to the binary. Would be useful when analyzing ROMs and firmware. One chance when opening the file to plug in a json string of segments is not ideal.

huntergregal avatar May 22 '20 16:05 huntergregal

Thanks, this has been on the roadmap for a while as a goal just didn't have a ticket.

psifertex avatar May 22 '20 16:05 psifertex

Thanks for the issue to track this. As you know the JSON strings for segments/sections in open with options is temporary :) The UI will follow.

bpotchik avatar May 22 '20 16:05 bpotchik

Sidebar widget added in 3.1.3564-dev Issue tracking open with options UI is #3285

negasora avatar Jul 18 '22 21:07 negasora

Re-opening this pending three final related tasks:

  • [x] User documentation for the new UI (if relevant)
  • [x] API documentation for any APIs added (if relevant)
  • [x] Unit tests for new APIs

psifertex avatar Jul 19 '22 13:07 psifertex

We also need a warning of some kind (either on the "Add/Edit Segment" dialog boxes, or as an additional pop-up dialog box that has to be OK'd) that explains the current limitation of us not being able to add Segments/Sections that don't map to things within the file stored in the database. Peter brought this up last week and it's a legitimate concern: A customer just asked about it in our community Slack. We should make sure users understand, up-front, that this is a current limitation.

fuzyll avatar Jul 19 '22 15:07 fuzyll

One feature that seems to be missing is the ability to rename sections originating from the file loader. I have a PE with unlabeled sections (an artifact of unpacking) and I'd like to be able to just rename the loaded sections in BN without having to use third-party tools to achieve it.

image image

alexrp avatar Jul 22 '22 19:07 alexrp

That's due to a limitation of the loaders right now - auto sections are created regardless of whether or not they were removed or renamed (and thus changed to user sections). So renaming auto sections (and modifying auto segments at all) is disabled for now until this behavior is fixed to prevent confusion

negasora avatar Jul 22 '22 20:07 negasora

Another thing: It would be nice if double-clicking the addresses/offsets in the memory map UI would navigate to the section start/end, like how the section/segment list at the top of the binary view works.

alexrp avatar Jul 24 '22 17:07 alexrp

It does in some cases, but when I just checked I was able to find other cases where navigation fails. Thanks, I'll fix that behavior.

negasora avatar Jul 24 '22 17:07 negasora

I just tried on ntdll.dll, and none of the addresses/offsets work for me, fwiw.

alexrp avatar Jul 24 '22 17:07 alexrp

Double click issue mentioned here was tracked on #3328 and resolved in builds >= Build 3.1.3589

0cyn avatar Aug 03 '22 04:08 0cyn

Make it easier to create sections from a segment, either (or both):

  1. Pre-populate the Add Section dialog with the selected segment's bounds, or
  2. Add a "Create Section" right-click menu option to the Segments pane that opens the Add Section dialog populated from the current segment

Also, maybe a way to create a section for the parts of a segment that don't have a section defined on them. Not sure the best verbiage for that... "Create Section in Gap" or something?

galenbwill avatar Aug 22 '22 16:08 galenbwill

Widget exists and docs are added, tracking improvements in #3425

negasora avatar Aug 22 '22 20:08 negasora