The Fides Suite can be downloaded here

In order to execute, some requirements must be met:

  • You must run a 64-bit operating system
  • You must run on an Intel processor with the required virtualization support. More specifically it requires support for extended page table (EPT) and a VM-tagged TLB (VPID). On linux you can check this by executing:
    grep vmx /proc/cpuinfo >> /dev/null && \
    grep vpid /proc/cpuinfo >> /dev/null && \
    grep ept /proc/cpuinfo >> /dev/null && \
    uname -m | grep x86_64 >> /dev/null && \
    uname -p | grep x86_64 >> /dev/null && \
    echo "OK"
    
    When this does not print "OK", you may need to look for another system.

    Note 1: You may need to explicitly enable (some of) these feature in your (updated) BIOS.

    Note 2: Fides requires hardware virtualization support. While theoretically possible, none of the commonly used hypervisors such as VirtualBox, VmWare and Virtual PC (or at least to my knowledge) are capable of emulating virtualization hardware. Fides can thus not be executed on top of a hypervisor. This includes Linux kernel modules (e.g., KVM) that basically turn Linux into a hypervisor. See the Blue Pill work by Joanna Rutkowska for more details.

    The Fides's toolchain expects that m4, yasm and g++ are installed. The following command should to the trick on Ubuntu:

    sudo apt-get install yasm m4 g++

    The Fides' compiler also requires that llvm/clang is build with cmake and installed correctly. The following have been tested (with special thanks to Job Noorman):

    wget http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz
    tar xf llvm-3.3.src.tar.gz
    cd llvm-3.3.src/
    wget https://distrinet.cs.kuleuven.be/software/sancus/downloads/llvm.patch
    patch -p1 < llvm.patch
    cd tools/
    wget http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz
    tar xf cfe-3.3.src.tar.gz
    mv cfe-3.3.src clang
    cd clang
    wget https://distrinet.cs.kuleuven.be/software/sancus/downloads/clang.patch
    patch -p1 < clang.patch
    cd ../..
    mkdir build
    cd build
    cmake -DLLVM_TARGETS_TO_BUILD="X86;MSP430" ..
    make
    sudo make install
    

    To compile Fides and all it's tools and apps, run the following instructions:

    # Setup the environment variable (note the )
    # This step is required to find the compiler to compile the apps before it is installed
    . ./setup_environment
    
    # Construct the necessary symbolic links, ...
    make configure
    
    # Build the entire toolset
    make
    
    When you're modifying Fides, you may want to force a complete rebuild. This can be achieved by executing:
    # Clear all build ELF files
    make clean
    
    # Remove all symbolic links, ...
    make scrub
    

    To run Fides, simply execute:

    # make sure that you set the environment variables correctly by:
    # . ./setup_environment
    make run
    
    This will launch the hypervisor and start a smaller controller application that can be used to output some information from the Fides such as how many VMCALLs happened from each VM. Output is written to the kernel log. It's generally a good idea to keep a log open in a separate terminal by executing:
    tail -f /var/log/syslog

    Fides comes with a bunch of unit tests. You can execute them by starting fides and execute in a separate terminal:

    . ./setup_environment
    make run_tests
    
    When some tests fails while others succeed, the test applications most likely do not receive enough locked memory from Linux. To fix this problem, add the following two lines to /etc/security/limits.conf and reboot
    <username>     soft    memlock    unlimited
    <username>     hard    memlock    unlimited
    

    Situation 1

    Problem: One user complained that compilation of The Fides Suite ended in the following error:

    <omitted>/TheFidesSuite/Toolchain/Compiler/Core/spmCompiler.cpp:31:1: error:
          expected a class or namespace
    SPMCompiler::SPMCompiler::SPMCompiler( char &ID )
    ^
    <omitted>/TheFidesSuite/Toolchain/Compiler/Core/spmCompiler.cpp:31:1: error:
          reference to 'SPMCompiler' is ambiguous
    SPMCompiler::SPMCompiler::SPMCompiler( char &ID )
    ^
    
                            [CC]  ../fides_vmm.o
    In file included from <omitted>/TheFidesSuite/Fides/Fides/Driver/secure_loader.h:25:0,
                     from <omitted>/TheFidesSuite/Fides/Fides/Driver/secure_loader.c:23:
    <omitted>/TheFidesSuite/Fides/Fides/Driver/vmm_interface.h:24:29: fatal error: spm_environment.h: No such file or directory
     #include "spm_environment.h"
                                 ^
    
    compilation terminated.
    

    Solution:Make sure that llvm/clang is installed correctly with cmake. Also it seems that g++ must be the default compiler for cpp

    Situation 2

    Problem:When Fides is started, the driver fails to initialize:

    raoul@navajo:~/TheFidesSuite$ make run
    === Initialising... ===
       init driver                      FAIL
    == Closing driver ==
    make[1]: *** [run] Error 255
    make: *** [run] Error 2
    

    Solution: Most likely you are trying to run Fides on a system that is not suitable. Recheck the System Requirements

    Situation 3

    Problem: Fides tests "instances" and "secure communication" fail OR Applications exit with the error message "Failed to allocate <bytes> bytes to load <spm name>"

    Solution: SPMs fail to allocate enough memory. This is caused because allocated pages must be locked in memory, meaning that they should never be swapped to disk. A security setting in the Linux kernel places a limit on the number of pages each process can lock in memory. The number of pages can be checked easy with:

        raoul@navajo:~/Walhalla$ ulimit -a
        core file size          (blocks, -c) 0
        data seg size           (kbytes, -d) unlimited
        scheduling priority             (-e) 0
        file size               (blocks, -f) unlimited
        pending signals                 (-i) 29406
    >>  max locked memory       (kbytes, -l) 64      <<
        max memory size         (kbytes, -m) unlimited
        open files                      (-n) 1024
        pipe size            (512 bytes, -p) 8
        POSIX message queues     (bytes, -q) 819200
        real-time priority              (-r) 0
        stack size              (kbytes, -s) 8192
        cpu time               (seconds, -t) unlimited
        max user processes              (-u) 29406
        virtual memory          (kbytes, -v) unlimited
        file locks                      (-x) unlimited
    
    To fix this problem, add the following two lines to /etc/security/limits.conf and reboot
    <username>     soft    memlock    unlimited
    <username>     hard    memlock    unlimited