Debian/Ubuntu
Protecting your Debian/Ubuntu software with RunSafe Protect is as easy as installing the packages from our apt repository and making a one line change to your build environment.
Install RunSafe Protect
-
Add the RunSafe Security repo to list of repositories apt will check for packages
curl -1sLf "https://packages.runsafesecurity.com/runsafe-security/runsafe/setup.deb.sh" | sudo -E bash -
(Optional) For cross-compilation, for the selected architectures (arm64, armhf, mips, mipsel, i386), export the target architecture as
${ARCH}on the build host and add the architecture:export ARCH=arm64
sudo dpkg --add-architecture ${ARCH} -
Update the apt cache
sudo apt-get update -
Install the
alkemist-lfrpackagesudo apt-get install -y alkemist-lfr -
(Optional) For cross-compilation, install the following packages with the desired target architecture on the cross-compilation build host.
sudo apt-get install -y alkemist-liblfr:${ARCH} alkemist-liblfr-dev:${ARCH}Next, find the installed
liblfr.so.find /usr/ -name liblfr.so 2> /dev/nullFinally, copy the
liblfr.sofound in/usr/lib/${TARGET_TRIPLE}/into the firmware image (via the cross-compilation target environment, rootfs, sysroot, etc.).
Add RunSafe Protect
Now that your system contains the files necessary for RunSafe Protect to run, prepend your build commands (make, gcc, g++, etc) with lfr-helper to automatically integrate RunSafe Protect into your existing build process:
<your build command>
becomes
RUNSAFE_LICENSE_KEY=<your license key> lfr-helper <your build command>
You can retrieve your license key from https://app.runsafesecurity.com/account/license-key
Example GCC Integration
gcc -o hello_world hello_world.c
becomes
RUNSAFE_LICENSE_KEY=<your license key> lfr-helper gcc -o hello_world hello_world.c
Specifying your License Key
As shown above, your license key can be pre-pended to the specific build command. Additional information on specifying a license key, including when in offline mode, can be found at Specify Your License