Skip to main content

OFRAK

OFRAK (Open Firmware Reverse Analysis Konsole) is a binary analysis and modification platform that combines the ability to unpack, analyze, modify, and repack binaries.

Package: ofrak_patch_maker

OFRAK
└───ofrak
└───ofrak_type
└───ofrak_io
└───ofrak_patch_maker  <-- //YOU ARE HERE//
│   └───binary_parser   // Interface and implementations for class parsing symbols & sections from a binary
│   └───toolchain       // Interface and implementations for build toolchains
│   └───model.py
│   └───patch_maker.py
└───ofrak_tutorial

This package contains the OFRAK PatchMaker, a powerful tool for applying source-code patches to binary files.

PatchMaker is a Python package for building code patch blobs from source and injecting them into an executable OFRAK resource. Once a patch is applied to a Resource, it may be re-packed with OFRAK the same way as if only a string modification were applied.

PatchMaker takes additional steps beyond the typical C software build process to ensure that new code and data, provided in C/asm source or binary form, land where they are supposed to and that linking against existing code and data in the target binary is easy.

Think of it as a way to compile custom code using the binary-under-analysis as a library. Normally a loader is responsible for mapping external symbols correctly into the loaded executable's memory space. With PatchMaker the process is inverted: once the patch is compiled, it can be injected into the host binary with the patch's external symbols correctly linked to the host's internal symbols, without involving a loader.

For more information, check the user guide in the OFRAK docs as well as the code references for PatchMaker and related classes.

Dependencies

This Python package only includes the Python code for the PatchMaker and does not include any of the toolchains which the PatchMaker utilizes! These would have to be installed individually and added to a toolchain.conf, which by default is placed in /etc. An example of the toolchain.conf can be found here, and examples of how to install the toolchains can be found here.

Testing

This package maintains 100% test coverage of functions.

The tests for ofrak_patch_maker are not distributed with this package. If you wish to run the tests, download the OFRAK source code and install/run the tests from there.

License

The code in this repository comes with an OFRAK Community License, which is intended for educational uses, personal development, or just having fun.

Users interested in using OFRAK for commercial purposes can request the Pro or Enterprise License. See OFRAK Licensing for more information.

Documentation

OFRAK has general documentation and API documentation, which can be viewed at https://ofrak.com/docs.

Metadata

Release files for ofrak-patch-maker 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ofrak-patch-maker 4.0.0
File Size Uploaded
ofrak_patch_maker-4.0.0.tar.gz 36.5 kB Details

Release files / ofrak_patch_maker-4.0.0.tar.gz

Download URL ofrak_patch_maker-4.0.0.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5184caf8780fe4c991416e437b64c0b78dc6ef1cbabcd7c2a73e8af5fb758f6e
BLAKE2b-256 checksum
How to use checksums
d166deb72fb9aaef4b9d2d6055f4e71056aef24826a606b76999a0549bb786af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

4.1.0

1 release file

4.0.2

1 release file

4.0.1

1 release file

This release

4.0.0 This release

1 release file

3.0.0

1 release file

2.0.0

1 release file

1.0.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page