You're only a few steps away from deploying LFR into your Ubuntu environment!
1 of 4
Select Ubuntu Distribution
Need to know your distribution? Run this command in a terminal: lsb_release -a. The displayed Release will start with its major release number and/or the Codename will match one of those in parentheses to the left if LFR supports it. Debian instructions are similar to these and can be found on a dedicated Deploy page.
2 of 4
# Add RunSafe repo to list of those Ubuntu will check for packagesecho'deb https://runsafesecurity.jfrog.io/artifactory/debian bionic main'|sudotee -a /etc/apt/sources.list.d/alkemist.list# Add RunSafe's GPG public key locallywget -qO - https://runsafesecurity.jfrog.io/artifactory/api/gpg/key/public |sudo apt-key add -# Update Ubuntu to include new repo and install alkemist-lfrsudoapt-get updatesudoapt-get -y install alkemist-lfrsource /etc/profile.d/alkemist-lfr.sh
Run these commands on your system to let it know where to find LFR .deb packages (our servers) and then install LFR
3 of 4
Build with LFR
# ALKEMIST_LICENSE_KEY=<your license key> lfr-helper <your build command># For example, to build the hello_world.c shown in the next tab you would run:sudoapt-get -y install gccALKEMIST_LICENSE_KEY=<insert Alkemist license here> lfr-helper gcc -o hello_world hello_world.c
Now that your system contains the files necessary for LFR to run, prepend your build commands (make, gcc, g++, etc) with lfr-helper to automatically integrate LFR into your existing build process.
The command shown will build the given hello_world.c into an LFR-protected program called hello_world, but you can add lfr-helper to any build command, simple or complex.
4 of 4
Verify LFR Protection
# Use ldd to see which libs have been included in the given binary# ldd <binary name> | grep lfr# For example, with the hello_world from the previous stepldd ./hello_world |grep lfr# This will return a line similar to the one below, but with a different memory address# $ liblfr.so => /usr/local/lib/liblfr.so (0x7f659d514000)
Each tab shows a different way to confirm that LFR has been applied to a given binary. The examples are for the hello_world binary built in the previous step.