Skip to content

A library for editing PE files with full .NET metadata support

License

Notifications You must be signed in to change notification settings

ds5678/AsmResolver

 
 

Repository files navigation

AsmResolver

Master branch build status Nuget feed License: MIT Discord

AsmResolver is a library for reading, modifying and reconstructing Portable Executable (PE) files. It supports PE images running natively on Windows, as well as images containing managed (.NET) metadata.

AsmResolver is released under the MIT license.

Main Features

AsmResolver has a lot of features. Below is a non-exhaustive list of the highlights:

  • Create, read, modify, write and patch PE files.
    • Full access to sections, data directories and their interpretations.
    • Import Address Table (IAT) reconstruction and trampolining.
    • Full control over the layout of the final PE file output.
  • Rich support for various Win32 resource types.
  • Rich support for .NET metadata with an intuitive API similar to System.Reflection.
    • Managed, native and dynamic method body support.
    • Easy metadata importing and cloning.
    • Managed resource file serializers and deserializers.
    • Support for AppHost / SingleFileHost bundles.
    • Support for ReadyToRun (R2R) binaries.
  • Rich read support for PDB and PortablePdb symbols.
    • Fully managed cross-platform API (No DIA or similar required).
  • .NET 3.5 compatible.
  • Cross-platform (Windows and *nix, .NET standard 2.0 and Mono compatible).
  • Documented.
  • Unit tested.

Documentation

Support

Binaries

Stable Builds:

Nightly Builds:

Branch Build status
master Master branch build status
development Development branch build status

Compiling

The solution can be built using the .NET SDK or an IDE that works with it (e.g., Visual Studio and JetBrains Rider). The main packages target LTS versions of various .NET runtimes (.NET 3.5, .NET Standard 2.0, .NET Standard 2.1, .NET Core 3.1, .NET 6.0, .NET 8.0).

To build the project from the command line, use:

$ dotnet build

To run all tests, use:

$ dotnet test

For running the tests successfully, you will need to have additional versions of .NET installed (including STS versions or versions declared EOL), as the unit tests verify reading binaries targeting various .NET runtimes. To run the tests successfully on MacOS and Linux, mono and wine are expected to be installed as well.

Contributing

Acknowledgments

AsmResolver started as a hobby project but has grown into a community project with various contributors. Without these people, AsmResolver would not have been where it is today!

  • Special thanks to all the people who contributed directly with code commits or monetarily via GitHub sponsors.

  • Special thanks to the people at @MonoMod for helping with .NET 3.5 compatibility.

  • Another big thank you to all the people that suggested new features, provided feedback on the API design, have done extensive testing, and/or reported bugs on the issue board, by e-mail, or through DMs.

If you feel you have been under-represented in these acknowledgments, feel free to reach out.

About

A library for editing PE files with full .NET metadata support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.9%
  • Other 0.1%