You're only a few steps away from deploying Alkemist:Code into your CentOS environment!
1 of 4
Select CentOS Distribution
Need to know your distribution? Run this command in a terminal: cat /etc/centos-release. The displayed release will match one of those to the left if Alkemist:Code supports it. RHEL instructions are similar to these and can be found on a dedicated Deploy page.
2 of 4
0# Add RunSafe repo to list of those yum will check for packages1sudotee /etc/yum.repos.d/runsafesecurity.repo> /dev/null <<-EOM2[RunSafeSecurity]3name=RunSafeSecurity4baseurl=https://runsafesecurity.jfrog.io/artifactory/rpm-alkemist-lfr5enabled=16gpgcheck=07gpgkey=https://runsafesecurity.jfrog.io/artifactory/rpm-alkemist-lfr/repodata/repomd.xml.key8repo_gpgcheck=19EOM10# Install alkemist-lfr11sudo yum -y install alkemist-lfr12source /etc/profile.d/alkemist-lfr.sh
Run these commands on your system to create the file /etc/yum.repos.d/runsafesecurity.repo to let it know to look for Alkemist:Code's Load-time Function Randomization (LFR) packages on our servers and then install Alkemist:Code.
3 of 4
Build with Alkemist:Code
0# ALKEMIST_LICENSE_KEY=<your license key> lfr-helper <your build command>12# For example, to build the hello_world.c shown in the next tab you would run:3sudo yum -y install gcc4ALKEMIST_LICENSE_KEY=<insert Alkemist license here> lfr-helper gcc -o hello_world hello_world.c
Now that your system contains the files necessary for Alkemist:Code to run, prepend your build commands (make, gcc, g++, etc) with lfr-helper to automatically integrate Alkemist:Code into your existing build process.
The command shown will build the given hello_world.c into an Alkemist:Code-protected program called hello_world, but you can add lfr-helper to any build command, simple or complex.
4 of 4
Verify Alkemist:Code Protection
0# Use ldd to see which libs have been included in the given binary1# ldd <binary name> | grep lfr23# For example, with the hello_world from the previous step4ldd ./hello_world |grep lfr56# This will return a line similar to the one below, but with a different memory address7# $ liblfr.so => /usr/local/lib/liblfr.so (0x7f659d514000)
Each tab shows a different way to confirm that Alkemist:Code has been applied to a given binary. The examples are for the hello_world binary built in the previous step.