**Language-based Security** [*Marco Vassena*](https://webspace.science.uu.nl/~4110161/) Building secure systems is notoriously hard. Despite every security patch, attackers always seem to find new exploits. A huge part of the problem is that developers do not have the right tools to write secure software. They build complex systems that handle sensitive data using programming languages that do not account for security or privacy. Thus, developers can too easily introduce bugs that attackers can exploit as security vulnerabilities to breach their systems. Language-based security applies rigorous programming language techniques to help developers address the security problems of their systems. This course studies techniques to develop programming languages and analyses that prevent security bugs. In the first part of the course, we will learn how attackers can exploit memory safety vulnerabilities to hijack programs and how compilers mitigate these attacks. Then, we will learn how WebAssembly prevents sandbox breakouts by design, allowing web browsers and edge platforms to safely run untrusted code. Lastly, we will study basic program analysis techniques and apply them to prevent information leaks in untrusted and cryptographic code. The course combines theoretical foundations and hands-on experience. We will design programming languages and analyses using formal semantics to specify and establish their security guarantees. The practical assignments will provide experience implementing static analyzers and WebAssembly interpreters. Learning Objectives =============================================================================== After successfully passing the course, you will be able to * Identify security vulnerabilities and assess their impact in simple settings * Design defense mechanisms and establish their security guarantees using formal semantics * Develop programming languages, compiler passes, and program analyses that prevent specific types of security bugs About =============================================================================== **Staff**: - [Marco Vassena](https://webspace.science.uu.nl/~4110161/) * Contact: MS Teams * Office hours by appointment, BBG 5.72 - Lawrence Chonavel - Alex Ionescu **Lectures and lab sessions** are in [DALTON 500 - 1.27](https://www.uu.nl/en/daltonlaan-500): - Wednesday, 13:15-17:00 - Friday, 9:00-12:45 Schedule =============================================================================== *This schedule is preliminary and subject to change.* Wed Apr 24 2024: Introduction * [intro.pdf](https://git.science.uu.nl/4110161/lbs-24/tree/main/lectures/lec0/intro.pdf) * [Join the MS Teams channel](https://teams.microsoft.com/l/team/19%3AiDRSCAKQoTP5fSNaEFc9SmEk_8KzKwYbovBx3mtHdmY1%40thread.tacv2/conversations?groupId=e7169735-a42b-43a6-9417-2d2bac93d92b&tenantId=d72758a0-a446-4e0f-a0aa-4bf95a4a10e7) * [Fill intro survey](https://docs.google.com/forms/d/e/1FAIpQLSeB60voosrAWMNE0tl-gePrBs0EWDz7sOeHlbZu9DwWEAMsqQ/viewform) * Start working on assignment 0 (Wed Apr 24 2024): **Assignment 0 out** Fri Apr 26 2024: Unsafe programming * [Slides and scripts](https://git.science.uu.nl/4110161/lbs-24/tree/main/lectures/lec1) (Fri Apr 26 2024): **Assignment 1 out** Wed May 1 2024: Buffer overflow defenses * [Slides](https://git.science.uu.nl/4110161/lbs-24/tree/main/lectures/lec2/bo-defenses.pdf) (Fri May 3 2024): **Assignment 1 due** Fri May 3 2024: Rust: Ownership * [Slides and scripts](https://git.science.uu.nl/4110161/lbs-24/tree/main/lectures/lec3) (Fri May 3 2024): **Assignment 2 out** Wed May 8 2024: Rust: Traits * [Slides](https://git.science.uu.nl/4110161/lbs-24/-/blob/main/lectures/lec4/traits.pdf) (Fri May 10 2024): **Holiday** (Fri May 10 2024): **Assignment 2 due** Wed May 15 2024: WebAssembly 1 - [Slides](https://git.science.uu.nl/4110161/lbs-24/-/blob/main/lectures/lec5/core-wasm.pdf) - [Notes](lectures/lec5/notes/1-core-wasm.md.html) - [Scripts]( [Slides](https://git.science.uu.nl/4110161/lbs-24/-/blob/main/lectures/lec5/scripts/) (Wed May 15 2024): **Assignment 3 out** Fri May 17 2024: WebAssembly 2 - [Slides](https://git.science.uu.nl/4110161/lbs-24/-/blob/main/lectures/lec6/) - [Notes](notes/2-control-flow.md.html) (Wed May 22 2024): **Assignment 3 due ** Wed May 22 2024: Information-Flow Control (Wed May 22 2024): **Assignment 4 out** Fri May 24 2024: IFC Libraries (Wed May 29 2024): **Assignments 4 due** Wed May 29 2024: Constant-time programming (Wed May 29 2024): **Assignments 5 out** Fri May 31 2024: Spectre attacks (Wed Jun 5 2024): **Assignment 5 due** Wed Jun 5 2024: Improve assignments Fri Jun 7 2024: Guest lecture * **Title:** Software composition analysis * **Speaker:** Evgenii Kotelnikov, Sneak Wed Jun 12 2024: Guest lecture * **Title:** Specification and Verification of Side-channel Security for Open-source Processors via Leakage Contracts * **Speaker:** Klaus von Gleissenthall, VU Amsterdam Fri Jun 14 2024: Improve assignments Wed Jun 19 2024: TBD Fri Jun 21 2024: Exam Preparation Fri Jun 28 2024: Exam - EDUC - GAMMA, 13:30 - 16:30 Fri Jul 12 2024: Retake Exam - EDUC - ALFA, 13:30 - 16:30 Evaluation =============================================================================== Your final grade is a weighted average of programming assignments and a written exam. Both the exam grade and the average of the assignments have to be 5.0 or higher to pass the course. To qualify for a resit, your final grade must be 4.0 or higher. You will receive grades via Blackboard. Assignments (60%) -------------------------------------------------------------------------------- You work on assignments in groups of two. You may discuss your work with other groups, but you may not share any code. It is the responsibility of the team to ensure that both members participate equally. (###) Deadlines The 1-week deadline is hard: prefer submitting half-finished work to missing the dealine. Submisssions scoring >=5.0 may be improved & re-submitted in June. Start working early on the assignments and take advantage of the tutorials to get help. More information about the assignments and submissions coming soon. Written exam (40%) -------------------------------------------------------------------------------- The exam covers all the course material, including the guest lectures. Participation: (bonus, max 5%) -------------------------------------------------------------------------------- Ask questions, give answers, start discussions in class and online, or serve as student representative. Links ================================================================================ * [MS Teams channel](https://teams.microsoft.com/l/team/19%3AiDRSCAKQoTP5fSNaEFc9SmEk_8KzKwYbovBx3mtHdmY1%40thread.tacv2/conversations?groupId=e7169735-a42b-43a6-9417-2d2bac93d92b&tenantId=d72758a0-a446-4e0f-a0aa-4bf95a4a10e7) * [Gitlab Repository](https://git.science.uu.nl/4110161/lbs-24) * [Feedback form](https://docs.google.com/forms/d/e/1FAIpQLSf8ATDWL_1HNRSlqpW1LkMKD5B-nU3gvFAZuBStalG28JaimQ/viewform) * [Rust Book](https://rust-book.cs.brown.edu) * [MyTimetable](https://mytimetable.uu.nl/schedule)