Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Labs

There will be 6 laboratory exercises given throughout the semester related to lecture content.

Lab Difficulty Due On
1. Website Fingerprinting (10%) Easy Thu, Feb 15
2. Cache Attacks (15%) Hard Thu, March 7
3. Spectre Attacks (12%) Easy Thu, March 21
4. Rowhammer (12%) Hard Thu, Apr 11
5. ASLR Bypasses (12%) Easy Thu, Apr 18
6.A CPU Fuzzing (12%) Hard Tue, May 7
6.B CPU Verification (12%) Easy Tue, May 14

In total, your lab grade contributes 85% (for graduate version, as shown in the table above) or 97% (for undergraduate version, by scaling up the numbers in the table above) to your total grade in the course. Each lab is due at 11:59 PM.

Lab Check-Offs

Over the course of the term, we will randomly select one of your labs from lab 2, 4, and 6.A for an in-person check-off (worth 3% of your total course grade). We will inform you whether you are selected for a lab on the day after the due of that lab. And you can pick a check-off time slot for the following week. During a check-off you will discuss your submission with the TA, describing your implementation and elaborating on your written answers.

Submission Instructions

Labs will be submitted via GitHub Classroom, and accompanying reports will be submitted via Gradescope.

GitHub

To access and submit lab materials, you will need to have a github.com account. For each lab, we will create a new repository for you on GitHub Classroom.

To access the repository:

Check Piazza posts for the invitation link of Github Classroom.

To clone the starter code from the repository:

git clone <GITHUB CLASSROOM REPOSITORY LINK>

However, if you have never used github on the machine you are running (i.e., either your own machine or our servers), you need following steps to authorize the machine to access GitHub:

  1. If you are using our server, connect using ssh (i.e., ssh username@<servername>.csail.mit.edu)
  2. ssh-keygen -t rsa -b 4096 (note that if you already have an ssh key, you can skip this)
  3. Press return until the command finishes.
  4. cat ~/.ssh/id_rsa.pub (feel free to use an existing key if you have one)
  5. Copy this and create a new ssh key on your GitHub account (instructions if you need help).
  6. git clone <GITHUB CLASSROOM REPOSITORY LINK>

To push your changes (submitting your work):

git add FILES_YOU_CHANGED
git commit -m "WHAT YOU CHANGED"
git push

GitHub classroom will snapshot the state of your repository at the due date (at 23:59:59), which we will use to grade your submission. Your repository will not be locked after that point, feel free to continue to push if we have allowed an extension for you.

Gradescope

Each lab contains exercises and discussion questions. Type your answers to discussion questions in the markdown template provided in the starter code of each lab (report.md). Convert the markdown file to PDF (e.g., you can simply open the file on github.com and print it to PDF with your web browser) and upload the PDF file to Gradescope (prior to the submission deadline).

Development Environment

For all our labs (and recitations, except lab 1), we will setup a user account for you on our lab machines, where the development environment has been properly setup. Check the email to get your username and the password.

Alternative Docker Environment

Most our labs highly depend on the configurations of our physical machines (e.g., cache organization, DRAM model) and cannot be done locally on your own machine. However, for some labs, it is possible run the lab locally and we will provide a docker file in the repository to setup your environment.

To use docker, you need to first understand two concepts:

  1. Docker Image: An image file storing all the pre-installed libraries (e.g., compilers, python libraries).
  2. Docker Container: A running environment that is provisioned with a docker image and contains all the modifications you have made (e.g., install a new library).

Then, you can use docker with follwing steps:

  1. Download the docker engine here.
  2. In the root folder of a repository, where file Dockerfile and docker-compose.yml exist, use the command below to build the docker image, use the image to create a container, and run the container:
    docker compose up -d
    
  3. Enter the container and run bash with (env below is the name of the container that we specify in docker-compose.yml):
    docker compose exec env bash
    
  4. For your convenience, we mount the repository folder on your host machine into a folder named /gitRepo in the container (defined in docker-compose.yml). You could enter the folder and start to run the code:
    cd /gitRepo
    
  5. If you want to continue with the lab in another time, you could exit the container with ctrl-d. Then, pause and resume the container with:
    docker compose stop   # Pause
    docker compose up -d  # Resume
    
  6. When you are done with the lab, you could delete the container and the image with (Both commands will delete any modification you made to the container):
    docker compose down            # Delete container but keep the image
    docker compose down --rmi all  # Delete both container and image
    

You can find more document on using Docker Compose to manage docker images and containers here.


Table of contents