This is the home of the bento-autobentifier, a tool for automatically partitioning existing binaries into bento-boxes while minimizing the overhead of box switching.
!! Note: This project is an expirement with no promise of support. Use at your own risk. !!
Bento-boxes are independently-linked, memory-isolated pieces of code that are designed to work together. You can think of them as a light-weight alternative to processes for microcontrollers.
For more information on this idea, see the bento-linker.
This tool is an experiment in taking an existing binary, and generating those code boundaries automatically. Effectively allowing you to augment an existing program with Bento-box's memory isolation runtimes without additional programmer intervention.
pip install -r requirements.txt
Separately install Networkx-METIS: https://github.com/networkx/networkx-metis/
If you are building on MacOS there is a workaround to install via conda. conda install -c conda-forge networkx-metis
This section describes a local build and installation of RetDec. Instructions for Docker are given in the next section.
- A C++ compiler and standard C++ library supporting C++17 (e.g. GCC >= 7)
- CMake (version >= 3.6)
- Git
- Perl
- Python (version >= 3.4)
- autotools (autoconf, automake, and libtool)
- pkg-config
- m4
- zlib
- Optional: Doxygen and Graphviz for generating API documentation
On Debian-based distributions (e.g. Ubuntu), the required packages can be installed with apt-get
:
sudo apt-get install build-essential cmake git perl python3 autoconf automake libtool pkg-config m4 zlib1g-dev upx doxygen graphviz
On RPM-based distributions (e.g. Fedora), the required packages can be installed with dnf
:
sudo dnf install gcc gcc-c++ cmake make git perl python3 autoconf automake libtool pkg-config m4 zlib-devel upx doxygen graphviz
On Arch Linux, the required packages can be installed with pacman
:
sudo pacman --needed -S base-devel cmake git perl python3 autoconf automake libtool pkg-config m4 zlib upx doxygen graphviz
- Microsoft Visual C++ (version >= Visual Studio 2017 version 15.7)
- CMake (version >= 3.6)
- Git
- Active Perl. It needs to be the first Perl in
PATH
, or it has to be provided to CMake usingCMAKE_PROGRAM_PATH
variable, e.g.-DCMAKE_PROGRAM_PATH=/c/perl/bin
. Does NOT work with Strawberry Perl or MSYS2 Perl (you would have to install a pre-built version of OpenSSL, see below). - Python (version >= 3.4)
- Optional: Doxygen and Graphviz for generating API documentation
Packages should be preferably installed via Homebrew.
- macOS >= 10.14
- Full Xcode installation (including command-line tools, see #425 and #433)
- CMake (version >= 3.6)
- Git
- Perl
- Python (version >= 3.4)
- autotools (autoconf, automake, and libtool)
- Optional: Doxygen and Graphviz for generating API documentation
We opt to install retdec locally and pass this to PYTHONPATH later
- Clone the repository as a submodule:
git submodule init
git submodule update
- Linux:
mkdir build && cd build
cmake ../external/retdec -DCMAKE_INSTALL_PREFIX=../bin
make -jN
(N
is the number of processes to use for parallel build, typically number of cores + 1 gives fastest compilation time)make install
- Windows:
- Open a command prompt (e.g.
cmd.exe
) mkdir build && cd build
cmake ../external/retdec -DCMAKE_INSTALL_PREFIX=../bin -G<generator>
cmake --build . --config Release -- -m
cmake --build . --config Release --target install
- Alternatively, you can open
retdec.sln
generated bycmake
in Visual Studio IDE
- Open a command prompt (e.g.
- macOS:
mkdir build && cd build
cmake ../external/retdec -DCMAKE_INSTALL_PREFIX=../bin
make -jN
(N
is the number of processes to use for parallel build, typically number of cores + 1 gives fastest compilation time)make install