Coder Social home page Coder Social logo

bellthomas / citadel Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 9.05 MB

Citadel — A Trusted Reference Monitor for the Linux Kernel using Intel SGX Enclaves

License: MIT License

Makefile 0.87% Shell 0.22% C 82.20% C++ 1.40% Python 0.27% TeX 6.66% Perl 0.27% Java 0.15% Batchfile 7.97%
kernel linux lsm security difc reference-monitor sgx enclave

citadel's Introduction

Citadel — Trusted Reference Monitors for Linux using Intel SGX Enclaves

Disclaimer: This is a research prototype and not intended for production environments.
Thesis: https://www.cl.cam.ac.uk/~ahb36/citadel.pdf

Abstract

Information Flow Control (IFC) is a powerful tool for protecting data in a computersystem, enforcing not only who may access it, but also how it may be used throughout its lifespan. Intel’s Software Guard Extension (SGX) affords complementary protection, providing a general-purpose Trusted Execution Environment for applications and their data. To date, no work has been conducted considering the overlap between the two, and how they may mutually reinforce each other.

Citadel is a modular, SGX-backed reference monitor to securely and verifiably implement IFC methods in the Linux kernel. The prototype externalises policy decisions from its enforcement security module, providing a userspace promise-of-access model with asynchronous fulfillment. By aliasing system calls, the system transparently integrates with unmodified applications, and amortises the performance cost of integration by inferring processes’ underlying security contexts.

Observed results are promising, demonstrating a worst-case median performance overhead of 25%. In addition, the Nginx webserver is demonstrated running under Citadel; high bandwidth transfers exhibit near parity with the native Linux kernel’s performance. This work illustrates the potential viability of a symbiotic enclave-kernel relationship for security implementations, something that may, in the long run, benefit both.

Build the Prototype

The following steps assume a Linux-based system running on an SGX-capable processor. Before starting the SGX driver needs to be installed.

Prepare a fresh kernel (v5.6.2) with the Citadel LSM using make DEBUG=1.

Once initialised, build and install the kernel using make kernel (this may take a while).

Before booting into the 5.6.2-citadel kernel properly, the SGX driver needs to be installed for it as well. This can be achieved either by;

  • Booting into the new kernel (the reference monitor will fail to initialise), installing the driver and rebooting.
  • Modifying the driver's Makefile to target the new kernel's modules folder.

Dependencies

This process currently isn't automated, but the following are required to build Citadel.

  1. The sgx-gmp library resident at /opt/devel/sgx-gmp/libsgx_tgmp.a
  2. A sparsehash installation resident at /opt/devel/sparsehash

libtomcrypt is provided internally, but depends on sgx-gmp being present.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.