jaebaek / SGX-Shield

SGX-Shield: Enabling Address Space Layout Randomization (ASLR) for SGX Programs
Other
47 stars 21 forks source link

SGX-Shield

Introduction

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).

Build and run

Install Intel SGX SDK for Linux:

Build LLVM

$ 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

Build libraries and link program with them

note: include desired enclave program in (rootdir)/program/in_enclave_test.c.

Run in an enclave

$ 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

How to write another program

Limitation

TODO

Documentation

Optimization

Etc.