Code Monkey home page Code Monkey logo

specbox-pocs's Introduction

PoCs about security evaluation of SpecBox

This repository contains the PoCs of spectre attacks, such as Spectre-PHT, Spectre-BTB (also known as Spectre-BTI), Spectre-RSB, Spectre-STL. The goal is to evaluate the effectiveness of "SpecBox" defense, which is proposed by the paper

"SpecBox: A Label-Based Transparent Speculation Scheme Against Transient Execution Attacks".

The code only works on GEM5 simulator with O3 CPU Model and Ruby Cache System. Because the contruction of these PoCs refers to the work https://github.com/IAIK/transientfail, we believe that with a slight modification to the PoC, it can also be reproduced on real world hardwares.

Building

The PoCs must be compiled with โ€™-O0โ€˜ optimizing flag and '-static' linking flag. In addition, for the PoC of Spectre-RSB, it needs additional '-fno-stack-protector' flag to disable the stack canary. In our experiments, the compiler version is "gcc-5.4.0" and the standard library version is "glibc-2.23", which are normally equipped on Ubuntu 16.04 system.

Running

In our experiments, we choose the version "fe187de9bd1aa479ab6cd198522bfd118d0d50ec" for GEM5 simulator (We believe the version does not affects the PoCs, but you may need to update some running options if on other versions). After installing and building the simulator, and also afer building the executable file of the PoCs, you can run them and observe the output in the terminal. The running options of our simulator are:

$GEM5_DIR/build/X86_MESI_Two_Level/gem5.fast \
  $GEM5_DIR/configs/example/se.py \
  -c spectre-pht-icache \
  -o '5 this-is-a-secret' \
  --num-cpus=1 --mem-size=4GB \
  --l1d_assoc=8 --l2_assoc=16 --l1i_assoc=4 \
  --cpu-type=DerivO3CPU \
  --ruby --num-dirs=1 --network=simple --topology=Mesh_XY --mesh-rows=1

In the options, the '-o' option indicates the arguments for the PoC application. It has two parts, the first (i.e. "5") means the repeat numbers of each attack iteration, the second (i.e. "this-is-a-secret") means the secret string to be transmitted in the spectre covert channel.

Author

Bowen Tang ([email protected]), a PhD candidate from Institute of Computing Technology, Chinese Academy of Sciences.

specbox-pocs's People

Contributors

bwtang avatar

Watchers

 avatar

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.