Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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 toolchain.conf, which is bundled with this package. 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.1.0rc2

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.1.0rc2
File Size Uploaded
ofrak_patch_maker-4.1.0rc2.tar.gz 42.9 kB Details

Release files / ofrak_patch_maker-4.1.0rc2.tar.gz

Download URL ofrak_patch_maker-4.1.0rc2.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d00861a12a5ec7037de4b071adb8a8c1ea08d1f70aad37dfd9e5032caa53192b
BLAKE2b-256 checksum
How to use checksums
a9627613d33aa3ca820635c2cbc12831f613ad1344f90b1665f6c04ebc66fe20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

4.1.0

1 release file

This release

4.1.0rc2 This release

1 release file

4.0.2

1 release file

4.0.1

1 release file

4.0.0

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