Hello! SGX-Shield is a system supporting ASLR in the SGX environment. The paper is still under review for publication.
All implementations for this project (except the existing code base like LLVM) is done by Jaebaek Seo (jaebaek at kaist dot ac dot kr).
(rootdir)/linux-driver/README.md
and (rootdir)/linux-sdk/README.md
$ cd (rootdir)/llvm
$ mkdir build && cd build
$ cmake -G 'Unix Makefiles' ../ -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_TARGETS_TO_BUILD="X86"
$ make # or make -jN
Generate ocall stubs.
$ cd (rootdir)/program/lib/
$ ./gen_ocall_stub.py # this python script works with Python 2.7.6
Build libraries (musl-libc, libgcc, ocall stubs) and link program with them
$ cd (rootdir)/program/
$ make CC="`pwd`/../llvm/build/bin/clang -fPIC -fno-asynchronous-unwind-tables -fno-jump-tables"
note: include desired enclave program in (rootdir)/program/in_enclave_test.c
.
$ cp (rootdir)/program/program (rootdir)/loader
$ cd (rootdir)/loader/
$ make SGX_MODE=HW SGX_DEBUG=1 DEBUG=ON RAND=ON # SGX_SDK=/path/to/local/sdk/sgxsdk
$ ./app
void enclave_main()
(See (rootdir)/program/in_enclave_test.c
).enclave_exit();
(rootdir)/program/lib/
).