image image

Marius Muench

Reverse-Engineering, Emulation, and Dynamic Testing of Cellular Baseband Firmware


Trainer: Marius Muench

Date: 6th - 8th June 2022

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

Venue: Delta Hotels by Marriott

Training Level: Intermediate to Advanced


Note: Regarding COVID-19 safety, Hardwear.io will seek to ensure a safe event, as the health and safety of our exhibitors, delegates, speakers, and staff will always be our number one priority. Hardwear.io will follow all applicable health regulations required by the local (Santa Clara) and government (State of California) authorities.


Objectives:

The training teaches the structure of typical cellular baseband firmware on the example of Samsung’s Shannon baseband. We cover how basebands communicate internally, how to reverse engineer them, and how to find security vulnerabilities through emulation and fuzzing.

The training uses firmware binaries from real phones. While most of the training is centered around static and dynamic off-device testing, such as reverse engineering and emulation, participants also get the chance to interact with real phones and obtain insights about over-the-air testing.


Training Detailed Description:

Day 1: Obtaining and Reverse Engineering the Firmware:
  • accessing a device's bootloader
  • dumping firmware
  • loading firmware into Ghidra
  • anatomy of a baseband RTOS
  • identifying interesting functions and parsers
Day 2: Rehosting and Fuzzing the Firmware
  • harnessing and emulation
  • fuzzer setup
  • crash triaging
Day 3: Over-the-Air Replication & State-of-the-Art Dynamic Testing
  • Fake base station setup:
  • required hardware setup
  • configuring the fake base station
  • providing input to the phone over-the-air
  • Hands-On Introduction to FirmWire:
  • platform overview
  • differences between full-system and selective emulation
  • creating fuzzing harnesses in FirmWire
  • dynamic debugging of discovered crashes

What to Expect? | Key Learning Objectives:

Participants will gain hands-on experience on baseband firmware in modern smartphones. They will learn the general structure of a baseband RTOS, by the example of the Shannon baseband. Together, we will dump the firmware from the device, take a deep dive into the binary, find common patterns and reverse engineer protocol parsers.

Equipped with the gained knowledge about the firmware, students will learn how to rehost selected parsers and fuzz-test them using AFL++. Then, we will discuss how to set up a fake base station using commercially available Software Defined Radios for over-the-air replication of discovered crash cases.

Lastly, we will provide a hands-on introduction to FirmWire, a full-system baseband emulation platform released in 2022.

Who Should Attend? | Target Audience:

  • Security Researchers
  • Baseband Firmware Developers
  • Hardware Hackers

What to Bring? | Software and Hardware Requirements:

  • own laptop running Windows / Linux / macOS - Linux preferred
  • up and running docker setup to follow along exercises (Dockerfile will be provided before the training).
  • download and install Ghidra (using other RE tools will be harder, as we use existing loaders during this training.

What to Bring? | Prerequisite Knowledge and Skills:

  • experience with reverse engineering
  • a general idea of what basebands are
  • strong background in python, c, are a plus

Resources Provided at the Training | Deliverables:

  • lab manual
  • solutions and scripts discussed and developed during the class
  • during the lab: access to phone and other hardware required for in-class experiments

ABOUT THE TRAINERS

Marius is a postdoctoral researcher at Vrije Universiteit Amsterdam. His research interests cover (in-)security of embedded systems, binary & microarchitectural exploitation, and defenses. He obtained his PhD from Sorbonne University in cooperation with EURECOM. He developed and maintains avatar2, a framework for analyzing embedded systems firmware. Among others, he used the framework within the FirmWire project for emulating Samsung’s Shannon and MediaTek’s MTK baseband firmware, resulting into the discovery of several critical vulnerabilities.