Practical iOS App, User-, and Kernel-Space Reverse-Engineering

This 3-day training will equip you with a toolbox of indispensable techniques and methods for diving into the world of hacking apps on Apple's mobile devices. While covering all basics to get beginner reverse-engineers started, intermediate and even advanced attendees are provided with appropriately challenging content and exercises.

After getting started with static reverse engineering and dynamic testing iOS apps using Ghidra and Frida, we’ll pivot to challenges posed by programs written in Objective-C and Swift, which use asynchronous programming using Grand Central Dispatch and Cross-Process Communication (XPC). We’ll be using Frida to trace control flow, find interesting code paths, manipulate data, and finally collect code coverage – everything you’ll need to get started writing custom fuzzers for vulnerability discovery. Going deeper into the internals of iOS, the user-space analysis will be followed up by a dive into the XNU kernel. Starting with a broad overview of the interactions between user- and kernel-space, we’ll be taking a closer look at IOKit, the common API used by iOS apps and daemons to communicate with drivers. This is followed up with a look into RTKit-based firmware and an overview of the network of Co-Processors in an iPhone.

The training will include hands-on exercises on virtual or physical iOS devices. Advanced iOS app internals are conveyed by breaking them down into small, easily comprehensible chunks and exercises building up on each other to form a general understanding of iOS concepts. Students will be guided through using free and open-source reverse-engineering software and frameworks (such as Ghidra and Frida) to understand the internals and perform security testing of closed-source apps and daemons. Students will be provided with slides, exercises, solutions including custom tooling, and cheat sheets to follow along the training.

Trainers

Jiska Classen is a wireless and mobile security researcher. The intersection of these topics means that she digs into iOS internals, reverse engineers wireless firmware, and analyzes proprietary protocols. Her practical work on public Bluetooth security analysis tooling uncovered remote code execution and cryptographic flaws in billions of mobile devices. She also likes to work on obscure and upcoming wireless technologies, for example, she recently uncovered vulnerabilities in Ultra-wideband distance measurement and reverse-engineered Apple's AirTag communication protocol. She has previously spoken at Black Hat USA, DEF CON, RECon, Hardwear.io, Chaos Communication Congress, Chaos Communication Camp, Gulasch Programmer Nacht, MRMCDs, Easterhegg, Troopers, Pass the Salt, NotPinkCon, gave various lectures and training, and published at prestigious academic venues. Jiska Classen gave Android security trainings privately and for BlackHoodie at TROOPERS 2022, and has teaching experience from creating own lectures and labs as a postdoctoral researcher at TU Darmstadt.

Fabian Freyer has a love-hate relationship with reverse engineering and binary exploitation. Using the advanced method of excessive amounts of intense staring at hexdumps in Binary Ninja, trying to figure out every bit of the software he’s looking at, only to be disappointed it doesn’t give a flag to hand into the scoreboard. After years of CTF playing, he’s turned to using his skills as an independent security researcher but is currently taking a break from breaking things to build things at a hosting provider. Since then, he’s been scratching that itch by doing security research into mitigations at a systematic level and enjoys presenting his research at conferences such as NDSS, Black Hat, Hardwear.io and Nullcon. Fabian has given public security training on mobile security as well as cellular baseband firmware emulation and reverse-engineering at Hardwear.io, Nullcon Berlin and bespoke private security trainings.

Venue

This training will take place October 9-11, 2023 on-site at Objective By The Sea v6.0 (OBTS) located at the Hotel Don Pepe (Gran Meliá), on the Mediterranean Sea in Marbella. Discounted room rates are available through the OBTS website.

Booking

A limited number of seats is availabe at a price of € 2999 excl. VAT. Please register through our booking form to reserve a seat. We will reach out to you individually to confirm your booking with an invoice. Payment is possible via SWIFT bank transfer or Credit Cards through Stripe.

In addition to the training, attendees must separately purchase a ticket for the OBTS conference.

Cancellation Policy

Students can cancel their booking at a full refund (minus transaction and processing fees) up to 1 month before the training. Later cancellations cannot be refunded, but we will work with you to find the best outcome for all sides where possible.

We reserve the right to cancel individual registrations in duly justified cases at a full refund of the training costs. Conference attendance is not affected by this. The OBTS Code of Conduct applies to all attendees. In cases where attendees are removed from the training due to Code of Conduct violations, no refunds can be offered.

Prerequisites

This training is aimed at beginner to intermediate students.

Required Background

Students will need to feel comfortable using a Linux/macOS command-line. While familiarity with JavaScript and Python are helpful, understanding of common scripting language concepts is sufficient to follow the course and complete exercises, as we will be referring to examples and documentation and providing guidance where required.

Technical Setup

Students will need to have access either to a physical jailbroken iPhone (iPhone 6 or higher, iOS 12 or higher) or access to a Corellium virtual iOS device for the duration of the training.

We will be providing a (x86_64) virtual machine image with all required tooling. Students will need to use a laptop capable of running a virtual machine with internet connectivity, USB pass-through (when using a physical device) at 16GiB of RAM and 40GB of free disk space. All required tools can be installed on macOS natively for students who can only use an Apple M1/M2 laptop.

Outline

The following outline is intended to give an overview over what will expect you in the training. Minor adaptations can be made during the training to adjust to trainee questions, interests and progress, and therefore does not represnt a guaranteed schedule.

Day 1 - iOS App Fundamentals

Learning objectives:

At the end of Day 1, students will have the understanding and means to perform basic static and dynamic reverse-engineering of iOS apps to identify and trace the execution of interesting functions, and write scripts to exercise the corresponding code-paths.

Topic overview:

Day 2 - iOS User-Space Internal: Fuzzing, GCD, XPC

Learning objectives:

At the end of Day 2, students will be able to write basic fuzzers to find bugs, read the crash logs, and understand how to identify the underlying vulnerabilities. Students will furthermore understand asynchronous and multi-threaded programming on iOS and be able to follow execution both statically and dynamically. By applying their understanding of the iOS sandbox from Day 1 to XPC, students will be able to assess the security impact of communication between Apps, AppExtensions, and iOS daemons.

Topic overview:

Day 3 - Below User-Space: Kernel & Firmware

Learning Objectives:

At the end of Day 3, through their understanding of mach messages, syscalls, and IOKit calls, students will be able to follow how user-space applications interact with the iOS kernel through syscalls and IOKit. Furthermore, students will be able to get started reverse engineering custom firmware implementations using Apple’s RTKit RTOS. As an outlook, students are able to put the concepts of the complete three-day course in the context of current public security research.

Topic Overview:


RE//verse 2025 · BlackHat Europe 2024 · OBTSv7 · BlackHoodie @ Hexacon 2024 · BlackHoodie @ TROOPERS 2024 · OBTSv6 · home