Skip to main content

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

  1. 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
  2. (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}
  3. Update the apt cache

    sudo apt-get update
  4. Install the alkemist-lfr package

    sudo apt-get install -y alkemist-lfr
  5. (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/null

    Finally, copy the liblfr.so found 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>
tip

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