Vector35 / Vector35/binaryninja-api

Parse more load_command in MachO files

Open
#5,690 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: BinaryViewType Effort: Trivial File Format: Mach-O Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

A mach-o binary is composed by an array of load commands that are parsed successfully by bninja. However there're some unique load command for which you don't implement any custom structure for.

This issue would propose:

  • create a custom structure 'dynamic' where you can include:
struct load_command __macho_load_command_[N] {
  enum load_command_type_t cmd = LC_SAMPLE;
  uint32_t cmdsize = 0x20  
  bytes buffer[cmdsize]
}

OR dedicate two/three days (or less, don't know how much time it would take) to document the most used load commands and write all the custom structs for it.

Current load commands not supported (bninja applies the default load_command structure):

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 by reviewing the existing Mach-O load-command parsing in bninja and the LC_CODE_SIGNATURE documentation linked in the issue. Compare the unsupported commands listed—LC_BUILD_VERSION, LC_SOURCE_VERSION, LC_LOAD_DYLINKER, and LC_CODE_SIGNATURE—with the current default load_command handling. Done means either a documented dynamic structure or custom structures for the agreed set of commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
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.