Back to All Events

C/C++ Implementation Vulnerabilities Part 2


  • secwest.net Vancouver Canada (map)

Course Schedule

A 2 day DOJO.

In-Person or Online attendance is available.

  • March 16 to 17 (Saturday and Sunday)

  • March 18 to 19 (Monday and Tuesday)

Page last updated January 20, 2024.

 

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 treats the material from C/C++ Implementation Vulnerabilities Part 1 as a prerequisite.

 

Course Pre-requisites

This class has minimal prerequisites. It just requires that you are comfortable with reading small (< 100 line) C programs.

 

Course Learning Objectives

  • Learn to recognize the common programming errors that lead to uninitialized data access, race conditions (double fetch, TOCTOU), use-after-free, type confusion, and information disclosure.

  • 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

    • Reminders of important parts from C/C++ Implementation Vulnerabilities Part 1

  • Uninitialized Data Access

  • Prevention

    • Writing good sanity checks

    • Piecemeal type-safe language usage

  • Detection

    • Manual code auditing guidance

    • Commercial static analysis tools

    • Fuzzing

    • Address Sanitizer

    • Memory Sanitizer

  • Mitigation

    • Address Space Layout Randomization (ASLR)

    • Non-Executable Memory

    • Control Flow Integrity (CFI)

    • Tagged Memory

  • Race Conditions

    • 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 such as Thread Sanitizer).

  • Use-After-Free (UAF)

  • Type Confusion

  • Information Disclosure

 

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

  • Git and Subversion to check out vulnerable code

  • Your favorite code-reading software / IDE. If you don't have a favorite, Eclipse is recommended because it works the same on all OSes, and a usage guide will be given.

  • A link to a software setup guide will be sent before class, and the student should install them before class to maximize time available for interaction with the instructor.

 

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 for monitors! 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.

 
 
Previous
Previous
March 16

Xeno's All You Can Learn Buffet!

Next
Next
March 16

x86-64 Intel Firmware Attack and Defense