Setting Up Rerius
Level: 0 - Foundation Prerequisites: 01_what_is_binary_analysis.md What You Will Learn: How to install Rerius on Linux, macOS, and Android.
Installation Overview#
Rerius has zero external dependencies. You only need a C compiler and GNU make. The build compiles all source files and produces a single executable called rerius.
Linux#
git clone https://github.com/ECLS-Studio/rerius.git
cd Rerius
make
The build takes under a minute. When it finishes you will see the Rerius banner and a message confirming the build succeeded. The rerius binary is in the current directory.
Add it to your path for convenience:
sudo cp rerius /usr/local/bin/
Or keep it in the Rerius directory and call it as ./rerius.
macOS#
Install the Xcode command line tools if you have not already:
xcode-select --install
Then build exactly as on Linux:
git clone https://github.com/ECLS-Studio/rerius.git
cd Rerius
make
Rerius uses arch/arm64_macos.S on Apple Silicon and arch/x86_64_macos.S on Intel Mac. The Makefile selects the correct file automatically.
Android with Termux#
Termux provides a Linux-like environment on Android without root. Install the required packages first:
pkg install nodejs clang make git
Then clone and build:
git clone https://github.com/ECLS-Studio/rerius.git
cd Rerius
make
The build works the same way as on Linux. The resulting rerius binary runs natively on ARM64 Android.
Verifying the Installation#
Run the help flag to confirm everything is working:
./rerius -h
You should see a list of all available flags. If you see this, the installation succeeded.
Try analyzing a system binary:
./rerius -l /bin/ls
On Linux this lists the ELF sections of /bin/ls. On macOS it lists the Mach-O sections.
Building the JavaScript Addon#
If you want to use the JavaScript API (covered in Level 3), you also need to build the native Node.js addon:
make
This produces js/rerius.node. You can also install from npm directly, which builds the addon automatically:
npm install rerius
Directory Layout After Building#
Rerius/
rerius the CLI binary
src/ C source files
include/ header files
arch/ platform assembly stubs
js/
rerius.node the Node.js native addon (after make js)
index.js the JavaScript API wrapper
server/ the REST API server
Practice#
- Build Rerius and confirm it runs.
- Run
./rerius -hand read through the available flags. - Run
./rerius -l /bin/ls(Linux) or./rerius -l /bin/ls(macOS). - Note how many sections are listed.
Next#
Continue to 03_your_first_binary.md.
learn/02_setting_up_rerius.md