Programming labs for 6.S060 (Foundations of Computer Security).

Overview

6.S060 Labs

This git repository contains the code for the labs in 6.S060.

In these labs, you will add a series of security features to a photo-sharing application.

Dependencies

These labs depend on Python 3.9. You can verify that your Python version is correct by checking

$ python3 --version
3.9.x

where "x" is any number.

Tests

To run tests for these lab, run make test, which will run Python doctests. They should all pass.

Note that these tests are different from the tests used by the autograder, which will be used to grade your assignments.

Web app

The photo-sharing application supports a (very rudimentary) web application interface written in Flask. To use the interface, run make web.

Assignments

You can find all the code required for each lab inside of its directory. For instance, the code for lab0 resides in lab0/.

You can find the tasks for the corresponding assignment by looking at the Markdown file associated with the lab number. The following files contain descriptions of the tasks for each lab:

Contributions

We'd be happy to accept any contributions. Feel free to issue a PR on GitHub and we'll take a look. If we merge it, let us know if you'd like attribution.

You might also like...
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.

ꦱꦮ sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character. sawa iku

The Zig programming language, packaged for PyPI

Zig PyPI distribution This repository contains the script used to repackage the releases of the Zig programming language as Python binary wheels. This

Python Programming Bootcamp

python-bootcamp Python Programming Bootcamp Begin: 27th August 2021 End: 8th September 2021 Registration deadline: 22nd August 2021 Fees: No course or

100 Days of Python Programming

100 days of Python Following the initiative of my friend Helber Belmiro, who is almost done with his 100 days of Java, I have decided to start my 100

The Official interpreter for the Pix programming language.
The Official interpreter for the Pix programming language.

The official interpreter for the Pix programming language. Pix Pix is a programming language dedicated to readable syntax and usability Q) Is Pix the

A topology optimization framework written in Taichi programming language, which is embedded in Python.
A topology optimization framework written in Taichi programming language, which is embedded in Python.

Taichi TopOpt (Under Active Development) Intro A topology optimization framework written in Taichi programming language, which is embedded in Python.

PyGo custom language, New but similar language programming

New but similar language programming. Now we are capable to program in a very similar language to Python but at the same time get the efficiency of Go.

An esoteric programming language that supports concurrency, regex, and web requests.

The Hofstadter Esoteric Programming Language Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's La

Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Comments
  • Add Python type annotations to lab1 api, codec, and crypto

    Add Python type annotations to lab1 api, codec, and crypto

    This PR adds type annotations to the api, codec, and crypto files of lab1. These annotations make it much easier to understand the code and determine how to use the functions it provides, at least for me.

    I tried my best to determine the types by reading through the code, but there may be a couple errors. I created this to be useful to myself on this lab and as a means of reading through the code, but it would be great to have these type annotations incorporated into future labs.

    opened by bkettle 4
  • Fix/codec recursion

    Fix/codec recursion

    When trying to add a list to an encoding with add_obj, the current code causes infinite recursion by trying to repeatedly add the list itself. This fixes this error.

    opened by bkettle 1
  • autograder test case replacing int with Enum (api.OperationCode) in Encoding

    autograder test case replacing int with Enum (api.OperationCode) in Encoding

    Hello,

    Unless I'm missing something, I believe this is unintended behavior:

    Line 1071 of ag1_runner.py is as follows:

                server._storage.userbase[username] = replace_int(udata, 5, api.OperationCode.PUT_PHOTO, api.OperationCode.REGISTER)
    

    This code does not function as I believe it is intended: instead of replacing the integer value of PUT_PHOTO with the integer value of REGISTER, it replaces the integer value of PUT_PHOTO with the Enum object REGISTER. This results in the decode_log_entry receiving values it items that are neither ints nor bytes types, which would not happen in a real client/server relationship.

    To fix this, I think that line 1071 should be replaced with

                server._storage.userbase[username] = replace_int(udata, 5, api.OperationCode.PUT_PHOTO.value, api.OperationCode.REGISTER.value)
    

    This will strictly replace an integer with an integer.

    opened by bkettle 0
Owner
MIT PDOS
Parallel and Distributed Operating Systems group at MIT CSAIL
MIT PDOS
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent Of Code 2021 - Python English Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels th

Coral Izquierdo Muñiz 2 Jan 9, 2022
Security-related flags and options for C compilers

Getting the maximum of your C compiler, for security

null 135 Nov 11, 2022
This application demonstrates IoTVAS device discovery and security assessment API integration with the Rapid7 InsightVM.

Introduction This repository hosts a sample application that demonstrates integrating Firmalyzer's IoTVAS API with the Rapid7 InsightVM platform. This

Firmalyzer BV 4 Nov 9, 2022
Linux Security and Monitoring Scripts

Linux Security and Monitoring Scripts These are a collection of security and monitoring scripts you can use to monitor your Linux installation for sec

Andre Pawlowski 65 Aug 27, 2022
This is sample project needed for security course to connect web service to database

secufaku This is sample project needed for security course to "connect web service to database". Why it suits alignment purpose It connects to postgre

Mark Nicholson 6 May 15, 2022
Backup dc registry - A simple POC that abuses Backup Operator privileges to remote dump SAM, SYSTEM, and SECURITY

Backup Operator Registry Backup to Domain Compromise A simple POC that abuses Ba

Horizon 3 AI Inc 57 Dec 18, 2022
Short, introductory guide for the Python programming language

100 Page Python Intro This book is a short, introductory guide for the Python programming language.

Sundeep Agarwal 185 Dec 26, 2022
《practical python programming》的中文翻译

欢迎光临 大约 25 年前,当我第一次学习 Python 时,发现 Python 竟然可以被高效地应用到各种混乱的工作项目上,我立即被震惊了。15 年前,我自己也将这种乐趣教授给别人。教学的结果就是本课程——一门实用的学习 Python的课程。

编程人 125 Dec 17, 2022
Source code for Learn Programming: Python

This repository contains the source code of the game engine behind Learn Programming: Python. The two key files are game.py (the main source of the ga

Niema Moshiri 25 Apr 24, 2022
Rick Astley Language is a rick roll oriented, dynamic, strong, esoteric programming language.

Rick Roll Language / Rick Astley Language A rick roll oriented, dynamic, strong, esoteric programming language. Prolegomenon The reasons that I made t

Rick Roll Programming Language 658 Jan 9, 2023