# BARF

> Python binary analysis framework that loads ELF and PE programs, disassembles 32- and 64-bit x86 and 32-bit ARM code with Capstone and translates it into the REIL intermediate language, so its analyses do not depend on the source architecture. Modules recover control-flow and call graphs, emulate REIL and turn code fragments into Z3 or CVC4 formulas for checking constraints on registers and memory; release 0.6.0 added basic symbolic execution. Bundled command-line tools recover CFGs and call graphs, replay x86 execution traces and search, classify and verify ROP gadgets.

- Type: Tool
- Targets: Binary
- Category: Binary analysis libraries
- Relationship: Foundation tool
- Sources reviewed: 2026-10-27
- Added to the catalog: 2026-11-03
- Original resource: <https://github.com/programa-stic/barf-project>
- Primary source: <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/README.md>
- Catalog page: <https://awesomerea.org/resources/barf/>
- Record JSON: <https://awesomerea.org/resources/barf/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/barf/index.md)

## Requirements & limits

- Inactive since 2019: the reviewed master commit, dated 2019-11-24, is tagged v0.6.0 and is the last commit; 0.6.0 is also the newest PyPI release of barf. GitHub does not mark the repository archived, and it has tags but no GitHub release entries, although the README links a v0.6.0 release page. setup.py classifies it as alpha, and the README still calls it under development.
- setup.py and the Travis CI configuration target Python 2.7 and 3.6, with Python 3 support added in 0.6.0. The README says all packages were tested on Ubuntu 16.04 x86_64, and the Dockerfile installs it on Ubuntu 18.04 through Python 2 pip. Dependencies include Capstone 3.0.5rc2+, pefile, pyelftools, networkx, pydot and pyparsing, plus at least one of the Z3 or CVC4 solvers; Graphviz is needed for graph output and PyAsmJIT for some tests.
- Binaries come from the analyst. The repository bundles small sample binaries built from included C sources under examples/misc/samples and tests, and two challenge binaries for its worked examples: Flare-On 2015 challenge #2 (examples/flareon-2015/2/bin/very_success) and kao's toy project (examples/kaos-toy-project/bin/toyproject.exe). The Sphinx manual is in Spanish and refers to an install.sh script that is not present at the reviewed commit.
- BSD 2-Clause license, copyright 2014 Fundación Dr. Manuel Sadosky. The README describes checking instruction translations by running code natively through PyAsmJIT and in the REIL emulator and comparing the final contexts.

## Primary sources

1. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/README.md>
2. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/README.md#L196-L320>
3. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/setup.py>
4. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/CHANGELOG.md>
5. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/.travis.yml>
6. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/Dockerfile>
7. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/doc/manual/source/installation/index.rst>
8. <https://github.com/programa-stic/barf-project/tree/9547ef843b8eb021c2c32c140e36173c0b4eafa3/examples>
9. <https://github.com/programa-stic/barf-project/blob/9547ef843b8eb021c2c32c140e36173c0b4eafa3/LICENSE>
10. <https://pypi.org/project/barf/0.6.0/>

## More in Native binaries

- [rabbitizer](https://awesomerea.org/resources/rabbitizer/index.md) · Tool
- [ghidrecomp](https://awesomerea.org/resources/ghidrecomp/index.md) · Tool
- [Vivisect](https://awesomerea.org/resources/vivisect/index.md) · Tool
- [r2pipe](https://awesomerea.org/resources/r2pipe/index.md) · Tool
- [GREASE](https://awesomerea.org/resources/grease/index.md) · Tool
- [PLASMA](https://awesomerea.org/resources/plasma-disassembler/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
