Course Schedule
Hybrid (In-Person and/or Online) 2 Day Dojo
May 14 to 15 (Saturday and Sunday)
May 16 to 17 (Monday and Tuesday)
Course Abstract
Dual-purpose class: This class teaches developers how to avoid writing implementation flaws, or detect ones that are already in their code...but it also teaches vulnerability-hunters how to find the flaws as well! So it's an epic battle between contentious developers and devious vulnerability hunters! Who will win?! Whoever most takes the lessons of this class to heart!
Over three-dozen CVE writeups!
This class serves as a prerequisite for a future class that will add examples on uninitialized data access, race conditions, use-after-free, type confusion, and information disclosure vulnerabilities.
Prerequisite Knowledge
This class has minimal prerequisites. It just requires that you are comfortable with reading small (< 100 line) C programs.
About the Instructor: Xeno Kovah
Xeno began leading Windows kernel-mode rootkit detection and defense research projects at MITRE in 2009, before moving into research on BIOS security in 2011. His team's first public talks started appearing in 2013, which led to a flurry of presentations on BIOS-level vulnerabilities up through 2014. In 2015 he co-founded LegbaCore. And after presenting a firmware worm that could spread between Macs via Apple's EFI-based BIOS and Thunderbolt Ethernet adapters, he ended up working for Apple. There he worked on securing all the lesser-known firmwares on Macs and peripherals - everything from 3rd party GPUs to SecureBoot <i>for monitors</i>! He worked on the x86-side of the T2 SecureBoot architecture, and his final project was leading the M1 SecureBoot architecture - being directly responsible for designing a system that could provide iOS-level security, while still allowing customer choice to trust arbitrary non-Apple code such as Linux bootloaders. He left Apple in Dec 2020 after the M1 Macs shipped, so he could work full time on OpenSecurityTraining2.
Key Learning Objectives
Learn to recognize the common programming errors that lead to (linear) stack/heap buffer overflows, (non-linear) out-of-bound writes, integer overflows/underflows, and signedness issues (e.g. bypassing sanity checks due to signed comparisons, or integer truncation/extension errors.)
Learn what options developers have in terms of prevention, detection, and mitigation for each vulnerability type.
Showing examples of exploitation of a subset of the example vulnerabilities, that might otherwise seem unexploitable.
A *non-goal* is to teach the student how to exploit the vulnerabilities themselves. That will be covered in a future class. (Therefore this class's applicability stops at "secure development" or "vulnerability auditor", and doesn't extend to "exploitation engineer".)
One-of-a-kind Class Format!
This class is run a little different from most classes. We provide you purpose-built recorded lectures instead of trapping you in realtime with live-lectures. But fear not, the instructor is always right there eagerly waiting to mingle with the students and answer any questions you have. (The instructor really likes being asked questions. It shows you're paying attention ;)). One of many benefits is that you can watch lectures at 2x speed and zoom ahead of the other students and get to the hands on labs quicker. Or if there's bits of material you already know, you can just skip them and move on to the bits you don't know! Another big benefit is that you get to take the full lectures and labs with you! That means if you forget stuff and then need it in 6 months, you can quickly re-bootstrap yourself! Or you can watch the class twice, to really grow those neural connections and cement it in your brain! And unlike live lectures, our lectures are always getting more factually accurate, by having any accidental errors edited out.
Because we give you all the lecture and lab materials and videos after class, what you're really paying for is support from the instructor! So you'll be entitled to keep asking up to 20 questions after class, with 1-2 hour turnaround answers (after accounting for time-zone differences.) This lets you keep productively working through the material if you run out of time at the conference. If you'd like to learn more about the benefits of this style of class delivery, please read this blog post.
Course Agenda
Introduction
Attacker motivations & capabilities
Stack Buffer Overflows
Introduction
(Key: 🌚 = 0day in the wild, 🧑🏫 = includes exploit explanation)
Choose-your-own-adventure. Select the examples you're most interested in from:
CVE-2021-21574🧑🏫 "BIOS Disconnect"
CVE-N/A-BB#1
Prevention
Writing good sanity checks, by example
Safer C runtime API options
FORTIFY_SOURCE
Piecemeal type-safe language usage
Detection
FORTIFY_SOURCE
Manual code auditing guidance
Commercial static analysis tools
Fuzzing
Address Sanitizer
Mitigation
Stack Canaries
Address Space Layout Randomization (ASLR)
Non-Executable Memory
Control Flow Integrity (CFI)
Tagged Memory
Heap Buffer Overflows
Introduction
Choose-your-own-adventure. Select the examples you're most interested in from:
CVE-2020-0917🧑🏫,
CVE-2020-27009 (Part of NAME:WRECK)
CVE-2020-25111 (Part of Amnesia:33)
CVE-2020-11901 (Part of Ripple20)
Prevention, Detection, Mitigation (a mix of approaches that apply equivalently to past sections, as well as any new topic-specific mechanisms.)
Non-linear Out-of-bounds Writes (OOB-W)
Introduction
Choose-your-own-adventure. Select the examples you're most interested in from:
Prevention, Detection, Mitigation (a mix of approaches that apply equivalently to past sections, as well as any new topic-specific mechanisms.)
Integer Overflows/Underflows
Introduction
Choose-your-own-adventure. Select the examples you're most interested in from:
CVE-2020-0796🧑🏫 "SMBGhost"
CVE-2020-11901 (Part of Ripple20)
Prevention, Detection, Mitigation (a mix of approaches that apply equivalently to past sections, as well as any new topic-specific mechanisms.)
Signedness Issues
Introduction
Choose-your-own-adventure. Select the examples you're most interested in from:
Prevention, Detection, Mitigation (a mix of approaches that apply equivalently to past sections, as well as any new topic-specific mechanisms.)
Conclusion
Hardware Requirements
Any computer capable of watching online videos.
Headphones for watching videos, (preferably over-ear so you're not disturbed as the instructor is walking around the class answering individuals' questions).
Software Requirements
Administrator privileges to install virtualization software on your machine.
Windows or Linux as the primary host
A link to a software setup guide will be sent before class, and the student should install before class to maximize time available for interaction with the instructor. (Other software includes Intel Simics, Chipsec, UEFITool, and Read-Write Everything.)