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

Release files / ofrak_patch_maker-4.1.0.tar.gz

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

Security for ofrak-patch-maker 4.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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