Automatically recognize and create C++ structures

Open
#1,163 7 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start with the attached simple C++ program and binaries for i386, x86-64, ARM, MIPS, and PPC, then examine how Binary Ninja detects vtables in read-only data and instantiates their structs. Done means users can recognize the generated C++ structures and create or view their fields through the Types window or another documented interface.

Written by the indexing model from the issue text.

Description

Component: Core Effort: High Impact: High

When reversing C++, BinaryNinja detects the use of virtual function tables (vtables) in the read-only data section (.rodata or .data.rel.ro or whatever) and instantiates an instance of the vtable struct. However, I can't figure out how to create fields within this struct, as the type doesn't show up in the Types window, and I'm not sure of another way to add fields. I'm attaching a simple C++ program along with binaries for i386, x86-64, arm, mips, and ppc.

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

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.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.