image image

Xeno Kovah

RISC-V Assembly  calender

Trainer: Xeno Kovah

Date: 28th - 30th May 2024

Time: 9:00am to 5:30pm PDT

Venue: Santa Clara Marriott

Training Level: Basic

Please note: the training ticket does not include access to the conference. Similarly, the conference ticket does not grant access to the trainings. If you have any questions, reach out to us.


2 days
Online or in-person

Key Learning Objectives:

  • Learn the RV32I base instruction set for 32-bit programs
  • Learn the RV64I base instruction set for 32-bit programs
  • Learn the "C" standard extension for compressed instruction encoding (16-bit encoding instead of 32-bit)
  • Learn the "M" standard extension for multiplication, division, and remainders
  • Learn about the 32 RISC-V general purpose registers + the Program Counter (PC)
  • Understand the at time confusing or counter-intuitive compiler-isms of GCC which lead to particular patterns in executables' assembly.
  • Learn to debug and analyze RISC-V executables which you don't have the source code for, in GDB.
  • Learning how to write C code and disassemble it to see what instructions were generated. But also learning how to write assembly to see how it behaves, or even raw bytes to see how the assembler and processor interprets it.
  • Being comfortable with Reading The Fun Manual (RTFM!) to go seek out the most accurate details of how things work.
  • Reverse engineer the black box Carnegie Mellon "Binary Bomb Lab", which has changed the lives of so many students (the instructor included!) This is a *major* hands-on reverse engineering exercise (which can take anywhere from 2 hours to 2 weeks!) which has been shared the world over by thousands of students. This gives you something substantive to chew on even after class to really reinforce your understanding and capability to read assembly.

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. The instructor is then specifically in attendance to answer your questions as soon as you have them! The less other students ask questions, the more this class ends up looking like a 1:1 tutoring session for you!

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 before and after class, what you're really paying for is support from the instructor before, during, and after class! So you'll be entitled to start the class up to a week early and be able to ask up to 20 questions before or after class with quick turnaround. This lets you keep working through the material even if you run out of time at the in-person training.

If you'd instead like to take a custom learning-path class that picks and chooses material from any of the classes that list Xeno as the instructor, you can sign up for the Xeno's All You Can Learn Buffet class instead.

Who Should Attend? | Target Audience:

  • People who want to start their journey up the skill tree towards such professions as reverse engineering, malware analyst, vulnerability hunter, security researcher, OS engineer, or systems architect.
  • People who gain satisfaction from understanding how systems really work at a very deep level.
  • People who don't have a lot of free time outside of work, and who thus want to use this time to hunker down and jam through all this material with full instructor support.

What to Know? | Prerequisite Knowledge and Skills:

This class requires that you are comfortable with reading small (< 20 line) C programs, and have debugged C source code in the past.

Training Detailed Agenda:

  • Introduction
  • Registers
  • Your first instruction - No-op.
    • Instructions learned: NOP, ADDI
  • Just returning from a function + learning about the stack.
    • Instructions learned: LI, RET, JR, JALR, SD, LD, MOV, C.JR, C.SDSP, C.LDSP, C.ADDI4SPN, C.ADDI
  • Understanding local variables.
    • Instructions learned: SW, LW, SH, LH, LHU, SB, LBU, LB, LUI, AUIPC, ADD, ADDW, ADDIW, SUBW, SEXT.W, C.MV, C.ADDI16SP, C.LD, C.ADD, C.ADDIW
  • Calling functions and calling conventions.
    • Instructions learned: JAL, CALL, J, SUB, C.SUB
  • Boolean operations.
    • Instructions learned: AND, OR, XOR, NOT, C.AND, C.OR, C.XOR, XORI, ANDI, ORI, ZEXT.B
  • Control flow.
    • Instructions learned: BNE, BGE, BGEU, BLT, BLTU, BNEZ, C.BNEZ, BEQZ, BEQ, C.BEQZ, BGTZ, BLTZ
  • Bit shifting.
  • "Set-if" instructions.
    • Instructions learned: SNEZ, SLTU, SGTZ, SLT, SLTI, SLTIU
  • The stragglers that we just need to collect in order to complete our full set of base 32 and 64-bit instructions!
    • Instructions learned: FENCE, ECALL, EBREAK
  • "M" standard ISA extension - Multiplication, Division, and Remainder.
  • Read The Fun Manual!
  • Writing inline assembly for fun and understanding!
  • The infamous CMU Binary Bomb - now with 100% more RISC-V!
  • Conclusion

What to Bring? | Software and Hardware Requirements:

  • Headphones for watching videos, (preferably over-ear so you're not disturbed as the instructor is walking around the class answering individuals' questions).
  • A PC or an *x86* Mac (class won't work with an M1 Mac!) capable of running 1 VM at a time with ideally 4 GB of dedicated RAM.
  • Administrator privileges to install virtualization software on your machine.
  • A PC with VMWare Workstation or an *x86* Mac with VMWare Fusion (the free "Player" versions are fine).
  • ISO for installing Ubuntu Linux 20.04 (if you choose to learn the optional AT&T assembly syntax material).
  • A link to software setup guide will be sent before class, and the student should install before class to maximize time available for interaction with the instructor.

Resources Provided at the Training | Deliverables:

  • Online instructions on how to set up and test your machine before coming to class
  • Access to all Creative-Commons-licensed slides & Mozilla-licensed lab code
  • Access to all Creative-Commons-licensed lecture & lab videos!!!


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.