Source code of the paper "Lord of the Ring(s): Side Channel Attacks on the CPU On-Chip Ring Interconnect Are Practical"

Overview

This repository contains the source code to reproduce the experiments of the paper:

NB: This source code is CPU-specific. Before you proceed, check that you are on the right branch. If you cannot find a branch for your CPU, extra work may be needed to port the code to your CPU (see below).

Tested Setup

The code of this branch was tested on a bare-metal machine with an Intel i7-9700 CPU, running Ubuntu Server 16.04 LTS. We do not guarantee that it works in virtualized environments, on other CPUs, or with other OSs.

Materials

This repository contains the following materials:

  • 01-ring-topology: this is the code that we used to measure the load latency for each core/slice configuration. It confirmed the linear ring interconnect topology for our client-class CPUs.
  • 02-ring-contention: this is the code that we used to reverse engineer the ring interconnect communication protocols. It contains the basic code to monitor and create contention on the ring interconnect. There is also a script to compare the timing distributions under different configurations.
  • 03-cc: this is the code of a covert channel where the sender transmits ones and zeros. It also contains the scripts to measure the channel capacity under different configurations.
  • 04-cc: this is the code of a side channel attack against vulnerable cryptographic code (RSA and EdDSA). It also contains the code to train a classifier to distinguish the victim's secret bit.
  • 05-keystroke-timing-attack: this is the code of another side channel attack that leaks the timing of keystrokes pressed by a user.

Inside each folder you will find instructions for how to run the experiments. Notice that the preliminary steps described in the different READMEs differ. We suggest to proceed in order, from 01 to 05.

How can I port this code to other CPUs?

To run this code on other CPUs, you will need to write the code that maps physical addresses to LLC slices on your CPUs. There are multiple ways to do this, e.g., with performance counters or with knowledge of the slice mapping function. The difficulty of this step depends on the CPU that you are using. You can find some code to learn more about this in the util subdirectory.

Citation

If you make any use of this code for academic purposes, please cite the paper:

@inproceedings{paccagnella2020lotr,
    author = {Riccardo Paccagnella and Licheng Luo and Christopher W. Fletcher},
    title = {Lord of the Ring(s): Side Channel Attacks on the {CPU} On-Chip Ring Interconnect Are Practical},
    booktitle = {Proc.\ of the USENIX Security Symposium (USENIX)},
    year = {2021},
}
Similar Resources

Simple C++ code to benchmark fast division algorithms

fast_division Simple C++ code to benchmark fast division algorithms relying on constant divisors. The code is a companion to the paper Integer Divisio

Oct 31, 2022

Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design

Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design

Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.

Oct 4, 2022

Tuplex is a parallel big data processing framework that runs data science pipelines written in Python at the speed of compiled code

Tuplex is a parallel big data processing framework that runs data science pipelines written in Python at the speed of compiled code. Tuplex has similar Python APIs to Apache Spark or Dask, but rather than invoking the Python interpreter, Tuplex generates optimized LLVM bytecode for the given pipeline and input data set.

Nov 15, 2022

Public repository for rolling release of main Vector robot code repository.

vector Public repository for rolling release of main Vector robot code repository. This rolling release will be worked to completion until all non-thi

Nov 4, 2022

This repo is full with code from random c++ projects. Anyone can contribute

Randomcplusplus Learn c++ This repo is for random c++ code that can be used for any project Learn how to code in c++ by using and reading peoples exam

Jan 30, 2022

An optimized version of the KGloVe code (global embeddings for Knowledge Graphs)

Optimized Implementation of the KGloVe algorithm This repository contains an optimized implementation of KGloVe, which was proposed in Cochez M., Rist

Feb 25, 2022

100 Days Of Code

100DaysOfCode I will be following Coding Ninja for learning most of the stuff. I am working on DS and Algos PS : It's not consecutive 100Days Day 1: C

May 25, 2022

FEMTIC is a 3-D magnetotelluric inversion code. FEMTIC is made by object-oriented programming with C++.

FEMTIC FEMTIC is a 3-D magnetotelluric inversion code based on the following studies. FEMTIC was made using object-oriented programming with C++. FEMT

Nov 25, 2022

This repository contains the Assignment code of Data Structures and Algorithms Assignments of SPPU, Second Year IT Syllabus (2019 pattern)

DSAL This repository contains the Assignment code of Data Structures and Algorithms Assignments of SPPU, Second Year IT Syllabus (2019 pattern) Assign

Apr 6, 2022
Related tags
Nodable is node-able. The goal of Nodable is to provide an original hybrid source code editor, using both textual and nodal paradigm.
Nodable is node-able. The goal of Nodable is to provide an original hybrid source code editor, using both textual and nodal paradigm.

Nodable is node-able ! Introduction: The goal of Nodable is to provide an original hybrid source code editor, using both textual and nodal paradigm. I

Oct 4, 2022
A 3GPP R16 compliant open source 5G core UPF (User Plane Function).
A 3GPP R16 compliant open source 5G core UPF (User Plane Function).

OpenUPF A 3GPP R16 compliant open source UPF. The OpenUPF is an open source project for 5th generation (5G) mobile core networks User Plane Function.

Nov 2, 2022
An open source library for C

Eric O Meehan C Library Introduction Eric O Meehan's C Library is an open source collection of tools for the C programming language. The project is in

Nov 28, 2022
Open-source graph editor, with built-it step-by-step Dijkstra's Algorithm.
Open-source graph editor, with built-it step-by-step Dijkstra's Algorithm.

Visual Dijkstra - Simple visual graph editor, with built-in step-by-step Dijkstra's algorithm Visual Dijkstra is a free and open-source tool, designed

Oct 10, 2022
FleakOS Kernel Source Tree

FleakOS FleakOS Kernel Source Tree Dependencies sudo apt-get install -y xorriso sudo apt-get install -y gcc-multilib sudo apt-get install -y nasm sudo

Dec 10, 2021
This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer (short for FST) in c++ language.This FST C++ open source project has much significant advantages.
This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer (short for FST) in c++ language.This FST C++ open source project has much significant advantages.

Orchid-Fst 1. Project Overview This project Orchid-Fst implements a fast text string dictionary search data structure: Finite state transducer , which

Oct 18, 2022
The open source edition of Raising the Bar: Redux's Division 1.2 release.

//===================================================================================================================================================

Jul 18, 2022
An open source initiative for implementing and testing algorithms in various programming languages.

Algorithms An open source initiative for implementing and testing algorithms in various programming languages. Contributing The idea here is to learn

Nov 28, 2021
An open source UI re-implementation based on GTA:V, built for GTA: San Andreas.
An open source UI re-implementation based on GTA:V, built for GTA: San Andreas.

V Hud: A work-in-progress user interface overhaul, for Grand Theft Auto: San Andreas, based on Grand Theft Auto: V. Project has been made in order to

Nov 29, 2022