Skip to content
No description, website, or topics provided.
LLVM C++ Assembly Python C CMake Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

SGX Branch Shadowing Mitigation


This work presents a new defense against branch-shadowing to protect the control flow of the program running in an enclave. More precisely, we use compile-time modifications to convert all branch instructions into unconditional branches targeting our in-enclave trampoline code. Detailed description is available in our technical report, available at


-Intel SGX SDK for Linux

-LLVM compiler

1. Install chardev device for reading LBR

cd module_lbr_chardev/build
cmake ..
make install_module

2. Install and run shadow test app

cd shadow_code/build
cmake ..
./app_hw -h             # for options
./    # to run everything

3. Install and run the obfuscating compiler

cd llvm
git clone tools/clang
mkdir build
cd build
cmake ..

Licence information

This code is released under Apache 2.0 and GPL 2.0 licenses. We are further using the following third-party code for which we claim no copyright:

spdlog and args.hxx licensed through MIT license.

LLVM and Clang are under the University of Illinois/NCSA Open Source License.

You can’t perform that action at this time.