trailofbits / trailofbits/pe-parse

RIIR

Open
#186 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
C++
Stars
911
Forks
171
PR merge metrics
No merged PRs in 30d

Description

I think it's time to consider rewriting this project in Rust: it receives very little maintenance or novel feature development, has had a few memory corruption vulnerabilities discovered through fuzzing over the years, and has a relatively simple C API that could be exposed from a Rust core.

In other words: from an external users' perspective, all that would change is the C API (we'd have to make breaking changes to accommodate internal changes). External users would not need to know Rust.

If we decide to do this, we should do it as a major breaking change, with a new major (3.x) release series.

As part of a potential rewrite, we should reuse an existing high-quality Rust PE parser, rather than writing our own. Two options:

A rewrite here would also have downstream repercussions for a few of our projects, including winchecksec and uthenticode. It's my opinion that those repercussions would be largely positive, although it's still churn that would need to be performed. It would also be a strong motivating point for rewriting some of those projects in Rust as well.

CCing for opinions: @ekilmer @yardenshafir @ret2libc @alessandrogario

Contributor guide

Open the contributing guide

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

Review the existing C API and compare the proposed goblin and object Rust PE parsers first. Then assess the major-version and downstream impact on winchecksec and uthenticode; done would require a decided rewrite scope, parser choice, compatibility plan, and migration work.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, rust
Domain
reverse-engineering, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.