Vector35 / Vector35/binaryninja-api

Enable the "Create Types from C Source" to overwrite System/Library Types

Open
#4,999 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Type Parser Effort: Low Impact: Medium
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

In the Create Types from C Source Dialog, if a type is already defined, there is a warning and the possibility of overwriting the type with the new definition.

If the type is defined by a System or Library, this option is not given, which can be very inconvenient if one tries to create a lot of types with many fields that depend on each other.

image

image

Repro

  • load the tm_vuln.sys into Binja (ensure that the PDB gets applied)
  • try to import the types from the ktmtypes.h file

Many structs that are defined by the PDB or System are empty (just padding) and are not useful. It is a lot of work if one needs first to define the types required by these "padding types" and then fill them in separately. Another way would be to rename the old types, import the new types, and then change all occurrences of the old and new types (that is what I did), but it also is not a nice way of doing things.

Files

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 issue in the Create Types from C Source dialog using tm_vuln.sys, its applied PDB, and ktmtypes.h from files.zip. Trace the dialog and type-import handling to see how System or Library definitions are treated; done means an existing System or Library type can be explicitly overwritten with the imported definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering, tooling
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.